HyperStudy

Sample Script: Running Solvers Using PBS Professional on Unix

Sample Script: Running Solvers Using PBS Professional on Unix

Previous topic Next topic No expanding text in this topic  

Sample Script: Running Solvers Using PBS Professional on Unix

Previous topic Next topic JavaScript is required for expanding text JavaScript is required for the print function  

The following is a sample script to run a solver using PBS Professional on Unix. The sample file is set up for running LS-DYNA.

The script contains a ‘wait loop,’ which makes sure that the optimization process stops until the solver has completely finished. This is necessary for an optimization study where all analyses must be performed in sequence. The wait loop can be omitted when performing a DOE study. This allows for multiple analyses to be carried out in parallel, with the network queuing system controlling the allocation of resources. The wait loop is checking for the existence of the .pbslock file. Its disappearance signals the end of the solution process.

If another solver or queuing system is used, the script needs to be changed accordingly.

 

#!/bin/sh

#################################################

# Script to run pbs-submit from HyperStudy

#################################################

cd $HOME/$2;

pbs-submit -c dyna -v 970_5434asingle_smp -m 300 -i $1

#################################################

# Don't return until the job completes.

# Monitor the existence of the .pbslock file

#################################################

echo "Waiting for job to complete...";

while [ -f .pbslock ]

do

continue;

done;

echo "Job completed. Returning to HyperStudy"

#################################################