Skip to main content

7.6) Interactive Shared Memory Job Example


In addition to batch jobs, shared memory jobs can also be launched as interactive jobs, via the qsh and qrsh commands. For example to request an X-windows session for 4 hours, with 4 cores in a shared memory environment use:

[bash]
$ qsh –pe smp 4 –cwd –V –l h_rt=4:00:00
[/bash]

This will launch a new X-Windows session with 4 cores attached. You can then run the executable in the resulting window, e.g.:

[bash]
$ ./omp_prog
[/bash]

Alternatively, if you prefer not to launch an X-window you can make use of qrsh, for example:

[bash]
$ qrsh –pe smp 4 –cwd –V –l h_rt=4:00:00 ./omp_prog
[/bash]

Which will run the executable, omp_prog, from the current working directory (-cwd), with your current environment (-V), for 4 hours and on 4 cores.