...
In many cases, you will want to run your calculation on the scratch space for a particular node. This will prevent your calculation from writing to the NSF mounted /home directory and insure that you are not wasting time due to unnecessary data transfer between nodes. However, the srun command doesn’t know which node you want to run on or in which directory your calculation will need to run. In these cases, it is essential to write a batch file that will guide your calculation along. The essential steps to include in your batch file are (this example uses a naming convention that this is run #2 on day May 24):
Create an unique directory in your scratch space for this calculation (substitute your user name is the commands below):
Code Block language bash mkdir /scratch/user_name/may24_run2/
Report back to a file in your home directory as to which node the calculation is running on and the time it started. This will help you track down the results when it is finished.
Code Block language bash /usr/bin/hostname > /home/user_name/may24_run2.log /usr/bin/date >> /home/user_name/may24_run2.log
Now that we have created the directory, we need to move all the necessary input files over from the home directory.
Code Block language bash cp /home/user_name/input_store/input.dat /scratch/user_name/may24_run2/
Hop into the directory we created
Code Block language bash cd /scratch/user_name/may24_run2
- Start the calculation
Running Parallel Calculations
...