Scientific Computing & Visualization
Help Contact
About Accounts Computation Visualization Documentation Services

Submit a batch job via bglsub

An automated script has been written by SCV staff to enable a batch job to be submitted via the command line without first having to prepare a jcf. This automated script is called bglsub (right-click on link to download). Its usage is as follows:

lee % bglsub numprocs CWD executable optional-user-input-file "optional mpirun arguments"
where:
  • numprocs is the number of processors you need (as in "mpirun -np numprocs" or "poe -procs numprocs"); mandatory input
  • CWD is the current working directory from which the job is launched; mandatory input
  • executable is the name of your executable, including the full directory path; mandatory input
  • optional-user-input-file is the input file to your executable, and again you must provide the full path. Note also that by input file it is meant to be those used by the C programming language (argc, argv). Input through stdin is not supported.
  • "optional mpirun arguments" is any number of additional mpirun arguments you wish also to pass on to bglsub. Be sure to enter the double quotes (") as shown.

Here is an example that requests 9 processors. Note that "9" is provided for mpirun. The system assigns 32 nodes to the job following the rule stated above.

lee % bglsub 9 /usr7/xyz/kadin/tmp /usr7/xyz/kadin/bin/ppanel
llsubmit: The job "fe1.bgl.bu.edu.162" has been submitted.
More conveniently, to run the job from the current directory, the above could be entered as
lee % cd /usr7/xyz/kadin/tmp
lee % bglsub 9 $PWD $home/bin/ppanel  
llsubmit: The job "fe1.bgl.bu.edu.162" has been submitted. 

Here is an example on passing optional mpirun flags to bglsub:  

lee:PMPI/tmp % bglsub 256 $PWD $PWD/example1_15 - "-mode VN"  
llsubmit: The job "fe2.bgl.bu.edu.647" has been submitted.  
In the above, the virtual node mode (VN) is passed on to mpirun as an optional mpirun parameter. Even though the "optional-user-input-file" is not required by the user, "-" is entered as a place-holder for that item.

lee:PMPI/tmp % llq  
Id                       Owner      Submitted   ST PRI Class        Running On
------------------------ ---------- ----------- -- --- ------------ ----------
fe2.bgl.bu.edu.647.0     kadin       9/26 08:44 R  50  bgl   fe2.bgl.bu.edu  
fe1.bgl.bu.edu.383.0     kadin       9/25 10:14 H  50  bgl      
	
2 job step(s) in queue, 0 waiting, 0 pending, 1 running, 1 held, 0 preempted  
lee:PMPI/tmp % llbglparts  
Partition Id      Owner      Conn  Status Small Shape   
================= ========== ===== ====== ===== =========  
RMP26Se084419791  kadin      MESH  CONFI    T   128 node  

Even though the above example requests 256 processors, because both processors of each node are used, the system only need to allocate 128 nodes.

Tips on bglsub usage:

  • lee % bglsub to print a help file on bglsub
  • If your executable is in a location other than $PWD, you can add the line
    setenv MYEXEC /project/XYZ/ABC/uvw/myexec
    to your .cshrc file. Then, you can then pass $MYEXEC in place of $PWD as the input to bglsub to reduce typing.
Boston University
Boston University
 
OIT | CCS | September 16, 2008  
Scientific Computing & Visualization Boston University home page Boston University home page