Download the pcluster bootstrap configuration utility.
git clone https://github.com/dabble-of-devops-bioanalyze/bioanalyze-pcluster-node-bootstrap
cd bioanalyze-pcluster-node-bootstrap
ansible-playbook ./playbooks/head-node/spack.yaml
Make sure your ~/.bashrc
has the following:
#############################################################
# Spack
#############################################################
export SPACK_ROOT=/apps/software-configs/spack/v0.19.1
source ${SPACK_ROOT}/share/spack/setup-env.sh
export SPACK_ADD_DEBUG_FLAGS=true
You can use this script to submit spack jobs.
sudo mkdir -p /apps/spack-mirror
sudo chown ubuntu:ubuntu /apps/spack-mirror
Grab this script and use it to install your packages.
#!/usr/bin/env bash
# submit-spack.sh
#SBATCH -N 4
#SBATCH -n 4
#SBATCH --partition dev
#SBATCH --constraint m5a2xlarge
#SBATCH --time 1-00:00:00
#SBATCH --exclusive
cd /apps/spack-mirror
srun -v -v -N 4 -n 4 spack install \
-v -y \
--deprecated \
--show-log-on-error \
--no-check-signature \
--no-checksum \
PACKAGES_TO_INSTALL
If you're having trouble installing spack packages try the following:
rm -rf ~/.spack/cache
rm -rf /apps/software-configs/spack/v0.19.1/var/spack/cache
spack clean -m -a -b
rm -rf ~/.spack/cache
rm -rf /apps/software-configs/spack/v0.19.1/var/spack/cache
spack install \
-v -y \
--deprecated \
--show-log-on-error \
--no-check-signature \
--no-checksum \
gromacs relion amber@22
If you're still having trouble spin up an interactive job:
#!/usr/bin/env bash
# submit-interactive.sh
#SBATCH --partition dev
#SBATCH --constraint m5a4xlarge
#SBATCH --time 24:00:00
#SBATCH --exclusive
# submit a job with a sleep 4h to allow for interactive
sleep 24h
chmod 777 submit-interactive.sh
sbatch ./submit-interactive.sh
Once the job is running grab the hostname, ssh, and run the clean
and install
commands again.