Skip to content

Commit

Permalink
HPC pbs script descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
Al-Murphy committed Nov 6, 2023
1 parent 9c179bf commit 364f606
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 0 deletions.
18 changes: 18 additions & 0 deletions pbs_examples/cpu_parallel.pbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#PBS -l walltime=72:00:00
#PBS -l select=1:ncpus=24:mem=96gb
#PBS -J 1-3
module load anaconda3/personal
source activate EnformerCelltyping
cd $PBS_O_WORKDIR

#read line from txt file
run=$(head -$PBS_ARRAY_INDEX pbs/parallel.txt | tail -1)
#split line into two variables by '-'
IFS=- read var1_i var2_i <<< $run

#echo them just so you can see the values in the output
echo $var1_i
echo $var2_i

#pass the variables as input to a python script
python ./bin/script.py -i "$var1_i" -j "$var2_i"
7 changes: 7 additions & 0 deletions pbs_examples/cpu_single.pbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#PBS -l walltime=72:00:00
#PBS -l select=1:ncpus=24:mem=96gb
module load anaconda3/personal
source activate EnformerCelltyping
cd $PBS_O_WORKDIR

python ./bin/script.py
18 changes: 18 additions & 0 deletions pbs_examples/gpu_parallel.pbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#PBS -l walltime=72:00:00
#PBS -l select=1:ncpus=4:mem=24gb:ngpus=1:gpu_type=RTX6000
#PBS -J 1-3
module load anaconda3/personal
source activate EnformerCelltyping
cd $PBS_O_WORKDIR

#read line from txt file
run=$(head -$PBS_ARRAY_INDEX pbs/parallel.txt | tail -1)
#split line into two variables by '-'
IFS=- read var1_i var2_i <<< $run

#echo them just so you can see the values in the output
echo $var1_i
echo $var2_i

#pass the variables as input to a python script
python ./bin/gpu_script.py -i "$var1_i" -j "$var2_i"
7 changes: 7 additions & 0 deletions pbs_examples/gpu_single.pbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#PBS -l walltime=72:00:00
#PBS -l select=1:ncpus=4:mem=24gb:ngpus=1:gpu_type=RTX6000
module load anaconda3/personal
source activate EnformerCelltyping
cd $PBS_O_WORKDIR

python ./bin/gpu_script.py
3 changes: 3 additions & 0 deletions pbs_examples/parallel.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
a - i
a - j
b - k

0 comments on commit 364f606

Please sign in to comment.