MrBayes: Difference between revisions

Jump to navigation Jump to search
110 bytes added ,  4 months ago
copy editing
(Marked this version for translation)
(copy editing)
Line 8: Line 8:
{{Command|module spider mrbayes}}
{{Command|module spider mrbayes}}


== Example == <!--T:3-->
== Examples == <!--T:3-->


=== Sequential === <!--T:4-->
=== Sequential === <!--T:4-->
1. Write the submission script
The following job script uses only one CPU core (<code>--cpus-per-task=1</code>).
The example uses an input file (<code>primates.nex</code>) distributed with MrBayes.  
 
{{File
{{File
   |name=submit-mrbayes-seq.sh
   |name=submit-mrbayes-seq.sh
Line 24: Line 26:
<!--T:5-->
<!--T:5-->
module load mrbayes/3.2.7
module load mrbayes/3.2.7
<!--T:6-->
cd $SCRATCH  
cd $SCRATCH  
<!--T:7-->
# Copy one of the example locally on the local storage
cp -v $EBROOTMRBAYES/share/examples/mrbayes/primates.nex .
cp -v $EBROOTMRBAYES/share/examples/mrbayes/primates.nex .


<!--T:8-->
<!--T:8-->
# Run using 1 core
mb primates.nex
mb primates.nex
}}
}}


<!--T:9-->
<!--T:9-->
2. Submit the sequential job
The job script can be submitted with
{{Command|sbatch submit-mrbayes-seq.sh}}
{{Command|sbatch submit-mrbayes-seq.sh}}


=== Parallel === <!--T:10-->
=== Parallel === <!--T:10-->
MrBayes support running on multi-cores and multi-nodes, and GPU.
MrBayes can be run on multiple cores, on multiple nodes, and on GPUs.


==== MPI ==== <!--T:11-->
==== MPI ==== <!--T:11-->
1. Write the submission script
The following job script will use 8 CPU cores in total, on one or more nodes.
Like the previous example it uses an input file (<code>primates.nex</code>) distributed with MrBayes.
 
{{File
{{File
   |name=submit-mrbayes-parallel.sh
   |name=submit-mrbayes-parallel.sh
Line 58: Line 56:
<!--T:12-->
<!--T:12-->
module load mrbayes/3.2.7
module load mrbayes/3.2.7
<!--T:13-->
cd $SCRATCH  
cd $SCRATCH  
<!--T:14-->
# Copy one of the example locally on the local storage
cp -v $EBROOTMRBAYES/share/examples/mrbayes/primates.nex .
cp -v $EBROOTMRBAYES/share/examples/mrbayes/primates.nex .


<!--T:15-->
<!--T:15-->
# Run using $SLURM_NTASKS
srun mb primates.nex
srun mb primates.nex
}}
}}


<!--T:16-->
<!--T:16-->
2. Submit the sequential job
The job script can be submitted with
{{Command|sbatch submit-mrbayes-parallel.sh}}
{{Command|sbatch submit-mrbayes-parallel.sh}}


==== GPU ==== <!--T:17-->
==== GPU ==== <!--T:17-->
1. Write the submission script
The following job script will use a GPU.
Like the previous examples it uses an input file (<code>primates.nex</code>) distributed with MrBayes.
 
{{File
{{File
   |name=submit-mrbayes-gpu.sh
   |name=submit-mrbayes-gpu.sh
Line 90: Line 84:
<!--T:18-->
<!--T:18-->
module load gcc cuda/12 mrbayes/3.2.7
module load gcc cuda/12 mrbayes/3.2.7
<!--T:19-->
cd $SCRATCH  
cd $SCRATCH  
<!--T:20-->
# Copy one of the example locally on the local storage
cp -v $EBROOTMRBAYES/share/examples/mrbayes/primates.nex .
cp -v $EBROOTMRBAYES/share/examples/mrbayes/primates.nex .


<!--T:21-->
<!--T:21-->
# Run using $SLURM_NTASKS
srun mb primates.nex
srun mb primates.nex
}}
}}


<!--T:22-->
<!--T:22-->
2. Submit the sequential job
The job script can be submitted with
{{Command|sbatch submit-mrbayes-gpu.sh}}
{{Command|sbatch submit-mrbayes-gpu.sh}}


== Checkpointing == <!--T:23-->
== Checkpointing == <!--T:23-->
For users needing very long runs of MrBayes, it is suggested to break up the work into several small jobs rather than one very long job. Long jobs have a higher probably of being interrupted by maintenance windows or unforeseen problems. Fortunately, MrBayes has a built in mechanism for creating checkpoints, where progress can be saved from one job and continued in a subsequent job.
For users needing very long runs of MrBayes, we suggest you break up the work into several small jobs rather than one very long job. Long jobs have are more likely to be interrupted a hardware failure or a maintenance outage. Fortunately, MrBayes has a built-in mechanism for creating checkpoints, where progress can be saved from one job and continued in a subsequent job.


<!--T:24-->
<!--T:24-->
Bureaucrats, cc_docs_admin, cc_staff
2,879

edits

Navigation menu