- 易迪拓培训,专注于微波、射频、天线设计工程师的培养
HFSS15: Example LSF bsub Command Lines
The following Linux and Windows examples all use HFSS as the ANSYS EM product, but similar command lines will work for all ANSYS EM products.
Linux Examples for LSF
If the hfss command is included in the bsub command line, then the entire hfss command will be processed by the command shell two times. The hfss command is processed when the bsub command is processed by the shell. It will be processed again when the hfss command is started by the scheduler.
Several examples show the entire hfss command line enclosed in double quotes ("), while the double quote (") characters within the hfss command line are replaced by escaped double quotes ("""). This ensures that the quoted arguments of the hfss command are processed correctly. The last example shows how to use a shell script so that the hfss command line will be processed by the command processor only once. The hfss command is placed in the shell script, and then the shell script pathname is placed in the bsub command line. Then, the hfss 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.
Serial job:
bsub -n 1 /opt/Ansoft/HFSS14/hfss14/hfss -ng -BatchSolve
~/projects/OptimTee.hfss
The -n 1 option indicates that this job runs on one core.
Serial job that needs a minimum of 4GB:
bsub -n 1 -R "select[mem>4000]"
/opt/Ansoft/HFSS14/hfss14/hfss -ng
-BatchSolve ~/projects/OptimTee.hfss
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]"
"/opt/Ansoft/HFSS14/hfss14/hfss -ng -BatchSolve
-batchoptions """'HFSS/Preferences/NumberOfProcessors'=4""" ~/projects/OptimTee.hfss"
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 4 engines:
bsub -n 4 /opt/Ansoft/HFSS14/hfss14/hfss -ng -BatchSolve -Distributed ~/projects/OptimTee.hfss
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.
Distributed processing and multi-processing job using 4 cores, with 2 cores for multi-processing:
bsub -n 4 -R "span[ptile=2]" ~/projects/OptimTee.csh
Shell script (~/projects/OptimTee.csh):
#!/bin/csh
/opt/Ansoft/HFSS14/hfss14/hfss -ng -BatchSolve
-Distributed -machinelist num=2 -batchoptions
"'HFSS/Preferences/NumberOfProcessorsDistributed'=2
'HFSS/Preferences/NumberOfProcessors'=2" ~/projects/OptimTee.hfss
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/Preferences/NumberOfProcessorsDistributed=2 batchoption indicates that the distributed analysis engines should use two cores for multi-processing.
The 'HFSS/Preferences/NumberOfProcessors=2 batchoption indicates that the portion of the analysis that is not distributed should use two cores for multi-processing.
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.
Windows Examples for LSF
If the hfss command is included in the bsub command line, then the entire hfss command will be processed by the command processor cmd.exe two times. The hfss command is processed when the bsub command is processed by the command processor. It will be processed again when the hfss command is started by the scheduler.
The first three examples show the entire hfss command line enclosed in double quotes ("), while the double quote (") characters within the hfss command line are replaced by escaped double quotes ("). This ensures that the quoted arguments of the hfss command are processed correctly. The remaining examples show how to use a batch file so that the hfss command line will be processed by the command processor only once. The hfss command is placed in a batch file, and then the batch file pathname is placed in the bsub command line. Then, the hfss command is only processed by the command processor when the job is started. When using this approach, the batch file should be accessible from all of the cluster hosts.
Serial job:
bsub -n 1 ""C:Program FilesAnsysEMHFSS14.0hfss.exe"
-Ng -BatchSolve \hostshareprojectsOptimTee.hfss"
The -n 1 option indicates that this job runs on one core.
The entire hfss command is in double quotes, and the double quotes enclosing the hfss pathname are escaped. Each of these double quotes is replaced by the sequence ".
Serial job that needs a minimum of 4GB:
bsub -n 1 -R "select[mem>4000]"
""C:Program FilesAnssysEMHFSS14hfss.exe"
-Ng -BatchSolve \hostshareprojectsOptimTee.hfss"
The -R "select[mem>4000]" option indicates that this needs a minimum of 4 GB memory.
The entire hfss command is in double quotes, and the double quotes enclosing the hfss pathname are escaped. Each of these double quotes is replaced by the sequence ".
Multi-processing job using 4 cores:
bsub -n 4 -R "span[ptile=4]"
""C:Program FilesAnsysEMHFSS14hfss.exe"
-Ng -BatchSolve -batchoptions
"'HFSS/Preferences/NumberOfProcessors'=4"
\hostshareprojectsOptimTee.hfss"
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 hfss pathname and the -batchoptions value are escaped. Each of these double quotes is replaced by the sequence ".
Distributed processing job using 4 engines:
bsub -n 4 \hostshareprojectsOptimTee.bat
Batch File (\hostshareprojectsOptimTee.bat) Contents:
"C:Program FilesAnsysEMHFSS14hfss.exe"
-Ng -BatchSolve
-Distributed \hostshareprojectsOptimTee.hfss
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 hfss command is placed in the batch file \hostshareprojectsOptimTee.bat. In the bsub command line, the hfss command is replaced by the batch file pathname.
Distributed processing and multi-processing job using 4 cores, with 2 cores for multi-processing:
bsub -n 4 -R "span[ptile=2]" \hostshareprojectsOptimTee.bat
Batch File (\hostshareprojectsOptimTee.bat) Contents:
"C:Program FilesAnsysEMHFSS14hfss.exe" -Ng
-BatchSolve -Distributed -machinelist num=2 -batchoptions
"'HFSS/Preferences/NumberOfProcessorsDistributed'=2
'HFSS/Preferences/NumberOfProcessors'=2"
\hostshareprojectsOptimTee.hfss
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/Preferences/NumberOfProcessorsDistributed=2 batchoption indicates that the distributed analysis engines should use two cores for multi-processing.
The 'HFSS/Preferences/NumberOfProcessors=2 batchoption indicates that the portion of the analysis that is not distributed should use two cores for multi-processing.
The hfss command is placed in the batch file \hostshareprojectsOptimTee.bat. In the bsub command line, the hfss command is replaced by the batch file pathname.
HFSS 学习培训课程套装,专家讲解,视频教学,帮助您全面系统地学习掌握HFSS
上一篇:Example Searching for a Registry Key Pathname
下一篇:Example SGE qsub Command Lines


