Commit a6a8d6a2 authored by Gaurav Kukreja's avatar Gaurav Kukreja

Modified SConstruct to fix bug with scalasca compilation

Signed-off-by: 's avatarGaurav Kukreja <gaurav.kukreja@tum.de>
parent 1e812ed6
...@@ -244,6 +244,9 @@ if env['loop_openmp']: ...@@ -244,6 +244,9 @@ if env['loop_openmp']:
if env['write_output']: if env['write_output']:
env.Append(CCFLAGS=['-DWRITE_OUTPUT']) env.Append(CCFLAGS=['-DWRITE_OUTPUT'])
if env['scalasca_instrument']:
env.Append(CCFLAGS=['-DSCALASCA_INSTRUMENT'])
# Vectorization? # Vectorization?
if env['compileMode'] == 'release' and env['vectorize']: if env['compileMode'] == 'release' and env['vectorize']:
env.Append(CPPDEFINES=['VECTORIZE']) env.Append(CPPDEFINES=['VECTORIZE'])
......
...@@ -35,7 +35,7 @@ solver='fwavevec' ...@@ -35,7 +35,7 @@ solver='fwavevec'
#solver='augrie' #solver='augrie'
#writeNetCDF='yes' #writeNetCDF='yes'
write_output='no' write_output='no'
scalasca_instrument='yes' scalasca_instrument='no'
# Library paths (only required of not installed in default path) # Library paths (only required of not installed in default path)
#netCDFDir='' #netCDFDir=''
...@@ -35,7 +35,9 @@ ...@@ -35,7 +35,9 @@
#include <string> #include <string>
#include <vector> #include <vector>
#ifdef SCALASCA_INSTRUMENT
#include "epik_user.h" #include "epik_user.h"
#endif
#ifndef CUDA #ifndef CUDA
#include "blocks/SWE_WavePropagationBlock.hh" #include "blocks/SWE_WavePropagationBlock.hh"
...@@ -444,7 +446,9 @@ int main( int argc, char** argv ) { ...@@ -444,7 +446,9 @@ int main( int argc, char** argv ) {
unsigned int l_iterations = 0; unsigned int l_iterations = 0;
#ifdef SCALASCA_INSTRUMENT
EPIK_FUNC_START(); EPIK_FUNC_START();
#endif
// loop over checkpoints // loop over checkpoints
for(int c=1; c<=l_numberOfCheckPoints; c++) { for(int c=1; c<=l_numberOfCheckPoints; c++) {
...@@ -513,7 +517,9 @@ int main( int argc, char** argv ) { ...@@ -513,7 +517,9 @@ int main( int argc, char** argv ) {
progressBar.update(l_t); progressBar.update(l_t);
} }
#ifdef SCALASCA_INSTRUMENT
EPIK_FUNC_END(); EPIK_FUNC_END();
#endif // SCALASCA_INSTRUMENT
#ifdef WRITE_OUPUT #ifdef WRITE_OUPUT
// print current simulation time // print current simulation time
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment