[CIG-SHORT] Run on cluster using SLURM

Brad Aagaard baagaard at usgs.gov
Sun May 25 14:21:41 PDT 2014


Birendra,

Your workflow is correct in that you can generate the bash shell script 
to submit a job using --scheduler.dry and then fine-tune the script to 
adapt it to the SLURM batch system.

The best way to get things setup is to create a shell script to run a 
normal mpi program. Once you determine exactly how to submit a job using 
the SLURM batch system, it should be clear how to adjust the shell 
script output from --scheduler.dry.

Regards,
Brad


On 5/25/14, 11:56 AM, Birendra jha wrote:
> I tried this as follows but it does not work:
>
> 1. Get the mpirun command from a cluster that uses PBS (and pylith works there) by
> pylith test.cfg --scheduler.dry
>
> 2. Create a bash script e.g. slurm.sh that has the mpirun command from PBS cluster except the following parts:
> -np ${nodes} -machinefile ${PBS_NODEFILE}
> --scheduler.dry --nodes=1 --macros.nodes=1 --macros.job.name= --macros.job.id=None
>
> Here is my slurm.sh:
>
> #!/bin/bash
> #SBATCH --job-name=testjob
> #SBATCH --workdir=/home2/bjha/test
> #SBATCH --output=test.out
> #SBATCH --error=test.err
> #SBATCH --nodes=2
> #SBATCH --ntasks-per-node=4
>
> mpirun /home2/bjha/pylith/bin/mpinemesis --pyre-start
>   /home2/bjha/pylith/bin:/home2/bjha/pylith/lib/python2.7/site-packages/pythia-0.8.1.16-py2.7.egg:/home2/bjha/pylith/lib/python2.7/site-packages:/home2/bjha/pylith/lib64/python2.7/site-packages:/home2/bjha/test:/usr/lib/python2.7:/usr/lib/python2.7/plat-linux2:/usr/lib/python2.7/lib-tk:/usr/lib/python2.7/lib-old:/usr/lib/python2.7/lib-dynload:/usr/local/lib/python2.7/dist-packages:/usr/lib/python2.7/dist-packages:/usr/lib/python2.7/dist-packages/PIL:/usr/lib/python2.7/dist-packages/gst-0.10:/usr/lib/python2.7/dist-packages/gtk-2.0:/usr/lib/pymodules/python2.7:/usr/lib/python2.7/dist-packages/ubuntu-sso-client:/usr/lib/python2.7/dist-packages/ubuntuone-client:/usr/lib/python2.7/dist-packages/ubuntuone-control-panel:/usr/lib/python2.7/dist-packages/ubuntuone-couch:/usr/lib/python2.7/dist-packages/ubuntuone-installer:/usr/lib/python2.7/dist-packages/ubuntuone-storage-protocol:/home2/bjha/pylith/lib64/python2.7/site-packages pythia mpi:mpistart
>   pylith.apps.PyLithApp:PyLithApp test.cfg
>
> 3. Submit
> sbatch slurm.sh
>
> Question: if Pylith/Pyre does not support SLURM--like it does PBS, SGE, LSF---how can I extract the mpirun command that I can submit to a SLURM cluster?
>
> Thanks and regards
> Birendra
>
> --------------------------------------------
> On Sun, 5/25/14, Birendra jha <bjha7333 at yahoo.com> wrote:
>
>   Subject: Run on cluster using SLURM
>   To: cig-short at geodynamics.org
>   Date: Sunday, May 25, 2014, 10:21 PM
>
>   Hi
>
>   Is it possible to submit a pylith run to a
>   cluster that uses SLURM, just like in case of PBS or SGE?
>
>
>   Thanks and regards
>   Birendra
>
> _______________________________________________
> CIG-SHORT mailing list
> CIG-SHORT at geodynamics.org
> http://lists.geodynamics.org/cgi-bin/mailman/listinfo/cig-short
>



More information about the CIG-SHORT mailing list