Some pre- and post-processing codes are not parallelised and must be run in serial. Let us consider now consider blockMesh. To run blockMesh in serial on HECToR, users can employ the serial queues.
This following batch script runs blockMesh within an example case using HECToR's `serial' queue.
#!/bin/bash --login #PBS -q serial #PBS -N blockMesh #PBS -l walltime=01:00:00 #PBS -A z01 . /opt/modules/3.1.6/init/bash module swap PrgEnv-pgi PrgEnv-gnu module swap gcc gcc/4.3.3 module swap xt-mpt xt-mpt/3.2.0 source /work/z01/z01/gavin/OpenFOAM/OpenFOAM-1.6/etc/bashrc export LD_LIBRARY_PATH=$WM_PROJECT_DIR/mylib:$LD_LIBRARY_PATH cd $FOAM_RUN/example_case blockMeshNB All serial queues employ dual-core nodes thus, if users employ the quad-core version, then the results may not be correct.
However, it is quite possible that the amount of memory available within the serial queues is insufficient. If this is the case, then users can employ a single core on a node in the `parallel' queues. This will furnish the user with the node's entire memory. NB this method will actually cost the price for running on 4 cores, despite only one core being used. An example batch script follows. Note the use of aprun, despite running the serial code, as aprun forces the code to be run in a parallel queue.
#!/bin/bash --login #PBS -l mppwidth=1 #PBS -l mppnppn=1 #PBS -N blockMesh #PBS -l walltime=01:00:00 #PBS -A z01 . /opt/modules/3.1.6/init/bash module swap PrgEnv-pgi PrgEnv-gnu module swap gcc gcc/4.3.3 module swap xt-mpt xt-mpt/3.2.0 source /work/z01/z01/gavin/OpenFOAM/OpenFOAM-1.6/etc/bashrc export LD_LIBRARY_PATH=$WM_PROJECT_DIR/mylib:$LD_LIBRARY_PATH cd $FOAM_RUN/example_case aprun -n 1 -N 1 blockMesh