Batch script mode
Batch scripts are files which contain series of instructions to be interpreted and executed, one line at a time; they can be thought of as a pre-arranged series of terminal commands. The normal way of using our HPC facilities is through batch scripts and our resource manager, LSF. We can perform simple operations while connected to the HPC machines, but CPU-intensive tasks will demand that we submit them through a batch script.
We recommend using Linux as the operative system in your local machine. Other Unix-based systems (such as iOS) are also widely compatible. Connecting from a Windows machine is more complicated and will need a ssh/sftp client such as PuTTY.
To log onto our machines from a terminal:
To submit a job to the queue system, use
You can also specify LSF parameters as command options (command-line options override script options), for instance
To check the status of your jobs, use
Each job in the LSF queue system is identified by a JobID number. To view more details about a job, use
You can also cancel a pending or running job:
To log-out from the machine, type "exit" or press Control+D.
Interactive mode allows us to introduce instructions from the terminal in real time, and follow their execution, as opposed to instructions in a batch file. Interactive mode is most suited to compiling, testing and debugging your code, or for complex sets of instructions where you need to inspect the intermediate results or states. Unlike normal logging-in, interactive sessions do spend computational hours, according to the CPU time they use.
To run an interactive session, first connect to the login nodes:
A wrapper is provided for the command to launch an interactive session, "interactiu". It is essentially similar to a bsub command, so you can use any of the standard command-line options for bsub. For instance:
will run an interactive session, using 4 CPUs, on pirineus, on the short queue. This is the typical set up for compilation.
Please note that interactive sessions are still jobs managed by the LSF system, and that they will be on queue until suitable resources can be gathered - make sure to check queue and host availability to avoid endlessly waiting for your interactive session to go through.
To exit the interactive session, simply use
If you plan on compiling, please use the corresponding modules (in the Tools section). To see the modules available in a certain machine use
For instance, to work with Intel Composer 2015 on pirineus, we'd use
And, to correctly set up the environment variables,
Intel compilers and tools are now ready to use.