Commit f4220604 authored by Junmin Gu's avatar Junmin Gu

fixed a bug in testHDF.

changed cmake file to use mpi to run hdf5 tests
parent 60645a42
......@@ -27,20 +27,24 @@ if (BUILD_TESTING)
FEATURES ${ENABLE_HDF5})
senseiAddTest(testHDF5Write
COMMAND testHDF5 w 4 n h5test
#COMMAND testHDF5 w 4 n h5test
COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${TEST_NP} testHDF5 w 4 n h5test
SOURCES testHDF5.cpp LIBS sensei
FEATURES ${ENABLE_HDF5})
senseiAddTest(testHDF5Read
COMMAND testHDF5 r h5test.n1
#COMMAND testHDF5 r h5test.n1
COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${TEST_NP} testHDF5 r h5test.n${TEST_NP}
FEATURES ${ENABLE_HDF5})
senseiAddTest(testHDF5WriteStreaming
COMMAND testHDF5 w 4 s h5stream
#COMMAND testHDF5 w 4 s h5stream
COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${TEST_NP} testHDF5 w 4 s h5stream
FEATURES ${ENABLE_HDF5})
senseiAddTest(testHDF5ReadStreaming
COMMAND testHDF5 r h5stream.n1 s
#COMMAND testHDF5 r h5stream.n1 s
COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${TEST_NP} testHDF5 r h5stream.n${TEST_NP} s
FEATURES ${ENABLE_HDF5})
senseiAddTest(testProgrammableDataAdaptor
......
......@@ -594,6 +594,7 @@ AAWrap* GetWriteAdaptor(const std::string& file_name,
{
if (rank == 0)
std::cout << " ======>>>> [ADIOS] Analysis Adaptor <<<<<======"
<< " with config file:"<<file_name
<< std::endl;
// initialize the analysis adaptor
......@@ -705,7 +706,7 @@ int main(int argc, char** argv)
base_file_name = argv[4];
}
char file_name[20];
char file_name[base_file_name.size()];
sprintf(file_name, "%s.n%d", base_file_name.c_str(), n_ranks);
if (rank == 0)
......
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