Skip to content

Commit a955185

Browse files
Update Slurm script for 2.2.2
1 parent 8fadff6 commit a955185

1 file changed

Lines changed: 33 additions & 20 deletions

File tree

example_slurm_job.sh

Lines changed: 33 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,45 @@
11
#!/bin/bash
2-
#SBATCH --partition=gpu
3-
#SBATCH --time=2:00:00
4-
#SBATCH --gres=gpu:1
2+
#SBATCH -p gpu
3+
#SBATCH --time=18:00:00
4+
#SBATCH --gpus=4
55
#SBATCH --cpus-per-gpu=12
6-
#SBATCH --mem-per-gpu=30G
6+
#SBATCH --mem=140G
77

8-
module load alphafold
8+
module load alphafold/2.2.2
9+
module load python/gcc/3.10
910

10-
# the alphafold modulefile should define:
11-
# * ALPHAFOLD_DIR -- install location AlphaFold
12-
# * ALPHAFOLD_DATADIR -- the DOWLOAD_DIR set in scripts/download_all_data.sh
11+
### Check values of some environment variables
12+
echo SLURM_JOB_GPUS=$SLURM_JOB_GPUS
13+
echo ALPHAFOLD_DIR=$ALPHAFOLD_DIR
14+
echo ALPHAFOLD_DATADIR=$ALPHAFOLD_DATADIR
1315

14-
# Run AlphaFold; default is to use GPUs, i.e. "--use_gpu"
15-
python3 ${ALPHAFOLD_DIR}/singularity/run_singularity.py \
16-
--fasta_paths=T1050.fasta \
17-
--max_template_date=2020-05-14 \
18-
--preset=reduced_dbs
16+
###
17+
### README This runs AlphaFold 2.2.2 on the T1050.fasta file
18+
###
1919

20-
# AlphaFold should use all GPU devices available to the job.
20+
# AlphaFold should use all GPU devices available to the job by default.
2121
# To explicitly specify use of GPUs, and the GPU devices to use, add
2222
# --use_gpu --gpu_devices=${SLURM_JOB_GPUS}
23-
23+
#
2424
# To run the CASP14 evaluation, use:
25-
# --preset=casp14
26-
27-
# To benchmark, running multiple JAX model evaluations:
25+
# --model_preset=monomer_casp14
26+
#
27+
# To benchmark, running multiple JAX model evaluations (NB this
28+
# significantly increases run time):
2829
# --benchmark
2930

30-
# Copy all output from AlphaFold back to directory where "sbatch" command was issued
31-
cp -R $TMPDIR $SLURM_SUBMIT_DIR
31+
# Run AlphaFold; default is to use GPUs, i.e. "--use_gpu" can be omitted.
32+
python3 ${ALPHAFOLD_DIR}/singularity/run_singularity.py \
33+
--use_gpu --gpu_devices=${SLURM_JOB_GPUS} \
34+
--data_dir=${ALPHAFOLD_DATADIR} \
35+
--fasta_paths=T1050.fasta \
36+
--max_template_date=2020-05-14 \
37+
--model_preset=monomer_casp14 \
38+
--benchmark
39+
40+
echo INFO: AlphaFold returned $?
41+
42+
### Copy Alphafold output back to directory where "sbatch" command was issued.
43+
mkdir $SLURM_SUBMIT_DIR/Output-$SLURM_JOB_ID
44+
cp -R $TMPDIR $SLURM_SUBMIT_DIR/Output-$SLURM_JOB_ID
3245

0 commit comments

Comments
 (0)