General Job Submission Script Requirements

When running a design study, the Design Manager server passes specific instructions to each design simulation. These instructions are communicated via files that are written to the temporary directory .mdxruntime that is located in the same directory as the project artifact directory. When a design simulation is submitted to the HPC Job Manager, the Design Manager server executes the user job submission script in the temporary directory .mdxruntime\$project\$study\$design. The .mdxruntime\$project\$study\$design directory contains all the files that Design Manager requires to execute the design simulation.

The Design Manager server does not interact with the HPC Job Manager on your cluster. For this reason, in the job submission script, you must read the following files from .mdxruntime\$project\$study\$design and redirect them to the Design Manager server:

  • dm_design_execute_options.txt

    This file contains additional command line options, such as license details, and other options that you define in the design study settings.

  • dm_design_output_info.msg

    This file contains the name of the log file that Design Manager expects to be available when the design simulation executes.

Design Manager automatically changes to the job working directory to read these two files.

Example

The following script code shows an example of a Windows Batch Script (*.bat) for general job submission:

@echo off 

REM Design Manager definitions
REM ----------------------------------
REM dm_design_execute_options.txt contains starccm+ command line arguments.
REM dm_design_output_info.msg contains log output file name to dump.
set /p STARTCASE=< dm_design_execute_options.txt 
set /p CASELOG=< dm_design_output_info.msg 

REM Set STAR-CCM+ installation directory
REM ---------------------------------- 
REM For [STAR-CCM+_INSTALL_DIR], set the full network path (UNC) to the STAR-CCM+ installation directory on the cluster
set STARCCMHOME=[STAR-CCM+_INSTALL_DIR]

REM Log node information to the design log
REM ---------------------------------- 
echo Job nodes: %CCP_NODES% >> %CASELOG%

REM Call STAR-CCM+
REM ---------------------------------- 
%STARCCMHOME%\star\bin\starccm+ -mpi ms -np %CCP_NUMCPUS% %STARTCASE% >> %CASELOG%

The script code checks for the files dm_design_execute_options.txt and dm_design_output_info.msg and assigns the content to the following independent variables:

  • STARTCASE—contains the additional command line options
  • CASELOG—contains the name of the log file

These two variables are then used when calling Simcenter STAR-CCM+ at the end of the script, where:

  • -mpi ms allows you to run design simulations across multiple nodes using Microsoft MPI.
  • -np %CCP_NUMCPUS% specifies the number of cores to run with each design simulation. %CCP_NUMCPUS% automatically detects the number of cores from the Job Submit Command property.