tdo not overwrite 00000 output file if it isn't the first iteration - sphere - … | |
git clone git://src.adamsgaard.dk/sphere | |
Log | |
Files | |
Refs | |
LICENSE | |
--- | |
commit db378368459b79a351971445588510f7479c9455 | |
parent 6953a6e79d6f9b2c89e136d8283b348f332f8415 | |
Author: Anders Damsgaard <[email protected]> | |
Date: Tue, 14 Oct 2014 13:49:05 +0200 | |
do not overwrite 00000 output file if it isn't the first iteration | |
Diffstat: | |
M src/device.cu | 6 ++++-- | |
1 file changed, 4 insertions(+), 2 deletions(-) | |
--- | |
diff --git a/src/device.cu b/src/device.cu | |
t@@ -704,7 +704,8 @@ __host__ void DEM::startTime() | |
checkForCudaErrors("Start of startTime()"); | |
// Write initial data to output/<sid>.output00000.bin | |
- writebin(("output/" + sid + ".output00000.bin").c_str()); | |
+ if (time.step_count == 0) | |
+ writebin(("output/" + sid + ".output00000.bin").c_str()); | |
// Time variables | |
clock_t tic, toc; | |
t@@ -1775,7 +1776,8 @@ __host__ void DEM::startTime() | |
// Write binary output file | |
time.step_count += 1; | |
sprintf(file,"output/%s.output%05d.bin", sid.c_str(), | |
- time.step_count); writebin(file); | |
+ time.step_count); | |
+ writebin(file); | |
/*std::cout << "\n###### OUTPUT FILE " << time.step_count << " ###… | |
<< std::endl; |