Schrödinger Command Line Job Submissions: Difference between revisions
(→Job Settings: Included image) |
(→Create Job for Command Line Submission: Included image) |
||
Line 83: | Line 83: | ||
Click the gear icon next to the ''Job Name'' to bring up the ''Molecular Dynamics - Job Settings'' dialog. | Click the gear icon next to the ''Job Name'' to bring up the ''Molecular Dynamics - Job Settings'' dialog. | ||
[[File:Schrodinger-JobSettings-Dialog.png]] | |||
The job name field will also be the name of a directory created, so fill this in with something easy to remember, and without spaces. | The job name field will also be the name of a directory created, so fill this in with something easy to remember, and without spaces. |
Revision as of 18:37, 17 June 2020
Used for long running jobs.
Initial Setup
The initial setup consists of one-time settings that rarely need to be changed.
Queue Settings
Copy a default configuration into your home directory on Magnolia
user $
cp /modules/schrodinger/queue.local-example ${HOME}/.schrodinger/queue.local
To show the contents of the file, use:
user $
cat ${HOME}/.schrodinger/queue.local
The default file should look something like:
# Configuration for per user job settings # This file must be located in your $HOME/.schrodinger directory. # # To enable, use: # # cp /modules/schrodinger/queue.local-example ~/.schrodinger/queue.local # # SCHROD_SLURM_TIME # Max run time for jobs submitted to queue. # # 0-05:00:00 means 0 days and 5 hours. # # See https://slurm.schedmd.com/sbatch.html#OPT_time # for time format. # # Errors like 'Unable to submit job for batch execution' # may mean that the value entered below is invalid. # SCHROD_SLURM_TIME=0-05:00:00 #SCHROD_SLURM_EMAIL=me@usm.edu #SCHROD_SLURM_EMAIL_TYPE=END
The queue.local file should be edited to have your email and maximum time you want a job to run. To edit the file, use the nano editor:
user $
nano -w ${HOME}/.bashrc
To save any change you make, use Ctrl+O, then hit Enter to accept the file name. Use Ctrl+X to exit nano.
# Configuration for per user job settings # This file must be located in your $HOME/.schrodinger directory. # # To enable, use: # # cp /modules/schrodinger/queue.local-example ~/.schrodinger/queue.local # # SCHROD_SLURM_TIME # Max run time for jobs submitted to queue. # # 0-05:00:00 means 0 days and 5 hours. # # See https://slurm.schedmd.com/sbatch.html#OPT_time # for time format. # # Errors like 'Unable to submit job for batch execution' # may mean that the value entered below is invalid. # SCHROD_SLURM_TIME=2-01:10:11 SCHROD_SLURM_EMAIL=example@gmail.com SCHROD_SLURM_EMAIL_TYPE=END
This sends email when a job is complete to `example@gmail.com`, you should change this to where you'd like email sent. The maximum job run time is set to 2 days, 1 hour, 10 minutes, and 11 seconds.
If # is the first character on a line, then the whole line is considered a comment and ignored. Therefore, remove any # for settings you wish to use. Notice that there is no # before the last three (3) lines of the example.
Job Settings
It will be convenient to have jobs saved in the project directory of Schrodinger. Open the preferences window (Edit->Preferences) and change theDefault directory for job startup and i/o to Project Directory:
Create Job for Command Line Submission
Click the gear icon next to the Job Name to bring up the Molecular Dynamics - Job Settings dialog.
The job name field will also be the name of a directory created, so fill this in with something easy to remember, and without spaces.
At this point, normally the 'Run' button is clicked and the job is sent through the GUI. However, since we want to submit our job through the command line, here we click the Write button and then close the Molecular Dynaimcs - Job Settings dialog window.
Now we are done with the GUI, so close all of the Schrodinger GUI windows
Submit Job via Command Line
Connect to the command line of the Cluster CITE and go to the directory that was created in the `Create Job for Command Line Submission` step. For example
user $
cd ${HOME}/TestProject/TestJob01
Once there check which files are present in that directory, you should see something like:
user $
ls -l
TestRun001.cfg TestRun001.cms TestRun001.msj TestRun001.sh
Most of the files define your structure and molecular dynamics job type, but the file ending in .sh is an executable job which will build the submission script and submit it to the cluster. Execute the script with
user $
./TestRun001.sh
The leading dot of the previous command is important.
The command will take a few moments to complete, then drop you back to a prompt where you can type. Your job should now be submitted.
Wait for job to Complete
Your job should be submitted to the cluster now and is either running or waiting to run. To check the status of your job, run a command like:
user $
squeue -p gpu
This command shows all jobs on the GPU nodes. To see jobs only belonging to yourself, use a command like:
user $
squeue -u user
where the text `user` needs to be replace with your Magnolia username.
If you completed the `Initial Setup` steps and configured the queue to send you an email when jobs complete, simply wait until you receive the email. Otherwise you'll have to use the two `squeue` commands above to check if you job has completed.