Our new implementation looks much like the old from a user's point of view. The user submits jobs using the same RM commands and syntax as previously, and the submitted job script still contains an mprun command. The difference is that we have added a -x rm option to the mprun command, where rm is the name of the resource management system being used. This identifies the plug-in module that CRE should use to interact with the RM. If the -x specifier is omitted, then mprun uses the RM listed in the default_rm entry in the file /opt/SUNWhpc/conf/hpc.conf. System administrators should set the default_rm entry to reflect the RM that is in use at their site.
The -np n option is still allowed, but is no longer required, because mprun can infer the number of processes to run by communicating with the RM via the plug-in library.
Job submissions with each RM are shown in the following examples. These examples assume that default_rm has been defined appropriately. The job consists of a four-process MPI program in which each rank (that is, process) prints its hostname. The only significant difference between each example is the syntax of the job submission command, which should be familiar to current users of each system.
CODE EXAMPLE 4 Job Submission Example on Sun Grid Engine Software
% cat myjob.csh #!/bin/csh -f mprun -np 4 myprog.x % qsub -pe cre 4 myjob.csh your job 33 ("myjob.csh") has been submitted % cat myjob.csh.o33 Sun Microsystems Inc. SunOS 5.8 Generic February 2000 Rank 0 is on hpc-6 Rank 1 is on hpc-6 Rank 2 is on hpc-7 Rank 3 is on hpc-7 Logout
CODE EXAMPLE 5 Job Submission Example on LSF Software
% cat myjob.csh #!/bin/csh -f mprun -np 4 myprog.x % bsub -n 4 -q fast -o out myjob.csh Job <739> is submitted to queue <fast> % cat out Job <myjob.csh> was submitted from host <hpc-6> by user <sistare> ... Rank 0 is on hpc-6 Rank 1 is on hpc-6 Rank 2 is on hpc-7 Rank 3 is on hpc-7
CODE EXAMPLE 6 Job Submission Example on PBS Software
% cat myjob.csh #!/bin/csh -f mprun -np 4 myprog.x % qsub -l nodes=2:ppn=2 myjob.csh 22.hpc-6 % cat myjob.csh.o22 Sun Microsystems Inc. SunOS 5.8 Generic February 2000 Rank 0 is on hpc-6 Rank 1 is on hpc-6 Rank 2 is on hpc-7 Rank 3 is on hpc-7 Logout
The user may instead request an interactive job, in which case the job submission command brings up an interactive shell containing the allocated resources. The mprun command is typed at the shell prompt in this case, and multiple mprun commands can be used within the same interactive session. The following code examples show all three RMs.
CODE EXAMPLE 7 Interactive Job Example on Sun Grid Engine Software
% qsh -pe cre 4 waiting for interactive job to be scheduled ... Your interactive job 24 has been successfully scheduled. % mprun -np 4 myprog.x Rank 0 is on hpc-6 Rank 1 is on hpc-6 Rank 2 is on hpc-7 Rank 3 is on hpc-7 % mprun -np 4 hello.x Rank 0 says hello Rank 1 says hello Rank 2 says hello Rank 3 says hello
CODE EXAMPLE 8 Interactive Job Example on PBS Software
% qsub -l nodes=2:ppn=2 -I qsub: waiting for job 20.hpc-6 to start qsub: job 20.hpc-6 ready Sun Microsystems Inc. SunOS 5.8 Generic February 2000 % mprun -np 4 myprog.x Rank 0 is on hpc-6 Rank 1 is on hpc-6 Rank 2 is on hpc-7 Rank 3 is on hpc-7
CODE EXAMPLE 9 Interactive Job Example on LSF Software
% bsub -n 4 -q short -Is csh Job <24559> is submitted to queue <short>. <<Waiting for dispatch ...>> <<Starting on hpc-7>> % mprun -np 4 myprog.x Rank 0 is on hpc-7 Rank 1 is on hpc-7 Rank 2 is on hpc-6 Rank 3 is on hpc-6
TABLE 2 summarizes the commands that are used to submit a job under each system.
TABLE 2 Job Submission Commands
|LSF||bsub||bsub -Is csh|
|Sun Grid Engine||qsub||qsh|