Job Preparation
1. Setting up the Module Environment
Most applications, compilers and libraries rely on environment variables to function properly. These variables should be set properly.
Environment modules (modules) allow a user to load all the settings needed by a particular application on demand, and to unload them when they are no longer needed. Switching from one compiler to the other, between different releases of the same application, and from one MPI library to another can be done in a snap, using just one command — module.
Module commands:
module
avail list available software modules load <modulefile> load available software
list list currently loaded modules
switch <modulefile1> <modulefile2> switch between two modules
purge remove all modules
For example, if we want to use the openmpi (version 2.0.2) and the GCC (6.2) we need to issue the following commands.
module load gcc/6.3
module load openmpi
2. JDL File
To describe this job we need to create a JDL file that will contain the full description of the job we want to submit.For example the simple JDL file is as follow:
Executable = "/bin/hostname";
Arguments = "-f";
StdOutput = "std.out";
StdError = "std.err";
OutputSandbox = {"std.err","std.out"};
In the case, we have created our own executable, and we want to run a batch of system commands using a script file we need to include this file into the job submission procedure.Supposing that we have the following script named script.sh with the following content:
-
-
- date --utc
-
-
- hostname -f
The JDL file will be altered as so:
Executable = "script.sh";
InputSandbox = {"script.sh"};
StdOutput = "std.out";
StdError = "std.err";
OutputSandbox = {"std.err","std.out"};
|