CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Multi job OpenFoam (https://www.cfd-online.com/Forums/openfoam-solving/117695-multi-job-openfoam.html)

gregjunqua May 13, 2013 19:34

Multi job OpenFoam
 
Hi there,
My problem is simple, I am doing the same experiment with different grid. I wanna know if there is a way to launch the different experiments one after one with one, with a script how will directly start the other job after the end of one simulation.

Thank you for your answers
-----------------------------------------------------------
Sorry i found some leads just after post the message there i will try it
http://www.cfd-online.com/Forums/ope...scheduler.html

Henning86 May 14, 2013 04:49

just put this skript in the folder where all the folders with the simulation are and modify it. Skripting with linux is pretty easy just use the commands you normally type in the console



Code:

#!/bin/bash
 
for file in N400 ; do
    if [ -d "$file" ] ; then
      cd "$file";
 for file2 in TriQuad ; do
  if [ -d "$file2" ] ; then
        cd "$file2";
    echo "Starte Rechnung fuer den Ordner $file $file2"       
      mpirun -np 12 rhoCentralFoam -parallel > ${file2}Calc.log;
      reconstructPar > ${file2}reCon.log;
      Mach > ${file2}Mach.log;
    echo "$file $file2"
    cd ..;
    fi
      done
      cd ..;
    fi
done


gregjunqua May 14, 2013 21:47

Hi, Thank you for your contrubution,
I use a simple script for now no time to do further for me ;)

Quote:


blockMesh
decomposePar
mpirun -np 2 simpleFoam -parallel
reconstructPar
rm -r processor*

cd ..
cd job2


All times are GMT -4. The time now is 11:40.