Older Integration with LSF Emulation
Sentaurus WorkBench works well with the LSF emulation layer of Altair Accelerator. Our strategy is to invoke swb with $VOVDIR/scripts/lsfemulation in the path and to make SWB believe that it is using LSF.
Configuring SWB
To configure SWB to use LSF, consult the Sentaurus Workbench User Guide. Here is a highlight of what you should do.
# Fragment of file gqueues.dat
queue lsf:nc_swb "bsub"
In this example, we assume that we tell SWB to use an LSF queue called "nc_swb". You can of course change the name of the queue as long as you define the appropriate jobclass in Altair Accelerator (see below).
# THESE VARIABLE ARE SET IN THE Sentaurus Tool Database.
set WB_tool(sprocess,LSF,resource) {rusage[sprocess_all=1:sprocess3d_all=1]}
set WB_tool(sprocess,LSF,resource) {rusage[sprocess_all=1||SK_sprocess_all=1]}
set WB_tool(sdevice,LSF,resource) {mem>5000 rusage[sdevice_all=1]}
"License:sprocess_all License:sprocess3d_all"
"License:sprocess_all OR License:SK_sprocess_all"
"RAM/5000 License:sdevice_all"
If you have properly connected Accelerator and Monitor, and if Monitor is monitoring the Synopsys licenses, then the resources like License:sprocess_all are already known to Accelerator. If not, please see the Altair Accelerator documentation.
Configuring an Environment for SWB
It is convenient to have a VOV Named Environment to run SWB. As a starting point for such environment, look at the examples in $VOVDIR/etc/environments/SWB.*.
# Enter the environment for Synopsys TCAD Sentaurus Workbench
set vendorBase /tools/synopsys; # CHANGE THIS.
set version 2008.09; # CHANGE THIS.
setenv SNPSLMD_LICENSE_FILE 1720@pluto; # CHANGE THIS.
set appBase $vendorBase/swb
set licBase $vendorBase/license
# Optional argument is a different version.
if { [llength $argv] > 0 } {
set version [shift]
}
if {! [file isdirectory $appBase/$version] } {
VovUserError "SWB version not found: '$version'"
}
set versionBase $appBase/$version
# Add license binaries
switch -- $env(VOVARCH) {
sun5 - sun7 {
set arch sparcOS5
}
linux22 - linux - linux64 {
set arch linux
}
default {
VovWarning "No binary mapping for FT arch -- $env(VOVARCH)"
}
}
if { [info exists arch] } {
vovenv PATH : PREPEND $licBase/$arch/bin
}
setenv STROOT $versionBase
vovenv PATH : PREPEND $versionBase/bin
- You need to copy the SWB.* files from $VOVDIR/etc/environments to $VOVDIR/local/environments
- You need to customize the environments to fit your installation
The all important environment variable STDB, which points to the top of your SWB work area, has to be set on a case-by-case basis before starting SWB.
Configuring a queue in Altair Accelerator
In Altair Accelerator, the concept that corresponds to an "LSF queue" is the "jobclass". Following the example above, where the LSF queue is called "nc_swb", you need to create a jobclass with the same name, defined by the file vnc.swd/jobclass/nc_swb.tcl. An example is available in $VOVDIR/etc/jobclass/nc_swb.tcl.
File: nc_swb.tcl
###
### A jobclass for the jobs generated by SWB=Sentaurus WorkBench
###
############################## PROCEDURES
proc NC_SWB_extractLogFile {} {
global saveBsubArgv; # Which exists if the jobs is called with bsub -q nc_swb
set logFile ""
if { [info exists saveBsubArgv] } {
set fullCommand $saveBsubArgv
while { $fullCommand != {} } {
set a [shift fullCommand]
switch -- $a {
"-o" {
set logFile [shift fullCommand];
break;
}
default {}
}
}
} else {
global argv
global VOV_JOB_DESC
if { [info exists VOV_JOB_DESC(logfile)] } {
set logFile $VOV_JOB_DESC(logfile)
}
set scanArgs $argv
while { $scanArgs != {} } {
set a [shift scanArgs]
switch -- $a {
"-l" {
set logFile [shift scanArgs]
break;
}
}
}
}
return $logFile
}
############################## MAIN CODE
set classDescription "Sentaurus WorkBench Jobs"
# Use the snapshot for now, but we recommend to use
# a composite named environment.
set VOV_JOB_DESC(env) "SNAPSHOT"
# set VOV_JOB_DESC(env) "BASE+LSFEMUL+SWB"
#
# Guess the license resources based on the name of the log file.
#
set presumedLogFile [NC_SWB_extractLogFile]
### puts "XXXX '$presumedLogFile'"
switch -glob -- $presumedLogFile {
"*_des.job" { set VOV_JOB_DESC(resources) "License:sdevice_all" }
"*_dvs.job" { set VOV_JOB_DESC(resources) "License:sde_all" }
"*_fps.job" { set VOV_JOB_DESC(resources) "License:SK_sprocess2d_all" }
"*_ins.job" { set VOV_JOB_DESC(resources) "License:Inspect_all" }
"*_moc.job" { set VOV_JOB_DESC(resources) "License:sdevice-montecarlo_all" }
"*_msh.job" { set VOV_JOB_DESC(resources) "License:Mesh2D_all" }
"*_pof.job" { set VOV_JOB_DESC(resources) "License:Noffset-2D_all" }
"*_tec.job" { set VOV_JOB_DESC(resources) "License:Tecplot_all" }
default { set VOV_JOB_DESC(resources) "License:sde_all" }
}
append VOV_JOB_DESC(resources) " Limit:swb" ;# Limit for the whole job class.
append VOV_JOB_DESC(resources) " Limit:swb_@USER@" ;# Limit for the user in this job class.
##append VOV_JOB_DESC(resources) " x86_64 RAM/200"; ## Other hardware requirements.
#parray VOV_JOB_DESC
proc initJobClass {} {
vtk_resourcemap_set Limit:swb 100
vtk_resourcemap_set_limit Limit:swb_@USER@ 50
}
Customizing Altair Accelerator GUI
# Fragment of vnc.swd/gui.tcl
::VovGUI::addOutputTab "vnc_log" {/vnc_logs/[0-9]+/[0-9]+\.[0-9]+$} "+"
::VovGUI::addOutputTab "swb_job" {\.job$} "+"; ### ADD THIS LINE
Running SWB
% ves BASE+SWB+LSFEMUL
% setenv STDB `pwd`
% swb &
Troubleshooting
% setenv GSUB_ADVANCED_MODE 1
% setenv GSUB_ADVANCED_LOG_LSF 1
...
% cat glog.txt