Commit dfbe3c4e authored by Gaurav Kukreja's avatar Gaurav Kukreja

Added compile option to avoid writing output at checkpoints

Signed-off-by: 's avatarGaurav Kukreja <gaurav.kukreja@tum.de>
parent cb8cace4
......@@ -114,7 +114,9 @@ vars.AddVariables(
BoolVariable( 'countflops', 'enable flop counting; defines the macro COUNTFLOPS', False ),
BoolVariable( 'loop_openmp', 'enable loop parallelization using OpenMP', False )
BoolVariable( 'loop_openmp', 'enable loop parallelization using OpenMP', False ),
BoolVariable( 'write_output', 'write output files at each checkpoint', True )
)
# external variables
......@@ -234,6 +236,9 @@ if env['loop_openmp']:
env.Append(CCFLAGS=['-DLOOP_OPENMP', '-openmp'])
env.Append(LINKFLAGS=['-openmp'])
if env['write_output']:
env.Append(CCFLAGS=['-DWRITE_OUTPUT'])
# Vectorization?
if env['compileMode'] == 'release' and env['vectorize']:
env.Append(CPPDEFINES=['VECTORIZE'])
......
......@@ -30,10 +30,11 @@
loop_openmp='yes'
#countflops='yes'
compiler='intel'
#parallelization='mpi'
parallelization='mpi'
solver='fwavevec'
#solver='augrie'
#writeNetCDF='yes'
write_output='no'
# Library paths (only required of not installed in default path)
#netCDFDir=''
......@@ -127,7 +127,9 @@ int main( int argc, char** argv ) {
#ifndef READXML
args.addOption("grid-size-x", 'x', "Number of cell in x direction");
args.addOption("grid-size-y", 'y', "Number of cell in y direction");
//#ifdef WRITE_OUTPUT
args.addOption("output-basepath", 'o', "Output base file name");
//#endif // WRITE_OUTPUT
args.addOption("output-steps-count", 'c', "Number of output time steps");
#ifdef ASAGI
args.addOption("bathymetry-file", 'b', "File containing the bathymetry");
......@@ -408,11 +410,13 @@ int main( int argc, char** argv ) {
l_dX, l_dY,
l_blockPositionX*l_nXLocal, l_blockPositionY*l_nYLocal );
#endif
#ifdef WRITE_OUTPUT
// Write zero time step
l_writer.writeTimeStep( l_wavePropgationBlock.getWaterHeight(),
l_wavePropgationBlock.getDischarge_hu(),
l_wavePropgationBlock.getDischarge_hv(),
(float) 0.);
#endif // WRITE_OUTPUT
/**
* Simulation.
*/
......@@ -485,6 +489,7 @@ int main( int argc, char** argv ) {
progressBar.update(l_t);
}
#ifdef WRITE_OUPUT
// print current simulation time
progressBar.clear();
tools::Logger::logger.printOutputTime(l_t);
......@@ -495,6 +500,7 @@ int main( int argc, char** argv ) {
l_wavePropgationBlock.getDischarge_hu(),
l_wavePropgationBlock.getDischarge_hv(),
l_t);
#endif // WRITE_OUTPUT
}
/**
......
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