3. Speos HPC on Windows

After ensuring that the cluster meets the system prerequisites for distributed computing, and that Speos HPC installation is complete, proceed to the configuration of the Speos HPC cluster environment.


Note:  The cluster must be configured by an Information Technician.


3.1. Speos HPC on Windows using SPEOS Core

To run your simulation in a Windows environment using the SPEOS Core interface:

  1. Configure script files to be stored in a shared folder on the cluster. These script files will be used as template for SPEOS Core users.

  2. Launch SPEOS Core and configure the cluster parameters  . For more information, see Accessing the Windows HPC Cluster in the Speos HPC User’s Guide.

3.1.1. Configuring the Script Files

To use the Speos HPC interface, you need to provide the six following simulation script templates:

  • 1 script to check the simulation: CheckMySimulation

  • 1 script to run the simulation: RunMySimulation

  • 1 script to submit the CheckMySimulation script to the scheduler: SubmitCheckMySimulation

  • 1 script to submit the RunMySimulation script to the scheduler: SubmitRunMySimulation

  • 1 script to control the running simulation or the simulation being checked: RunCommandMySimulation

  • 1 script to cancel the simulation job: CancelMySimulation

    The scripts contain variables among the provided list that are automatically replaced by the parameters defined in the Speos HPC interface.

These six scripts are unique for each cluster and must be created once. They must be placed in a shared folder with reading, writing and execute access rights to all computers and users on the domain.

CheckMySimulation.bat

In this script change the "SchedulerName".

echo off
chcp 65001
job submit /scheduler:"SchedulerName" /jobtemplate:default /jobname:CheckSimulation /stdout:"$(FILE_OUTPUT)" /stderr:"$(FILE_ERROR)" /numnodes:1 mpiexec -genvlist CCP_CLUSTER_NAME,CCP_JOBID -n 1 "$(SPEOSHPC_EXE)" -sv5 "$(SV5PATH)" -check $(LANG)
	
if %ERRORLEVEL% NEQ 0 (
	echo Submission error - error code %ERRORLEVEL%
	echo > "$(FILE_CHECKKO)"
	)
RunMySimulation

In this script change the "SchedulerName", "ServerName"


Note:  If you want to run a simulation using the GPU of the cluster, you can add the -gpu command line as shown in the script below. The -gpu command line is in BETA mode for the 2022 R2 release.


echo off
chcp 65001
job submit /scheduler:"SchedulerName" /jobtemplate:default /jobname:"$(JOBNAME)" /stdout:"$(FILE_OUTPUT)" /stderr:"$(FILE_ERROR)" /numnodes:$(NODES)/env:ANSYSLMD_LICENSE_FILE=1055@ServerName  mpiexec -genvlist CCP_CLUSTER_NAME,CCP_JOBID,ANSYSLMD_LICENSE_FILE -hosts %%CCP_NODES%% "$(SPEOSHPC_EXE)" -sv5 "$(SV5PATH)" $(PARAM) $(LANG) -gpu

if %ERRORLEVEL% NEQ 0 (
	echo Submission error - error code %ERRORLEVEL%
	echo > "$(FILE_RUNKO)"
	)
SubmitCheckMySimulation
echo off
chcp 65001
"$(PATH_CHECK_SCRIPT)" > $(JOB_ID_PATH)
SubmitRunMySimulation
echo off
chcp 65001
"$(PATH_RUN_SCRIPT)" > $(JOB_ID_PATH)
RunCommandMySimulation
echo off
chcp 65001
"$(SPEOSHPC_EXE)" -sv5 "$(SV5PATH)" $(SPEOSHPC_CMD)
CancelMySimulation

In this script change the "SchedulerName". CancelMySimulation script is only used to cancel a pending or a starting job.

echo off
chcp 65001
job cancel $(JOB_ID) /scheduler:"SchedulerName"

3.1.2. Speos HPC Variables

The table presents the variables you can use to create the simulation script templates.

Table 6: List of Variables

Variable

Description

Can be used in...

$(SPEOSHPC_EXE)

Full path to Speos HPC executable.

CheckMySimulation RunMySimulation RunCommandMySimulation

$(SV5PATH)

Full path to the exported simulation system.

CheckMySimulation RunMySimulation RunCommandMySimulation

$(FILE_OUTPUT)

Full path to the output file of scheduler.

CheckMySimulation RunMySimulation

$(FILE_ERROR)

Full path to the error file of scheduler.

CheckMySimulation RunMySimulation

$(FILE_CHECKKO)

Full path to the file named CHECKKO.

CheckMySimulation

$(FILE_RUNKO)

Full path to the file named RUNKO.

RunMySimulation

$(LANG)

String corresponding to code page converter.

CheckMySimulation RunMySimulation

$(JOBNAME)

Job name.

RunMySimulation

$(JOB_ID)

Job identifier.

CancelMySimulation

$(JOB_ID_PATH)

File path that will contain the job ID at the submitting time.

SubmitCheckMySimulation SubmitRunMySimulation

$(NODES)

Number of nodes used by simulation.

RunMySimulation

$(WALLCLOCK)

Maximum job time.

RunMySimulation

$(PARAM)

String containing simulation parameters.

RunMySimulation

$(SPEOSHPC_CMD)

Control command options (-merge, -stop 1, ...).

RunCommandMySimulation

$(PATH_CHECK_SCRIPT)

Full path to check script.

SubmitCheckMySimulation

$(PATH_RUN_SCRIPT)

Full path to run script.

SubmitRunMySimulation

$(MAIL_ADDRESS)

User email address.

SubmitCheckMySimulation SubmitRunMySimulation


3.2. Speos HPC on Windows using Scripts

To run a simulation in a Windows environment using scripts and command lines:

  1. Make sure Speos HPC installation is complete for both the client station and the cluster environment.

  2. Connect to the cluster using a job scheduler.