|
[Sponsors] |
December 19, 2017, 11:17 |
How to use SLURM to run STAR-CCM+ simulation
|
#1 |
New Member
Join Date: Mar 2017
Posts: 15
Rep Power: 9 |
Hi,
I have a difficult problem which I hope someone would be so kind to help me out: I need to use SLURM to run a STAR-CCM+ simulation. But I don't know how. I tried to write a script by myself. But the job could be submitted but will immediately failed with ExitCode 2. Here is my script: #!/bin/bash #SBATCH --job-name 1218 #SBATCH --partition=DELL #SBATCH --nodes=4 #SBATCH --ntasks=28 #SBATCH -n 84 #SBATCH -output=1218.out #SBATCH -e error_flie.e #SBATCH -t 12:30:00 #SBATCH --mail-type=all #SBATCH --mail-user=abc@def.com module load starccm/12.02 module load mpi sim_file="1218.sim" STARTMACRO="/home/MYCASE/run.java" starccm+ 1999@abc.com -np 84 $1218.sim -batch $STARTMACRO -batch-report |
|
December 19, 2017, 14:39 |
|
#2 |
Member
Paul Hancock
Join Date: Mar 2009
Location: Bellingham, WA
Posts: 31
Rep Power: 17 |
Take a look in the STEVE-Portal. There is an article with a couple of script examples.
|
|
December 19, 2017, 15:15 |
|
#3 |
New Member
Join Date: Mar 2017
Posts: 15
Rep Power: 9 |
||
December 20, 2017, 13:22 |
|
#4 |
Senior Member
Join Date: Nov 2010
Location: USA
Posts: 1,232
Rep Power: 25 |
Please post the complete error the scheduler is writing out.
|
|
December 21, 2017, 11:29 |
|
#5 |
New Member
Join Date: Mar 2017
Posts: 15
Rep Power: 9 |
SLURM Job_id=56375 Name=1214 Failed, Run time 00:00:00, FAILED, ExitCode 2
|
|
December 21, 2017, 15:40 |
|
#6 |
New Member
Join Date: Mar 2017
Posts: 15
Rep Power: 9 |
||
December 22, 2017, 12:51 |
|
#7 |
New Member
Andre C
Join Date: Nov 2013
Posts: 9
Rep Power: 13 |
||
December 22, 2017, 13:03 |
|
#8 | |
New Member
Andre C
Join Date: Nov 2013
Posts: 9
Rep Power: 13 |
Quote:
#!/bin/sh #SBATCH --account= [your account] #SBATCH --time=20:00:00 #SBATCH --nodes=4 #SBATCH --ntasks-per-node=28 #SBATCH --mem-per-cpu=1990 #SBATCH --job-name= [job namr] #SBATCH --error=Job_Results_ERROR-%J.err #SBATCH --output=Job_Results.out #SBATCH --export CDLMD_LICENSE_FILE = [1999@ your license] export CDLMD_LICENSE_FILE=[1999@ your license] ## Simulation File: ====> Source STARSOURCEFILE=[simulation name.sim] ## SLURM: ====> Job Node List (DO NOT MODIFY) echo "Slurm nodes assigned :$SLURM_JOB_NODELIST" echo "SLURM_JOBID="$SLURM_JOBID echo "SLURM_JOB_NODELIST"=$SLURM_JOB_NODELIST echo "SLURM_NNODES"=$SLURM_NNODES echo "SLURMTMPDIR="$SLURMTMPDIR echo "working directory = "$SLURM_SUBMIT_DIR echo "SLURM_NTASKS="$SLURM_NTASKS ## Modules: ====> Loading desired mudule (DO NOT MODIFY) module load starccm/starccm-10.02.012 ## Working Directory: ====> Job Node List (DO NOT MODIFY) cd $SLURM_SUBMIT_DIR scontrol show hostname $SLURM_NODELIST | tr 'ec' 'ic'> machinefile_${SLURM_JOB_ID} starccm+ -batch -np $SLURM_NTASKS -rsh ssh -machinefile machinefile_${SLURM_JOB_ID} -power $STARSOURCEFILE &>> job_$SLURM_JOB_ID.log sleep 3 ##rm $hostfile echo "Run Finished" >> job_$SLURM_JOB_ID.log Last edited by spartan42; December 25, 2017 at 12:30. |
||
December 23, 2017, 11:08 |
|
#9 | |
New Member
Join Date: Mar 2017
Posts: 15
Rep Power: 9 |
Quote:
Merry Christmas! Last edited by calmdown911; December 25, 2017 at 12:39. |
||
December 23, 2017, 15:36 |
|
#10 |
New Member
Join Date: Mar 2017
Posts: 15
Rep Power: 9 |
||
December 23, 2017, 15:39 |
|
#11 |
New Member
Andre C
Join Date: Nov 2013
Posts: 9
Rep Power: 13 |
tmas to you as well!
|
|
December 23, 2017, 15:41 |
|
#12 |
New Member
Andre C
Join Date: Nov 2013
Posts: 9
Rep Power: 13 |
||
December 24, 2017, 12:53 |
|
#13 | |
New Member
Join Date: Mar 2017
Posts: 15
Rep Power: 9 |
Quote:
I tried your scripts and got the error as below: ModuleCmd_Load.c(213):ERROR:105: Unable to locate a modulefile for 'starccm' What shall I do for this kind of error? Thank you so much for your help! |
||
December 24, 2017, 13:01 |
|
#14 | |
New Member
Andre C
Join Date: Nov 2013
Posts: 9
Rep Power: 13 |
Quote:
I imagine your using some sort of command/ or putty. Correct? In the command promp you can type [module avail] and it should populate a list with all the available modules on the server. From there you can search for the starccm module and replace the red part with yours ## Modules: ====> Loading desired mudule (DO NOT MODIFY) module load starccm/starccm-10.02.012 Last edited by spartan42; December 24, 2017 at 13:04. Reason: Wrong command: |
||
December 25, 2017, 10:40 |
|
#15 | |
New Member
Join Date: Mar 2017
Posts: 15
Rep Power: 9 |
Quote:
It seems I finally got the simulation running on our cluster. Yet I came across another problem. I activated autosave when I built the case. Yet I cannot get the calculation result. The case file is exactly same before and after the calculation. The residual is recorded in the output file. Yet the result seems lost. What shall I do to get the calculation result from SLURM? |
||
December 25, 2017, 10:55 |
|
#16 | |
New Member
Andre C
Join Date: Nov 2013
Posts: 9
Rep Power: 13 |
Quote:
This is what I got: You set auto save every x amount of iterations? But its not saving the new sim file correct? You are getting the residuals from the output file because they are the only active reports in your simulation. If you create other reports and graphs you will see those results in the output file. When it comes to simulation saving/ - you need to set up the autosave for every x iteration - might be not set up correctly and that is why your not seeing anything. If you getting residuals it means the simulation is running. Maybe take a snip of your autosave setting so i can look at it. |
||
December 25, 2017, 12:42 |
|
#17 | |
New Member
Join Date: Mar 2017
Posts: 15
Rep Power: 9 |
Quote:
|
||
July 1, 2020, 05:18 |
|
#18 |
Senior Member
MA
Join Date: Mar 2020
Posts: 163
Rep Power: 6 |
||
July 11, 2020, 20:34 |
|
#19 |
New Member
Erik Lönroth
Join Date: Jul 2020
Location: Sweden
Posts: 3
Rep Power: 6 |
Perhaps this could be of help for you aswell https://eriklonroth.com/2020/07/11/r...nd-infiniband/
|
|
August 8, 2020, 09:22 |
|
#20 |
Senior Member
Sebastian Engel
Join Date: Jun 2011
Location: Germany
Posts: 567
Rep Power: 21 |
If you have a cluster with time limits for jobs, you might like my script https://wikis.ovgu.de/lss/doku.php?i...rccm#variant_1
It tells slurm to send a signal, when a job is about to reach its time limit. The above script traps that signal and will write an ABORT file into the work directory. That way, starccm can stop gracefully. The advantage with this method is you will not lose the computation since your last (auto)save. As long as you have an active stop file stopping criterion this methods will work with macro-based runs as well as command-style runs. Anyhow, this script contains some lines which are specific to my university's cluster. This includes the compute node's resources, name of queues, work directories, availability and names of modules, custom prolog and epilog scripts, and mpi settings. Of course, you need to adapt these information to your system. |
|
Tags |
clusters, mpi, slurm, star-ccm+ |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Marine Propeller Hydroacoustic Simulation in Star CCM | BlackEagle | STAR-CCM+ | 1 | December 8, 2017 22:33 |
abaqus star ccm co simulation | Mustafalboro | STAR-CCM+ | 0 | July 25, 2017 17:13 |
Run STAR CCM+ with -power by default | Jorgror | STAR-CCM+ | 2 | February 16, 2016 09:46 |
Thermal Comfort Simulation in STAR CCM+ | anupmu | STAR-CCM+ | 1 | February 27, 2013 15:25 |
Procedure to run unsteady simulation? | STN | Main CFD Forum | 2 | February 16, 2002 05:37 |