Skip to content

Commit 59891fa

Browse files
committed
bug fixed
1 parent ba5681e commit 59891fa

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
3636
set(CMAKE_CXX_FLAGS "-lboost_program_options")
3737
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
3838
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
39-
set(Boost_USE_STATIC_LIBS OFF)
39+
# set(Boost_USE_STATIC_LIBS OFF)
4040

4141
# Add Boost and CUDA include directories
4242
include_directories(${Boost_INCLUDE_DIRS} ${HDF5_INCLUDE_DIRS} ./include ./src ./src/shapes)

src/spinwalk.cu

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,14 +223,17 @@ bool run(simulation_parameters param, std::map<std::string, std::vector<std::str
223223
checkCudaErrors(cudaEventSynchronize(end));
224224
checkCudaErrors(cudaDeviceSynchronize());
225225
checkCudaErrors(cudaEventElapsedTime(&elapsedTime, start, end));
226-
std::cout << "Simulation over " << device_count << " GPU(s) took " << std::fixed << std::setprecision(2) << elapsedTime/1000. << " second(s)" << '\n';
226+
std::cout << "Simulation over " << 1 << " GPU(s) took " << std::fixed << std::setprecision(2) << elapsedTime/1000. << " second(s)" << '\n';
227227
// ========== save results ==========
228228
std::cout << "Saving the results to disk." << "\n";
229229
std::string f = filenames.at("output")[fieldmap_no];
230230
if (std::filesystem::exists(f))
231+
{
231232
std::filesystem::remove(f);
233+
BOOST_LOG_TRIVIAL(info) << "File " << f << " already exists. Overwriting it.";
234+
}
232235

233-
std::vector<size_t> dims = {param.n_fov_scale, param.n_spins * device_count, param.n_TE, 3};
236+
std::vector<size_t> dims = {param.n_fov_scale, param.n_spins, param.n_TE, 3};
234237
file_utils::save_h5(f, M1.data(), dims, "M", "float");
235238

236239
dims[2] = param.enRecordTrajectory ? param.n_timepoints * (param.n_dummy_scan + 1) : 1;

src/version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
#define SPINWALK_VERSION_MAJOR 1
88
#define SPINWALK_VERSION_MINOR 13
9-
#define SPINWALK_VERSION_PATCH 2
9+
#define SPINWALK_VERSION_PATCH 3
1010

1111
//---------------------------------------------------------------------------------------------
1212
//

0 commit comments

Comments
 (0)