Cancel
Showing results for 
Search instead for 
Did you mean: 

NX Nastran command 'After' available on windows?

Gears Phenom Gears Phenom
Gears Phenom

I am running NX nastran (10) on a windows plaform and seeking confirmation that the 'after' command is avaialble (on such platform). I need/would like to queue jobs but my test was unsuccesful

 

Thanks

Regards

Production: NX.CAE 9.0.3.4, NX.CAE 10.0.2.6
Development: VB.NET (amateur level !)
15 REPLIES

Re: NX Nastran command 'After' available on windows?

Siemens Phenom Siemens Phenom
Siemens Phenom

Re: NX Nastran command 'After' available on windows?

Gears Phenom Gears Phenom
Gears Phenom

Thanks JimB. I was reading the QRG. So is there anyway of queuing job in Windows? does one need a 1/3 party tool?

Production: NX.CAE 9.0.3.4, NX.CAE 10.0.2.6
Development: VB.NET (amateur level !)

Re: NX Nastran command 'After' available on windows?

Siemens Phenom Siemens Phenom
Siemens Phenom

Just create a .bat file of the command lines to launch each job, i.e.:

 

set NXN_EXE="D:\NXN11\bin\nastran.exe"

set NXN_MEM=6GB
set NXN_SMP=2

set NXN_ARGS=mem=%NXN_MEM% smp=%NXN_SMP%

%NXN_EXE% run1.dat %NXN_ARGS%
%NXN_EXE% run2.dat %NXN_ARGS%
%NXN_EXE% run3.dat %NXN_ARGS%
%NXN_EXE% run4.dat %NXN_ARGS%

 

The native behavior of the Windows batch file execution is to wait for each line to complete before processing the next line, so the 4 jobs shown above would be run sequentially, not concurrently.

Re: NX Nastran command 'After' available on windows?

Gears Phenom Gears Phenom
Gears Phenom

Thanks. Will look into that then

Production: NX.CAE 9.0.3.4, NX.CAE 10.0.2.6
Development: VB.NET (amateur level !)

Re: NX Nastran command 'After' available on windows?

Legend
Legend

I concur with Dr B (cool rapper name BTW, Jim Smiley Very Happy ), we do that every night before going home.  We use a slightly different syntax, but otherwise identical method, Windows' good enough...

 

You could also try to use the task scheduler and start jobs at a particular time like that:

schtasks create /RU username /RP password /SC schedule_frequency /MO Schedule_modifier /D days /M months /TN taskname /TR Task_command /ST start_time /SD start_day /ED end_date

 

Or, if you want to be part of the cool kids, get ahold of VisQ (from FEMAP) or QMan (from I-DEAS) and setup a queue.  VisQ/Qman has enough options to do what you want, and many other solvers can be used (Abaqus, MSC Nastran, TMG, ...).

Re: NX Nastran command 'After' available on windows?

Pioneer
Pioneer

I use a bat file in windows, and you can use the timeout command to delay the start. For instance, this bat file delays the start by 8hrs (8*60*60=28800sec). The %1, %2..%9 allow up to 9 nastran files to be dragged and dropped onto the bat filename to submit the jobs. They run sequentially.

 

TIMEOUT /T 28800 /NOBREAK
"C:\Program Files\Siemens\FEMAPv114\nastran\nxn11p01\em64tntL\nastran.exe" %1 news=no scr=yes
"C:\Program Files\Siemens\FEMAPv114\nastran\nxn11p01\em64tntL\nastran.exe" %2 news=no scr=yes
"C:\Program Files\Siemens\FEMAPv114\nastran\nxn11p01\em64tntL\nastran.exe" %3 news=no scr=yes
"C:\Program Files\Siemens\FEMAPv114\nastran\nxn11p01\em64tntL\nastran.exe" %4 news=no scr=yes
"C:\Program Files\Siemens\FEMAPv114\nastran\nxn11p01\em64tntL\nastran.exe" %5 news=no scr=yes
"C:\Program Files\Siemens\FEMAPv114\nastran\nxn11p01\em64tntL\nastran.exe" %6 news=no scr=yes
"C:\Program Files\Siemens\FEMAPv114\nastran\nxn11p01\em64tntL\nastran.exe" %7 news=no scr=yes
"C:\Program Files\Siemens\FEMAPv114\nastran\nxn11p01\em64tntL\nastran.exe" %8 news=no scr=yes
"C:\Program Files\Siemens\FEMAPv114\nastran\nxn11p01\em64tntL\nastran.exe" %9 news=no scr=yes

Re: NX Nastran command 'After' available on windows?

Gears Phenom Gears Phenom
Gears Phenom

thanks for the tip.

in the example does it mean that every job is delayed by 8hrs?

Production: NX.CAE 9.0.3.4, NX.CAE 10.0.2.6
Development: VB.NET (amateur level !)

Re: NX Nastran command 'After' available on windows?

Pioneer
Pioneer

No, the list of jobs submitted will only start after the initial timeout delay.

You would need to put a timeout delay between every nastran comand in order to delay the the start of each job.

The instructions in the bat file are executed in sequence as each one is completed.

Re: NX Nastran command 'After' available on windows?

Gears Phenom Gears Phenom
Gears Phenom

Just tried on a dummy very small model. The 1st script provided waits for a job to finish before starting a new one. This one only delays the job by the amount specified. So if you have large job one need to get a good estimate  for the delay otherwise a job starts and fails as it cannot get the lience

 

set NXN_EXE="D:\NXNASTRAN10\bin\nastran64Lw.exe"

TIMEOUT /T 10 /NOBREAK
%NXN_EXE% %1 news=no scr=yes mem=est
%NXN_EXE% %2 news=no scr=yes mem=est
%NXN_EXE% %3 news=no scr=yes mem=est
Production: NX.CAE 9.0.3.4, NX.CAE 10.0.2.6
Development: VB.NET (amateur level !)