<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.csi.cuny.edu/cunyhpc/index.php?action=history&amp;feed=atom&amp;title=RAXML</id>
	<title>RAXML - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.csi.cuny.edu/cunyhpc/index.php?action=history&amp;feed=atom&amp;title=RAXML"/>
	<link rel="alternate" type="text/html" href="https://wiki.csi.cuny.edu/cunyhpc/index.php?title=RAXML&amp;action=history"/>
	<updated>2026-05-18T09:54:40Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.38.4</generator>
	<entry>
		<id>https://wiki.csi.cuny.edu/cunyhpc/index.php?title=RAXML&amp;diff=122&amp;oldid=prev</id>
		<title>James: Text replacement - &quot;[pP][bB][sS]&quot; to &quot;SLURM&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.csi.cuny.edu/cunyhpc/index.php?title=RAXML&amp;diff=122&amp;oldid=prev"/>
		<updated>2022-10-27T19:32:33Z</updated>

		<summary type="html">&lt;p&gt;Text replacement - &amp;quot;[pP][bB][sS]&amp;quot; to &amp;quot;SLURM&amp;quot;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 19:32, 27 October 2022&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l105&quot;&gt;Line 105:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 105:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Use &amp;#039;mpirun&amp;#039; and point to the MPI parallel executable to run&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Use &amp;#039;mpirun&amp;#039; and point to the MPI parallel executable to run&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;echo &amp;quot;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Begin RAXML MPI Run ...&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;echo &amp;quot;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Begin RAXML MPI Run ...&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;mpirun -np 4 -machinefile $&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;PBS_NODEFILE &lt;/del&gt;raxmlHPC-MPI -m GTRCAT -n TEST2 -s alg.phy -N 4 &amp;gt; raxml_mpi.out 2&amp;gt;&amp;amp;1&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;mpirun -np 4 -machinefile $&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;SLURM_NODEFILE &lt;/ins&gt;raxmlHPC-MPI -m GTRCAT -n TEST2 -s alg.phy -N 4 &amp;gt; raxml_mpi.out 2&amp;gt;&amp;amp;1&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;echo &amp;quot;&amp;gt;&amp;gt;&amp;gt;&amp;gt; End   RAXML MPI Run ...&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;echo &amp;quot;&amp;gt;&amp;gt;&amp;gt;&amp;gt; End   RAXML MPI Run ...&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>James</name></author>
	</entry>
	<entry>
		<id>https://wiki.csi.cuny.edu/cunyhpc/index.php?title=RAXML&amp;diff=102&amp;oldid=prev</id>
		<title>James: Created page with &quot;Examples of running both parallel and serial jobs are presented below. More information can be found here [http://www.exelixis-lab.org]  To run RAxML first a PHYLIP file of aligned DNA or amino-acid sequences similar to the one shown here must be created.  This file, &#039;alg.phy&#039;, is in interleaved format:   &lt;pre&gt; 5 60 Tax1        CCATCTCACGGTCGGTACGATACACCTGCTTTTGGCAG Tax2        CCATCTCACGGTCAGTAAGATACACCTGCTTTTGGCGG Tax3        CCATCTCCCGCTCAGTAAGATACCCCTGCTGTTGGCGG Tax4...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.csi.cuny.edu/cunyhpc/index.php?title=RAXML&amp;diff=102&amp;oldid=prev"/>
		<updated>2022-10-20T20:17:58Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;Examples of running both parallel and serial jobs are presented below. More information can be found here [http://www.exelixis-lab.org]  To run RAxML first a PHYLIP file of aligned DNA or amino-acid sequences similar to the one shown here must be created.  This file, &amp;#039;alg.phy&amp;#039;, is in interleaved format:   &amp;lt;pre&amp;gt; 5 60 Tax1        CCATCTCACGGTCGGTACGATACACCTGCTTTTGGCAG Tax2        CCATCTCACGGTCAGTAAGATACACCTGCTTTTGGCGG Tax3        CCATCTCCCGCTCAGTAAGATACCCCTGCTGTTGGCGG Tax4...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Examples of running both parallel and serial jobs are presented below. More information can be found here [http://www.exelixis-lab.org]&lt;br /&gt;
&lt;br /&gt;
To run RAxML first a PHYLIP file of aligned DNA or amino-acid sequences similar to the one shown&lt;br /&gt;
here must be created.  This file, &amp;#039;alg.phy&amp;#039;, is in interleaved format: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
5 60&lt;br /&gt;
Tax1        CCATCTCACGGTCGGTACGATACACCTGCTTTTGGCAG&lt;br /&gt;
Tax2        CCATCTCACGGTCAGTAAGATACACCTGCTTTTGGCGG&lt;br /&gt;
Tax3        CCATCTCCCGCTCAGTAAGATACCCCTGCTGTTGGCGG&lt;br /&gt;
Tax4        TCATCTCATGGTCAATAAGATACTCCTGCTTTTGGCGG&lt;br /&gt;
Tax5        CCATCTCACGGTCGGTAAGATACACCTGCTTTTGGCGG&lt;br /&gt;
&lt;br /&gt;
GAAATGGTCAATATTACAAGGT&lt;br /&gt;
GAAATGGTCAACATTAAAAGAT&lt;br /&gt;
GAAATCGTCAATATTAAAAGGT&lt;br /&gt;
GAAATGGTCAATCTTAAAAGGT&lt;br /&gt;
GAAATGGTCAATATTAAAAGGT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For more detail about PHYLIP formatted files, please check look at the RAxML manual&lt;br /&gt;
here [http://sco.h-its.org/exelixis/oldPage/RAxML-Manual.7.0.4.pdf] at the web site&lt;br /&gt;
referenced above.  There is also a tutorial here [http://sco.h-its.org/exelixis/hands-On.html]&lt;br /&gt;
&lt;br /&gt;
To include all required environmental variables and the path to the RAXML executable run&lt;br /&gt;
the modules load command (the modules utility is discussed in detail above):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
module load raxml&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next create a SLURM batch script.  Below is an example script that will run the serial version&lt;br /&gt;
of RAxML.  The program options &amp;#039;&amp;#039;&amp;#039;-m&amp;#039;&amp;#039;&amp;#039;,&amp;#039;&amp;#039;&amp;#039;-n&amp;#039;&amp;#039;&amp;#039;,&amp;#039;&amp;#039;&amp;#039;-s&amp;#039;&amp;#039;&amp;#039; are all required.  In order, they specify&lt;br /&gt;
the substitution model (-m), the output file name (-n), and the sequence file name (-s).&lt;br /&gt;
Additional options are discussed in the manual.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#SBATCH --partition production&lt;br /&gt;
#SBATCH --job-name RAXML_serial&lt;br /&gt;
#SBATCH --nodes=1&lt;br /&gt;
#SBATCH --ntasks=1&lt;br /&gt;
#SBATCH --mem=2880&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# Find out name of master execution host (compute node)&lt;br /&gt;
echo -n &amp;quot;&amp;gt;&amp;gt;&amp;gt;&amp;gt; SLURM Master compute node is: &amp;quot;&lt;br /&gt;
hostname&lt;br /&gt;
&lt;br /&gt;
# You must explicitly change to the working directory in SLURM&lt;br /&gt;
cd $SLURM_SUBMIT_DIR&lt;br /&gt;
&lt;br /&gt;
# Just point to the serial executable to run&lt;br /&gt;
echo &amp;quot;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Begin RAXML Serial Run ...&amp;quot;&lt;br /&gt;
raxmlHPC -y -m GTRCAT -n TEST1 -p 12345 -s alg.phy &amp;gt; raxml_ser.out 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo &amp;quot;&amp;gt;&amp;gt;&amp;gt;&amp;gt; End   RAXML Serial Run ...&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This script can be dropped into a file (say raxml_serial.job) and submitted to SLURM with&lt;br /&gt;
the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
qsub raxml_serial.job&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
RAxML produces the following output files&lt;br /&gt;
:&lt;br /&gt;
:#Parsimony starting tree is written to &amp;#039;&amp;#039;&amp;#039;RAxML_parsimonyTree.TEST1&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
:#Final tree is written to &amp;#039;&amp;#039;&amp;#039;RAxML_result.TEST1&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
:#Execution Log File is written to &amp;#039;&amp;#039;&amp;#039;RAxML_log.TEST1&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
:#Execution information file is written to &amp;#039;&amp;#039;&amp;#039;RAxML_info.TEST1&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
RAxML also is available in a MPI-parallel version called raxmlHPC-MPI.  The MPI-parallelized version&lt;br /&gt;
can be run on all types of clusters to perform rapid parallel bootstraps,  or multiple  inferences on &lt;br /&gt;
the original  alignment. The MPI-version is for executing large production runs (i.e. 100 or 1,000 bootstraps).&lt;br /&gt;
You can also perform multiple inferences on larger datasets in parallel to find a best-known ML tree&lt;br /&gt;
for your dataset.  Finally, the novel rapid BS algorithm and the associated ML search have also been&lt;br /&gt;
parallelized with MPI. &lt;br /&gt;
&lt;br /&gt;
The following MPI script script selects 4 processors (cores) and allows SLURM to put them on any&lt;br /&gt;
compute node.  Note, that when running any parallel program one must be cognizant of the scaling &lt;br /&gt;
properties of its parallel algorithm; in other words, how much does a given job&amp;#039;s run time drop&lt;br /&gt;
as one doubles the number of processors used.  All parallel programs arrive at point of diminishing returns&lt;br /&gt;
that depend on the algorithm, size of the problem being solved, and the performance features of the &lt;br /&gt;
system that it is being run on.  We might have chosen to run this job on 8, 16, or 32 processors (cores),&lt;br /&gt;
but would only do so if the improvement in performance scales.  Improvements of less than 25% after a&lt;br /&gt;
doubling are an indication of a reasonable maximum number of processors under those particular set&lt;br /&gt;
of circumstances.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#SBATCH --partition production&lt;br /&gt;
#SBATCH --job-name RAXML_mpi&lt;br /&gt;
#SBATCH --nodes=1&lt;br /&gt;
#SBATCH --ntasks=1&lt;br /&gt;
#SBATCH --mem=2880&lt;br /&gt;
&lt;br /&gt;
# Find out name of master execution host (compute node)&lt;br /&gt;
echo -n &amp;quot;&amp;gt;&amp;gt;&amp;gt;&amp;gt; SLURM Master compute node is: &amp;quot;&lt;br /&gt;
hostname&lt;br /&gt;
&lt;br /&gt;
# You must explicitly change to the working directory in SLURM&lt;br /&gt;
cd $SLURM_SUBMIT_DIR&lt;br /&gt;
&lt;br /&gt;
# Use &amp;#039;mpirun&amp;#039; and point to the MPI parallel executable to run&lt;br /&gt;
echo &amp;quot;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Begin RAXML MPI Run ...&amp;quot;&lt;br /&gt;
mpirun -np 4 -machinefile $PBS_NODEFILE raxmlHPC-MPI -m GTRCAT -n TEST2 -s alg.phy -N 4 &amp;gt; raxml_mpi.out 2&amp;gt;&amp;amp;1&lt;br /&gt;
echo &amp;quot;&amp;gt;&amp;gt;&amp;gt;&amp;gt; End   RAXML MPI Run ...&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This test case should take no more than a minute to run and will produce SLURM output and error&lt;br /&gt;
files beginning with the job name &amp;#039;RAXML_mpi&amp;#039;.  Other RAxML-specific outputs will also be produced&lt;br /&gt;
Details on the meaning of the SLURM script are covered above in this Wiki&amp;#039;s SLURM section.  The most important&lt;br /&gt;
lines are &amp;#039;#SBATCH --nodes=4 ntasks=1 mem=2880&amp;#039;.  The first instructs SLURM&lt;br /&gt;
to select 4 resource &amp;#039;chunks&amp;#039; each with 1 processor (core) and 2,880 MBs of memory in it for the job (on&lt;br /&gt;
ANDY as much as 2,880 MBs might have been selected).  The second line instructs SLURM to place this job&lt;br /&gt;
wherever the least used resources are found (i.e. freely).  &lt;br /&gt;
&lt;br /&gt;
The master compute node that it finally selects to run your job will be printed in the SLURM output file by&lt;br /&gt;
the &amp;#039;hostname&amp;#039; command.  As this is a parallel job, other compute nodes may also be called into service to&lt;br /&gt;
complete this job.  Note that the name of the parallel executable is &amp;#039;raxmlHPC-MPI&amp;#039; and the in the parallel&lt;br /&gt;
run we are complete four simulations (-N 4). The expression &amp;#039;2&amp;gt;&amp;amp;1&amp;#039; combines Unix standard output from the&lt;br /&gt;
program with Unix standard error.  Users should always explicitly specify the name of the application&amp;#039;s output file&lt;br /&gt;
in this way to ensure that it is written directly into the user&amp;#039;s working directory which has much more disk&lt;br /&gt;
space than the SLURM spool directory on /var.&lt;/div&gt;</summary>
		<author><name>James</name></author>
	</entry>
</feed>