Code indexing in gitaly is broken and leads to code not being visible to the user. We work on the issue with highest priority.

Skip to content
Snippets Groups Projects
Commit a3db9449 authored by frey_m's avatar frey_m
Browse files

Make p3m3dHeating.cpp compiling again.

- fixed CMakeLists.txt
- fixed opening of H5 file.

modified:   ippl/test/particle/CMakeLists.txt
modified:   ippl/test/particle/p3m3dHeating.cpp
parent 7d9d4ed1
No related branches found
No related tags found
1 merge request!16Merge AMR fork into OPAL/master
...@@ -12,6 +12,10 @@ link_directories ( ...@@ -12,6 +12,10 @@ link_directories (
${CMAKE_SOURCE_DIR}/src ${CMAKE_SOURCE_DIR}/src
) )
set (CMAKE_CXX_FLAGS
"${IPPL_CMAKE_CXX_FLAGS} -std=c++11 -DUSEH5FEDV2 -DPARALLEL_IO ${CMAKE_CXX_FLAGS}"
)
SET (IPPL_LIBS ippl) SET (IPPL_LIBS ippl)
SET (COMPILE_FLAGS ${OPAL_CXX_FLAGS}) SET (COMPILE_FLAGS ${OPAL_CXX_FLAGS})
...@@ -31,8 +35,8 @@ set_source_files_properties(SOURCE PIC3d.cpp p3m3d.cpp ...@@ -31,8 +35,8 @@ set_source_files_properties(SOURCE PIC3d.cpp p3m3d.cpp
#add_executable (PIC3d PIC3d.cpp) #add_executable (PIC3d PIC3d.cpp)
#target_link_libraries (PIC3d ${IPPL_LIBS}) #target_link_libraries (PIC3d ${IPPL_LIBS})
#add_executable (p3m3dHeating p3m3dHeating.cpp) add_executable (p3m3dHeating p3m3dHeating.cpp)
#target_link_libraries (p3m3dHeating ${IPPL_LIBS} ${H5Hut_LIBRARY} ${HDF5_LIBRARY} z ${CMAKE_DL_LIBS}) target_link_libraries (p3m3dHeating ${IPPL_LIBS} ${H5Hut_LIBRARY} ${HDF5_LIBRARY} z ${CMAKE_DL_LIBS})
#add_executable (p3m3d p3m3d.cpp) #add_executable (p3m3d p3m3d.cpp)
#target_link_libraries (p3m3d ${IPPL_LIBS}) #target_link_libraries (p3m3d ${IPPL_LIBS})
......
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#include "math.h" #include "math.h"
#include <random> #include <random>
#include <cassert>
#include "VTKFieldWriterParallel.hpp" #include "VTKFieldWriterParallel.hpp"
#include "ChargedParticleFactory.hpp" #include "ChargedParticleFactory.hpp"
...@@ -472,7 +473,17 @@ public: ...@@ -472,7 +473,17 @@ public:
} }
void openH5(std::string fn){ void openH5(std::string fn){
#if defined (USE_H5HUT2)
h5_prop_t props = H5CreateFileProp ();
MPI_Comm comm = Ippl::getComm();
h5_err_t h5err = H5SetPropFileMPIOCollective (props, &comm);
assert (h5err != H5_ERR);
H5f_m = H5OpenFile (fn.c_str(), H5_O_RDONLY, props);
assert (file_m != (h5_file_t)H5_ERR);
#else
H5f_m = H5OpenFile(fn.c_str(), H5_FLUSH_STEP | H5_O_WRONLY, Ippl::getComm()); H5f_m = H5OpenFile(fn.c_str(), H5_FLUSH_STEP | H5_O_WRONLY, Ippl::getComm());
assert (file_m != (void*)H5_ERR);
#endif
} }
...@@ -526,7 +537,11 @@ public: ...@@ -526,7 +537,11 @@ public:
//TEMP debug variable //TEMP debug variable
double RhoSum=0; double RhoSum=0;
#if defined (USE_H5HUT2)
h5_file_t H5f_m;
#else
h5_file_t *H5f_m; h5_file_t *H5f_m;
#endif
double temperature[Dim]; double temperature[Dim];
double avg_vel[Dim]; double avg_vel[Dim];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment