#!/bin/bash
#SBATCH -J STAR-CCM-14.06.013-case
#SBATCH --partition=batch
#SBATCH --nodes=2
#SBATCH --tasks-per-node=20
#SBATCH --time=1-00:00:00

# set license server details
export CDLMD_LICENSE_FILE=1234@server

# Set environment appropriately
module load STAR-CCM/14.06.013

# Populate a hosts file per job
scontrol show hostname $SLURM_JOB_NODELIST > hosts_${SLURM_JOB_ID}

# Run star
starccm+ -batch -np ${SLURM_NTASKS} -rsh ssh -machinefile hosts_${SLURM_JOB_ID} *.sim
