ISV engineering's HPC web log For HPC ISVs & OSS

Friday Jan 30, 2009

Continuing from my first blog in this series on integrating "Sun Grid Engine and MD Nastran" I would now like to describe how to submit MD Nastran (serial) jobs to SGE. In subsequent blogs I'll explain how I configured the SGE queues referenced below. 
 
To begin, MD Nastran is typically submitted from a command line interface.  This interface already has some built-in "job queuing" features that allow the Sun Grid Engine to interface easily with Nastran.
 
This built-in "job queuing" feature of Nastran allows Sun Grid Engine users to define their own keywords--this provides users the ability to customize the Nastran job submittal for use with SGE.
 
Here's a brief overview of how this works:
When the “queue” keyword is specified on a Nastran job submittal command line, the user can then "define" a corresponding “submit”  keyword in a Nastran configuration file (called an RC file). The "submit" keyword consists of a list of queue names (queue_list) followed by the command definition for the queues.  The “submit” keyword  defines the command used to run a job when a “queue” keyword is specified that matches a queue name in the submit keyword’s queue_list. The command_definition for this "submit" keyword can contain keyword names enclosed in percent “%” signs that are replaced with the value of the keyword before the command is run.  You can learn more about this at:  http://www.mscsoftware.com/support/prod_support/mdnastran/cog.pdf
So, here's what you would do to run a Nastran job using SGE and the command line features available within the Nastran job submittal scripts. 

 

Step #1. Create an MD Nastran "configuration file" sge_rc--referred to as an "RC file":
#cat sge_rc
scr=yes
bat=no
app=no
submit=small.q,medium.q,large.q=qsub  -q %queue%  -l nastran_tokens=%qoption% -l   export_size=10G -S /bin/ksh  %job% 

The above "submit=" line defines the following:
1. Three SGE queues configured for Nastran (small.q, medium.q, and large.q) {I'll show how I configured these Nastran queues in a later blog}
2. "qsub" is the SGE command that will be used to submit the Nastran jobs to SGE.
3. "-q  %queue%" is the SGE keyword that specifies which SGE queue to use, where %queue% will be replaced by the "queue=" value specified by the user on the Nastran command line (see Nastran command line below: "queue=small.q")
4. "-l nastran_tokens=%options% -l export_size=10G" defines the "complex resource attributes" that I configured within SGE.  I'll explain how I created these in a later blog, but basically they allow the user to define the number of Nastran license tokens that are required to run this job and also the required amount of disk space (10GB in this case) for the Nastran database files---if either of these requirements (tokens or disk space) is not met the jobs will not be dispatched.   

 

Step #2.  Create a Nastran submittal script with the necessary SGE keywords:
#cat nastran.sh 
MDNAST2008=/msc/nastran/bin/mdnast2008 
$MDNAST2008 v10101.dat  queue=small.q rcf=sge_rc qoption=`token_estimate.sh`    

 
The above MDNAST2008 command defines the following:
1. "queue=" specifies which SGE queue to use--in this example it's small.q
2. "qoption=" is a special Nastran keyword that allows you specify your own job submission parameters for SGE (in this case the RC file (sge_rc), defined above, will have the parameter %qoption% replaced by the value returned from the script `token_estimate.sh`). {I'll explain in a later blog how this particular script `token_estimate.sh`  calculates the number of license tokens required for this job.}
 
The above RC file (sge_rc) and Nastran submittal script (nastran.sh) will allow you to submit Nastran (serial) jobs to SGE.  
In my next blog I'll describe how to submit DMP (distributed parallel) MD Nastran jobs.  
Comments:

the best site for searching the jobs

Posted by qaiser on November 04, 2009 at 08:55 AM PST #

Post a Comment:
  • HTML Syntax: NOT allowed