PrepareJob
From BIOcrunch
(Difference between revisions)
(23 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | To run a job on the cluster, prepare the data files on your local machine, then copy it to the cluster. Beside the data files, you will need a job file with the settings as outlined below. | + | To run a job on the cluster, prepare the data files on your local machine, then [[File Transfers|copy it to the cluster]]. Beside the data files, you will need a job file with the settings as outlined below. |
− | Name your job | + | Name your job and data files in a consistent way: |
* Job file: myjobfile.sh | * Job file: myjobfile.sh | ||
− | * User: | + | * User: user01 |
* Email: max@mustermann.de | * Email: max@mustermann.de | ||
− | + | * Job files are written as a sort of "shell" commands that are common on Linux systems | |
+ | * Lines starting with "##" or "# " are comment lines to document some stuff for better reading afterwards | ||
+ | * Lines starting with "#$" are commands for the job scheduler "qsub" | ||
+ | * Lines starting not with "#" are commands executed | ||
+ | * '''Make sure that the skript does not contain empty lines! Delete them or comment them out using "#"''' | ||
− | |||
− | |||
− | |||
− | |||
− | |||
== Examples == | == Examples == | ||
− | You may use one of the following examples as template for you job. Make sure to change | + | You may use one of the following examples as a template for you job. Lines that need to be modified are highlighted. Make sure to change username, email adress, filenames, and, if necessary, program options. The last line of each script calls the program you want to run, including all parameters. The number of CPUs is stored in $NSLOTS and is set later when starting the job. |
=== Beast === | === Beast === | ||
Line 21: | Line 20: | ||
#!/bin/csh | #!/bin/csh | ||
# | # | ||
− | ## | + | ## User name (Which account to be charged cpu time) |
− | #$ -A | + | #$ -A user01 |
# | # | ||
− | ## Send | + | ## Send email to users |
#$ -M max@mustermann.de | #$ -M max@mustermann.de | ||
# | # | ||
− | ## | + | ## Send mail at beginning/end/on suspension |
#$ -m bes | #$ -m bes | ||
# | # | ||
Line 35: | Line 34: | ||
## The job is located in the current working directory. | ## The job is located in the current working directory. | ||
#$ -cwd | #$ -cwd | ||
− | ## | + | ## Filenames for output and error log files |
#$ -o myjobfile.out | #$ -o myjobfile.out | ||
#$ -e myjobfile.err | #$ -e myjobfile.err | ||
# | # | ||
env >./xenv | env >./xenv | ||
− | /share/apps/ | + | /share/apps/beast/bin/beast -beagle -beagle_CPU -beagle_instances $NSLOTS -overwrite ./myjobfile.xml > ./myjobfile.out |
</source> | </source> | ||
Line 47: | Line 46: | ||
#!/bin/csh | #!/bin/csh | ||
# | # | ||
− | ## | + | ## User name (Which account to be charged cpu time) |
− | #$ -A | + | #$ -A user01 |
# | # | ||
− | ## Send | + | ## Send email to users |
#$ -M max@mustermann.de | #$ -M max@mustermann.de | ||
# | # | ||
− | ## | + | ## Send email at beginning/end/on suspension |
#$ -m bes | #$ -m bes | ||
# | # | ||
Line 61: | Line 60: | ||
## The job is located in the current working directory. | ## The job is located in the current working directory. | ||
#$ -cwd | #$ -cwd | ||
− | ## | + | ## Filenames for output and error log files |
#$ -o myjobfile.out | #$ -o myjobfile.out | ||
#$ -e myjobfile.err | #$ -e myjobfile.err | ||
Line 73: | Line 72: | ||
#!/bin/csh | #!/bin/csh | ||
# | # | ||
− | ## | + | ## User name (Which account to be charged cpu time) |
− | #$ -A | + | #$ -A user01 |
# | # | ||
− | ## Send | + | ## Send email to users |
#$ -M max@mustermann.de | #$ -M max@mustermann.de | ||
# | # | ||
− | ## | + | ## Send email at beginning/end/on suspension |
#$ -m bes | #$ -m bes | ||
# | # | ||
Line 85: | Line 84: | ||
#$ -v PVM_ROOT,LD_LIBRARY_PATH=/share/apps/beaglenew | #$ -v PVM_ROOT,LD_LIBRARY_PATH=/share/apps/beaglenew | ||
# | # | ||
− | ## The job is located in the current working directory | + | ## The job is located in the current working directory |
#$ -cwd | #$ -cwd | ||
− | ## | + | ## Filenames for output and error log files |
#$ -o myjobfile.out | #$ -o myjobfile.out | ||
#$ -e myjobfile.err | #$ -e myjobfile.err | ||
# | # | ||
env >./xenv | env >./xenv | ||
− | mpirun -np $NSLOTS /share/apps/mrbayes/ | + | mpirun -np $NSLOTS /share/apps/mrbayes/mb ./beispiel.nex </dev/null |
</source> | </source> | ||
Line 99: | Line 98: | ||
#!/bin/csh | #!/bin/csh | ||
# | # | ||
− | ## | + | ## User name (Which account to be charged cpu time) |
− | #$ -A | + | #$ -A user01 |
# | # | ||
− | ## Send | + | ## Send email to users |
#$ -M max@mustermann.de | #$ -M max@mustermann.de | ||
# | # | ||
− | ## | + | ## Send email at beginning/end/on suspension |
#$ -m bes | #$ -m bes | ||
# | # | ||
Line 113: | Line 112: | ||
## The job is located in the current working directory. | ## The job is located in the current working directory. | ||
#$ -cwd | #$ -cwd | ||
− | ## | + | ## Filenames for output and error log files |
#$ -o myjobfile.out | #$ -o myjobfile.out | ||
#$ -e myjobfile.err | #$ -e myjobfile.err | ||
Line 121: | Line 120: | ||
</source> | </source> | ||
− | + | === Exabayes === | |
+ | <source lang="bash" start="1" highlight="4,7,18,19,22" enclose="div"> | ||
+ | #!/bin/csh | ||
+ | # | ||
+ | ## User name (Which account to be charged cpu time) | ||
+ | #$ -A user01 | ||
+ | # | ||
+ | ## Send email to users | ||
+ | #$ -M max@mustermann.de | ||
+ | # | ||
+ | ## Send email at beginning/end/on suspension | ||
+ | #$ -m bes | ||
+ | # | ||
+ | ## Export these environmental variables | ||
+ | #$ -v PVM_ROOT | ||
+ | # | ||
+ | ## The job is located in the current working directory. | ||
+ | #$ -cwd | ||
+ | ## Filenames for output and error log files | ||
+ | #$ -o myjobfile.out | ||
+ | #$ -e myjobfile.err | ||
+ | # | ||
+ | env >./xenv | ||
+ | mpirun -np $NSLOTS /share/apps/exabayes/exabayes -f aln.phy -q aln.part -n myRun -s 57913 -c config.nex -R 2 -C 2 | ||
+ | </source> | ||
+ | |||
+ | === Iq-Tree === | ||
+ | <source lang="bash" start="1" highlight="4,7,18,19,22" enclose="div"> | ||
+ | #!/bin/csh | ||
+ | # | ||
+ | ## User name (Which account to be charged cpu time) | ||
+ | #$ -A user01 | ||
+ | # | ||
+ | ## Send email to users | ||
+ | #$ -M max@mustermann.de | ||
+ | # | ||
+ | ## Send email at beginning/end/on suspension | ||
+ | #$ -m bes | ||
+ | # | ||
+ | ## Export these environmental variables | ||
+ | #$ -v PVM_ROOT | ||
+ | # | ||
+ | ## The job is located in the current working directory. | ||
+ | #$ -cwd | ||
+ | ## Filenames for output and error log files | ||
+ | #$ -o myjobfile.out | ||
+ | #$ -e myjobfile.err | ||
+ | # | ||
+ | env >./xenv | ||
+ | /share/apps/iqtree/iqtree-omp -omp $NSLOTS -s example.phy -m TEST | ||
+ | </source> |
Latest revision as of 15:37, 24 May 2017
To run a job on the cluster, prepare the data files on your local machine, then copy it to the cluster. Beside the data files, you will need a job file with the settings as outlined below.
Name your job and data files in a consistent way:
- Job file: myjobfile.sh
- User: user01
- Email: max@mustermann.de
- Job files are written as a sort of "shell" commands that are common on Linux systems
- Lines starting with "##" or "# " are comment lines to document some stuff for better reading afterwards
- Lines starting with "#$" are commands for the job scheduler "qsub"
- Lines starting not with "#" are commands executed
- Make sure that the skript does not contain empty lines! Delete them or comment them out using "#"
Contents |
[edit] Examples
You may use one of the following examples as a template for you job. Lines that need to be modified are highlighted. Make sure to change username, email adress, filenames, and, if necessary, program options. The last line of each script calls the program you want to run, including all parameters. The number of CPUs is stored in $NSLOTS and is set later when starting the job.
[edit] Beast
#!/bin/csh
#
## User name (Which account to be charged cpu time)
#$ -A user01
#
## Send email to users
#$ -M max@mustermann.de
#
## Send mail at beginning/end/on suspension
#$ -m bes
#
## Export these environmental variables
#$ -v PVM_ROOT,LD_LIBRARY_PATH=/share/apps/beaglenew
#
## The job is located in the current working directory.
#$ -cwd
## Filenames for output and error log files
#$ -o myjobfile.out
#$ -e myjobfile.err
#
env >./xenv
/share/apps/beast/bin/beast -beagle -beagle_CPU -beagle_instances $NSLOTS -overwrite ./myjobfile.xml > ./myjobfile.out
#
## User name (Which account to be charged cpu time)
#$ -A user01
#
## Send email to users
#$ -M max@mustermann.de
#
## Send mail at beginning/end/on suspension
#$ -m bes
#
## Export these environmental variables
#$ -v PVM_ROOT,LD_LIBRARY_PATH=/share/apps/beaglenew
#
## The job is located in the current working directory.
#$ -cwd
## Filenames for output and error log files
#$ -o myjobfile.out
#$ -e myjobfile.err
#
env >./xenv
/share/apps/beast/bin/beast -beagle -beagle_CPU -beagle_instances $NSLOTS -overwrite ./myjobfile.xml > ./myjobfile.out
[edit] Beast2
#!/bin/csh
#
## User name (Which account to be charged cpu time)
#$ -A user01
#
## Send email to users
#$ -M max@mustermann.de
#
## Send email at beginning/end/on suspension
#$ -m bes
#
## Export these environmental variables
#$ -v PVM_ROOT,LD_LIBRARY_PATH=/share/apps/beaglenew
#
## The job is located in the current working directory.
#$ -cwd
## Filenames for output and error log files
#$ -o myjobfile.out
#$ -e myjobfile.err
#
env >./xenv
/share/apps/beast210/bin/beast -beagle -beagle_CPU -beagle_instances $NSLOTS -overwrite ./myjobfile.xml > ./myjobfile.out
#
## User name (Which account to be charged cpu time)
#$ -A user01
#
## Send email to users
#$ -M max@mustermann.de
#
## Send email at beginning/end/on suspension
#$ -m bes
#
## Export these environmental variables
#$ -v PVM_ROOT,LD_LIBRARY_PATH=/share/apps/beaglenew
#
## The job is located in the current working directory.
#$ -cwd
## Filenames for output and error log files
#$ -o myjobfile.out
#$ -e myjobfile.err
#
env >./xenv
/share/apps/beast210/bin/beast -beagle -beagle_CPU -beagle_instances $NSLOTS -overwrite ./myjobfile.xml > ./myjobfile.out
[edit] Mr Bayes
#!/bin/csh
#
## User name (Which account to be charged cpu time)
#$ -A user01
#
## Send email to users
#$ -M max@mustermann.de
#
## Send email at beginning/end/on suspension
#$ -m bes
#
## Export these environmental variables
#$ -v PVM_ROOT,LD_LIBRARY_PATH=/share/apps/beaglenew
#
## The job is located in the current working directory
#$ -cwd
## Filenames for output and error log files
#$ -o myjobfile.out
#$ -e myjobfile.err
#
env >./xenv
mpirun -np $NSLOTS /share/apps/mrbayes/mb ./beispiel.nex </dev/null
#
## User name (Which account to be charged cpu time)
#$ -A user01
#
## Send email to users
#$ -M max@mustermann.de
#
## Send email at beginning/end/on suspension
#$ -m bes
#
## Export these environmental variables
#$ -v PVM_ROOT,LD_LIBRARY_PATH=/share/apps/beaglenew
#
## The job is located in the current working directory
#$ -cwd
## Filenames for output and error log files
#$ -o myjobfile.out
#$ -e myjobfile.err
#
env >./xenv
mpirun -np $NSLOTS /share/apps/mrbayes/mb ./beispiel.nex </dev/null
[edit] Raxml
#!/bin/csh
#
## User name (Which account to be charged cpu time)
#$ -A user01
#
## Send email to users
#$ -M max@mustermann.de
#
## Send email at beginning/end/on suspension
#$ -m bes
#
## Export these environmental variables
#$ -v PVM_ROOT
#
## The job is located in the current working directory.
#$ -cwd
## Filenames for output and error log files
#$ -o myjobfile.out
#$ -e myjobfile.err
#
env >./xenv
mpirun -np $NSLOTS /share/apps/raxml/raxmlHPC-MPI-SSE3.icc -s sequencefile.phy -n outputfile.phy -m PROTGAMMAWAG
#
## User name (Which account to be charged cpu time)
#$ -A user01
#
## Send email to users
#$ -M max@mustermann.de
#
## Send email at beginning/end/on suspension
#$ -m bes
#
## Export these environmental variables
#$ -v PVM_ROOT
#
## The job is located in the current working directory.
#$ -cwd
## Filenames for output and error log files
#$ -o myjobfile.out
#$ -e myjobfile.err
#
env >./xenv
mpirun -np $NSLOTS /share/apps/raxml/raxmlHPC-MPI-SSE3.icc -s sequencefile.phy -n outputfile.phy -m PROTGAMMAWAG
[edit] Exabayes
#!/bin/csh
#
## User name (Which account to be charged cpu time)
#$ -A user01
#
## Send email to users
#$ -M max@mustermann.de
#
## Send email at beginning/end/on suspension
#$ -m bes
#
## Export these environmental variables
#$ -v PVM_ROOT
#
## The job is located in the current working directory.
#$ -cwd
## Filenames for output and error log files
#$ -o myjobfile.out
#$ -e myjobfile.err
#
env >./xenv
mpirun -np $NSLOTS /share/apps/exabayes/exabayes -f aln.phy -q aln.part -n myRun -s 57913 -c config.nex -R 2 -C 2
#
## User name (Which account to be charged cpu time)
#$ -A user01
#
## Send email to users
#$ -M max@mustermann.de
#
## Send email at beginning/end/on suspension
#$ -m bes
#
## Export these environmental variables
#$ -v PVM_ROOT
#
## The job is located in the current working directory.
#$ -cwd
## Filenames for output and error log files
#$ -o myjobfile.out
#$ -e myjobfile.err
#
env >./xenv
mpirun -np $NSLOTS /share/apps/exabayes/exabayes -f aln.phy -q aln.part -n myRun -s 57913 -c config.nex -R 2 -C 2
[edit] Iq-Tree
#!/bin/csh
#
## User name (Which account to be charged cpu time)
#$ -A user01
#
## Send email to users
#$ -M max@mustermann.de
#
## Send email at beginning/end/on suspension
#$ -m bes
#
## Export these environmental variables
#$ -v PVM_ROOT
#
## The job is located in the current working directory.
#$ -cwd
## Filenames for output and error log files
#$ -o myjobfile.out
#$ -e myjobfile.err
#
env >./xenv
/share/apps/iqtree/iqtree-omp -omp $NSLOTS -s example.phy -m TEST
#
## User name (Which account to be charged cpu time)
#$ -A user01
#
## Send email to users
#$ -M max@mustermann.de
#
## Send email at beginning/end/on suspension
#$ -m bes
#
## Export these environmental variables
#$ -v PVM_ROOT
#
## The job is located in the current working directory.
#$ -cwd
## Filenames for output and error log files
#$ -o myjobfile.out
#$ -e myjobfile.err
#
env >./xenv
/share/apps/iqtree/iqtree-omp -omp $NSLOTS -s example.phy -m TEST