Example LSF bsub Command Lines (Linux Only)
Serial Job
bsub -n 1 /Program Files/AnsysEM/v242/Win64/ansysedt -ng
-BatchSolve -machinelist num=4 ~/projects/OptimTee.aedt
The -n 1 option indicates that this job runs on one core.
Serial Job Requiring a Minimum of 4 GB
bsub -n 1 -R "select[mem>4000]"
/Program Files/AnsysEM/v242/Win64/ansysedt -ng
-BatchSolve -machinelist num=4 ~/projects/OptimTee.aedt
The -R "select[mem>4000]" option indicates that this needs a minimum of 4 GB memory.
Multi-processing Job using 4 Cores
bsub -n 4 -R "span[ptile=4]"
"/Program Files/AnsysEM/v242/Win64/ansysedt -ng -BatchSolve
-batchoptions -machinelist num=4 ~/projects/OptimTee.aedt"
- The -R "span[ptile=4]" option indicates that the four cores need to be on the same machine.
- The -batchoptions option indicates that HFSS should use four cores for multi-processing.
- The entire hfss command is in double quotes, and the double quotes enclosing the -batchoptions value are escaped. Each of these double quotes is replaced by the sequence "\"".
Distributed Processing Job using Four Engines
bsub -n 4 /Program Files/AnsysEM/v242/Win64/ansysedt -ng -BatchSolve -Distributed ~/projects/OptimTee.aedt
- The -n 4 option indicates that the four cores are needed for the job.
- The -Distributed option indicates that this is a DSO job, so that multiple engines will be started. Because 4 cores are allocated to the job, the job will run 4 engines. The -Distributed option can have additional options, such as includetypes=xxx, excludetyeps=xxx, maxlevels=n, and numlevel1=n, where n indicates and integer, and xxx indicates a list of distribution types or "default".
Distributed Processing and Multi-processing Job using Four Cores, with Two Cores for Multiprocessing
bsub -n 4 -R "span[ptile=2]" ~/projects/OptimTee.csh
Shell Script (~/projects/OptimTee.csh):
If a command is included in the bsub command line, the entire command will be processed by the command shell two times. The command is processed when the bsub command is processed by the shell and is processed again when the command is started by the scheduler. This example shows how to use a shell script so that the command line will be processed only once. The command is placed in the shell script, and then the shell script pathname is placed in the bsub command line. Then, the command is only processed by the command processor when the job is started. When using this approach, the shell script should be accessible from all of the cluster hosts.
#!/bin/csh
/Program Files/AnsysEM/v242/Win64/ansysedt -ng -BatchSolve
-Distributed -machinelist num=2 -batchoptions
~/projects/OptimTee.aedt
- The -n 4 option indicates that the four cores are needed for the job.
- The -R "span[ptile=2]" option indicates that the cores must be allocated in groups of two cores on the same machine.
- The -machinelist num=2 option indicates that this is a DSO job and that a total of two engines will be started.
- The hfss command is placed in the shell script (~/projects/OptimTee.csh). In the bsub command line, the hfss command is replaced by the shell script pathname.