CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   Slurm Bash Script for STAR-CCM+ (https://www.cfd-online.com/Forums/main/236560-slurm-bash-script-star-ccm.html)

Jonathan_DS June 4, 2021 10:50

Slurm Bash Script for STAR-CCM+
 
Hi,

I currently need help writing a simple bash script to submit my STAR-CCM+ sim file via slurm. I have written a simple script but after about 10s from submitting my job, my job disappears from the job queue. The script is given below:

#!/bin/bash
#SBATCH --nodes=1
#SBATCH --ntasks=16
#SBATCH --mem=32000MB
#SBATCH --time=12:00:00
#SBATCH --job-name=StarCCM
#SBATCH --partition=medium
#SBATCH --workdir="/home/username/work"

module load star-ccm+

starccm+ -batch -power -podkey BI8J2TM8oU/FinQk2tpNvw -licpath 1999@flex.cd-adapco.com -np 16 $SLURM_SUBMIT_DIR/filename.sim > $SLURM_SUBMIT_DIR/output


Note that the largest values for ntasks possible is 16 and for mem, it is 32GB, on my college HPC cluster. The version of STAR-CCM+ available is star-ccm+/14.04.011-R8. I have tried putting this after the "module load" command but with no success.

Are there any recommendations as to how I could fix this bash script?

JBeilke June 6, 2021 15:02

You have to specify the java-file with the commands for this run atfer the "-batch" option.



My "batchrun.java" looks like this (with some code removed):



Code:

// STAR-CCM+ macro: batchrun.java
package macro;

import java.io.File;
import static java.lang.Math.abs;
import java.util.*;
import star.common.*;
import star.base.neo.*;
import star.base.report.*;
import star.vis.*;

public class batchrun extends StarMacro {
  public void execute() {

    Simulation simulation_0 = getActiveSimulation();
    simulation_0.getSimulationIterator().run();
    simulation_0.saveState(simulation_0.getPresentationName() + ".sim");


  }
}



All times are GMT -4. The time now is 22:08.