<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://support.beocat.ksu.edu/BeocatDocs/index.php?action=history&amp;feed=atom&amp;title=Kstat.convert</id>
	<title>Kstat.convert - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://support.beocat.ksu.edu/BeocatDocs/index.php?action=history&amp;feed=atom&amp;title=Kstat.convert"/>
	<link rel="alternate" type="text/html" href="https://support.beocat.ksu.edu/BeocatDocs/index.php?title=Kstat.convert&amp;action=history"/>
	<updated>2026-11-24T13:36:37Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.8</generator>
	<entry>
		<id>https://support.beocat.ksu.edu/BeocatDocs/index.php?title=Kstat.convert&amp;diff=695&amp;oldid=prev</id>
		<title>Mozes: Created page with &quot;=== Converting your qsub script for sbatch using &lt;I&gt;kstat.convert&lt;/I&gt; ===  If you already have a qsub script, I have created a new perl program called kstat.convert that will...&quot;</title>
		<link rel="alternate" type="text/html" href="https://support.beocat.ksu.edu/BeocatDocs/index.php?title=Kstat.convert&amp;diff=695&amp;oldid=prev"/>
		<updated>2020-08-31T18:40:05Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;=== Converting your qsub script for sbatch using &amp;lt;I&amp;gt;kstat.convert&amp;lt;/I&amp;gt; ===  If you already have a qsub script, I have created a new perl program called kstat.convert that will...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;=== Converting your qsub script for sbatch using &amp;lt;I&amp;gt;kstat.convert&amp;lt;/I&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
If you already have a qsub script, I have created a new perl program called kstat.convert that will automatically convert your qsub script over to an sbatch script.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;B&amp;gt;kstat.convert --sge qsub_script.sh --slurm slurm_script.sh&amp;lt;/B&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Below is an example of a simple qsub script and the resulting sbatch script after conversion.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#$ -j y&lt;br /&gt;
#$ -cwd&lt;br /&gt;
#$ -N netpipe&lt;br /&gt;
#$ -P KSU-CIS-HPC&lt;br /&gt;
&lt;br /&gt;
#$ -l mem=4G&lt;br /&gt;
#$ -l h_rt=100:00:00&lt;br /&gt;
#$ -pe single 32&lt;br /&gt;
&lt;br /&gt;
#$ -M eid@ksu.edu&lt;br /&gt;
#$ -m ab&lt;br /&gt;
&lt;br /&gt;
mpirun -np $NSLOTS NPmpi -o np.out&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash -l&lt;br /&gt;
#SBATCH --job-name=netpipe&lt;br /&gt;
&lt;br /&gt;
#SBATCH --mem-per-cpu=4G   # Memory per core, use --mem= for memory per node&lt;br /&gt;
#SBATCH --time=4-04:00:00   # Use the form DD-HH:MM:SS&lt;br /&gt;
#SBATCH --nodes=1&lt;br /&gt;
#SBATCH --ntasks-per-node=32&lt;br /&gt;
&lt;br /&gt;
#SBATCH --mail-user=eid@ksu.edu&lt;br /&gt;
#SBATCH --mail-type=ALL   # same as =BEGIN,FAIL,END&lt;br /&gt;
&lt;br /&gt;
mpirun -np $SLURM_NPROCS NPmpi -o np.out&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The sbatch file uses &amp;lt;B&amp;gt;#SBATCH&amp;lt;/B&amp;gt; to identify command options for the scheduler where the qsub file uses &amp;lt;B&amp;gt;#$&amp;lt;/B&amp;gt;.  Most options are similar but simply use a different syntax.  The memory can still be defined on a per core basis as with SGE, or you can use &amp;lt;B&amp;gt;--mem=128G&amp;lt;/B&amp;gt; to specify the total memory per node if you&amp;#039;d prefer.  The &amp;lt;B&amp;gt;--nodes=&amp;lt;/B&amp;gt; and &amp;lt;B&amp;gt;--ntasks-per-node=&amp;lt;/B&amp;gt; provide an easy way to request the core configuration you want.  If your code can be distributed across multiple nodes and you don&amp;#039;t care what the arrangement is, you can instead just specify the number of cores using &amp;lt;B&amp;gt;--ntasks=&amp;lt;/B&amp;gt;.  For more in depth documentation on converting from SGE to Slurm follow the links below:&lt;br /&gt;
&lt;br /&gt;
https://srcc.stanford.edu/sge-slurm-conversion&amp;lt;BR&amp;gt;&lt;br /&gt;
https://slurm.schedmd.com/sbatch.html&lt;/div&gt;</summary>
		<author><name>Mozes</name></author>
	</entry>
</feed>