Pre-Allocation Submission Script Requirements

In pre-allocation mode, you submit the entire Design Manager project as a single job to the cluster queue.

Within the allocated resources, a Resource Manager provides the actual resource management functionality. Resource Manager keeps track of the design simulations that are launched as part of the job and the compute resources assigned to them. Resource Manager organizes the resources for the Design Manager project, provides an interface for launching the design simulations, and makes sure that together with the design simulations the overall job does not exceed the allocated resources.

To submit a Design Manager project in pre-allocation mode, you must explicitly launch Resource Manager in the submission script using the following command:

starlaunch --command <batch_command> --slots 0 --batchsystem <system>

where:

  • starlaunch launches Resource Manager.
  • --command <batch_command> specifies the starccm+ command that runs the Design Manager project in batch.
  • --slots 0 prevents the Resource Manager process from allocating cores.
  • --batchsystem <system> specifies the batch management system on your cluster.

For more information, see Resource Manager Options.

Batch management systems are responsible for the allocation of jobs based on the requested resources. Currently, the following systems are supported:

  • PBS (<system>=pbs)
  • LSF (<system>=lsf)
  • SLURM (<system>=slurm)
  • Sun Grid Engine (<system>=sge)

For more information, see Using Batch Management Systems.

Example:

The examples scripts in this topic are written for tcsh (Tenex-C-Shell). For other Unix shells, such as bash, you must modify the script accordingly.

The following example shows a pre-allocation submission script for running a Design Manager project on a cluster using the batch management system PBS:

#!/bin/tcsh -f

set PRDIR=[PROJECT_ROOT_DIR]       #[PROJECT_ROOT_DIR]: set path to your project root directory on the cluster
set STARTCASE=[PROJECT].dmprj      #[PROJECT]: set name of your Design Manager project file
set CASELOG=output.log

set STARCCMHOME=[STAR-CCM+_INSTALL_DIR] #[STAR-CCM+_INSTALL_DIR]: set absolute path to the STAR-CCM+ installation directory on the cluster

# Call Job Manager
# ----------------------------------
$STARCCMHOME/star/bin/starlaunch \
  --command "$STARCCMHOME/star/bin/starccm+ -rsh ssh -batch run $PRDIR/$STARTCASE [-passtodesign <options>]" \
  --slots 0 \
  --batchsystem pbs \
  >>& $CASELOG
NoteFor LSF and SLURM batch management systems, you only modify the <system> variable in the script above.

If your cluster uses the Sun Grid Engine batch management system and requires that you set the full path to ssh, you must specify this path for both starccm+ and starlaunch:

#!/bin/tcsh -f

set PRDIR=[PROJECT_ROOT_DIR]       #[PROJECT_ROOT_DIR]: set path to your project root directory on the cluster
set STARTCASE=[PROJECT].dmprj      #[PROJECT]: set name of your Design Manager project file
set CASELOG=output.log

set STARCCMHOME=[STAR-CCM+_INSTALL_DIR] #[STAR-CCM+_INSTALL_DIR]: set absolute path to the STAR-CCM+ installation directory on the cluster

# Call Job Manager
# ----------------------------------
$STARCCMHOME/star/bin/starlaunch --rsh /usr/bin/ssh \
  --command "$STARCCMHOME/star/bin/starccm+ -rsh /usr/bin/ssh -batch run $PRDIR/$STARTCASE [-passtodesign <options>]" \
  --slots 0 \
  --batchsystem sge \
  >>& $CASELOG

-passtodesign <options> allows you to pass additional Simcenter STAR-CCM+ simulation command line options, such as license options, to the design simulations. Passing command line options directly from the command line is useful for machine-specific or user-specific options that you do not want to save within your Design Manager project file (see Running on a Cluster Using Pre-Allocation, step 2b). However, command line options that require double quotes are not supported—you must set these options in the STAR-CCM+ Execution Command property. For more information, see Design Manager Options.