This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
howto:palabos [2022/05/13 10:16] ccrosby [Instructions] |
howto:palabos [2022/05/13 14:59] (current) ccrosby [Instructions] |
||
|---|---|---|---|
| Line 35: | Line 35: | ||
| </ | </ | ||
| - | The next step is to compile the code. This must be run as a job with the below script. Note that the OpenFOAM environment is invoked as it contains all the dependencies for Palabos apart from cmake. | + | The next step is to compile the code. This can be run as a job with the script |
| + | - Get into the right directory | ||
| + | - Source the OpenFOAM environment | ||
| + | - Load the cmake module | ||
| + | - Run '' | ||
| + | - Run '' | ||
| + | === Compile script === | ||
| + | <file bash PalabosCompile.pbs> | ||
| + | # | ||
| + | #PBS -P projectcode | ||
| + | #PBS -l select=1: | ||
| + | #PBS -q smp | ||
| + | #PBS -l walltime=01: | ||
| + | #PBS -o / | ||
| + | #PBS -e / | ||
| + | #PBS -m abe | ||
| + | #PBS -M username@email.com | ||
| + | ### Source the openFOAM environment (palabos needs this for the dependencies): | ||
| + | . / | ||
| + | ### load the cmake module | ||
| + | module add chpc/ | ||
| + | ##### Running commands | ||
| + | # Set this environment variable explicitly. | ||
| + | export PBS_JOBDIR=/ | ||
| + | # Explicitly change to the job directory | ||
| + | cd $PBS_JOBDIR | ||
| + | cmake .. > cmake.out | ||
| + | make > make.out | ||
| + | </ | ||
| + | |||
| + | === Running the example case === | ||
| + | To run the example you must change back one directory level to this directory: < | ||
| + | |||
| + | If you have not run this example before, first uncompress the geometry file: | ||
| + | < | ||
| + | If your OpenFOAM environment is still valid, you can run your aneurysm example on a single node with the following instruction: | ||
| + | |||
| + | < | ||
| + | |||
| + | To run the code as a PBS batch job over several nodes, you can use this script: | ||
| + | |||
| + | <file bash runPalabos.qsub> | ||
| + | # | ||
| + | #PBS -P projectcode | ||
| + | #PBS -l select=5: | ||
| + | #PBS -q normal | ||
| + | #PBS -l walltime=4: | ||
| + | #PBS -o / | ||
| + | #PBS -e / | ||
| + | #PBS -m abe | ||
| + | #PBS -M username@email.com | ||
| + | ### Source the openFOAM environment (palabos needs this for the dependencies): | ||
| + | . / | ||
| + | ### load the cmake module | ||
| + | module add chpc/ | ||
| + | ##### Running commands | ||
| + | # Set this environment variable explicitly. | ||
| + | export PBS_JOBDIR=/ | ||
| + | # Explicitly change to the job directory | ||
| + | cd $PBS_JOBDIR | ||
| + | nproc=`cat $PBS_NODEFILE | wc -l` | ||
| + | ###Run the code using MPI | ||
| + | exe=aneurysm | ||
| + | mpirun -iface ib0 -np $nproc $exe param.xml > run.out | ||
| + | </ | ||
| + | |||
| + | === Post-processing === | ||
| + | Palabos does not come with built-in post-processing tools. | ||
| + | < | ||
| + | chpc/ | ||
| + | chpc/ | ||
| + | </ | ||
| + | |||
| + | Load one of these modules if you need ImageMagick. | ||
| + | |||
| + | VTK files can be displayed with [[https:// | ||