-
Notifications
You must be signed in to change notification settings - Fork 4
Swe performance exercise
fomics edited this page Jul 16, 2013
·
12 revisions
Start by cloning a clean version of the SWE.git repository master branch
git clone --recursive https://github.com/fomics/SWE.git
... and apply a patch (adds an OpenMP option to scons)
cd SWE
git cherry-pick 6624e61b9b82a8e6098bcf556d187a7fb9d7f492
module swap PrgEnv-cray PrgEnv-gnu
module load scons
module load python/2.7.2
scons copyenv=true compiler=cray parallelization=mpi
This is
module load scons
module load python/2.7.2
module swap PrgEnv-cray PrgEnv-intel
scons copyenv=true compiler=intel openmp=yes
- Switch to the master branch
- Add the patch for the SConstruct file:
git cherry-pick 6624e61b9b82a8e6098bcf556d187a7fb9d7f492
- Open the file src/blocks/SWE_WavePropagation.cpp
- Add the line
#define LOOP_OPENMP
before
- Add the line
#ifdef LOOP_OPENMP
#include <omp.h>
#endif
- Remove the line that starts with
solver::Hybrid<float>
module load scons
module load python/2.7.2
module swap PrgEnv-xyz PrgEnv-intel
Open the file 'SConstruct' in the main directory. Search for '-xHost' and replace it with '-mavx'.
scons copyenv=yes compiler=intel solver=fwavevec vectorize=yes showVectorization=yes