This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
howto:openfoam [2026/02/24 10:44] ccrosby |
howto:openfoam [2026/02/24 13:03] (current) ccrosby [Latest version: OpenFOAM-v2512] |
||
|---|---|---|---|
| Line 5: | Line 5: | ||
| - [[openfoam# | - [[openfoam# | ||
| - [[howto: | - [[howto: | ||
| + | |||
| + | ====== Latest version: OpenFOAM-v2512 ====== | ||
| + | The most recent available version is OpenFOAM-v2512. | ||
| + | |||
| + | <file bash runFoam2512.qsub> | ||
| + | # | ||
| + | ### This 72-way example calls | ||
| + | ### for 3 (virtual) nodes, each with 24 processor cores | ||
| + | ### Please note that it is necessary to specify both ncpus and mpiprocs, and | ||
| + | ### for OpenFOAM these should be identical to each other. | ||
| + | ### For your own benefit, try to estimate a realistic walltime request. | ||
| + | ### wallclock requirement interferes with efficient scheduling, will delay the launch of the job, | ||
| + | ### and ties up more of your CPU-time allocation untill the job has finished. | ||
| + | #PBS -P projectid | ||
| + | #PBS -l select=3: | ||
| + | #PBS -q normal | ||
| + | #PBS -l walltime=01: | ||
| + | #PBS -o / | ||
| + | #PBS -e / | ||
| + | ### Source the openFOAM environment: | ||
| + | . / | ||
| + | # Set this environment variable explicitly. | ||
| + | export PBS_JOBDIR=/ | ||
| + | # Explicitly change to the job directory | ||
| + | cd $PBS_JOBDIR | ||
| + | # Count the number of lines in the hosts file to get the number of processors | ||
| + | nproc=`cat $PBS_NODEFILE | wc -l ` | ||
| + | #### These next statements build an appropriate decomposeParDict file | ||
| + | #### based on the requested nunber of processors | ||
| + | echo " | ||
| + | echo " | ||
| + | echo " | ||
| + | echo " | ||
| + | echo " | ||
| + | echo " | ||
| + | echo " | ||
| + | echo " | ||
| + | echo " | ||
| + | #### End of decomposeParDict file | ||
| + | # Decompose the case into processor directories | ||
| + | decomposePar -force > decompose.out | ||
| + | # Run the solver, simpleFoam in this case | ||
| + | mpirun -np $nproc simpleFoam -parallel > simpleFoam.out | ||
| + | # Reconstruct the time directories from the processor directories | ||
| + | reconstructPar > reconstruct.out | ||
| + | # Clean up the processor directories | ||
| + | rm -r processor* | ||
| + | </ | ||
| ====== Warning: mpirun parameters changed ====== | ====== Warning: mpirun parameters changed ====== | ||