Commit ce12619f authored by Andrew J. Burns (Cont's avatar Andrew J. Burns (Cont

bug fixes for merge

parent 7f5d7003
SET(ENV{PATH} "${PATH}${SEPARATOR}$ENV{PATH}") SET(ENV{PATH} "${PATH}${SEPARATOR}$ENV{PATH}")
SET(ENV{LD_LIBRARY_PATH} "${LDPATH}${SEPARATOR}$ENV{LD_LIBRARY_PATH}") SET(ENV{LD_LIBRARY_PATH} "${LDPATH}${SEPARATOR}$ENV{LD_LIBRARY_PATH}")
SET(ENV{MPIEXEC} "@MPIEXEC@")
MESSAGE("| Calling:\t${EXECUTABLE} ${ARGUMENTS}") MESSAGE("| Calling:\t${EXECUTABLE} ${ARGUMENTS}")
EXECUTE_PROCESS( EXECUTE_PROCESS(
......
SET(ENV{PATH} "${PATH}${SEPARATOR}$ENV{PATH}") SET(ENV{PATH} "${PATH}${SEPARATOR}$ENV{PATH}")
SET(ENV{LD_LIBRARY_PATH} "${LDPATH}${SEPARATOR}$ENV{LD_LIBRARY_PATH}") SET(ENV{LD_LIBRARY_PATH} "${LDPATH}${SEPARATOR}$ENV{LD_LIBRARY_PATH}")
SET(ENV{MPIEXEC} "@MPIEXEC@")
MESSAGE("| Calling:\t${EXECUTABLE} ${ARGUMENTS}") MESSAGE("| Calling:\t${EXECUTABLE} ${ARGUMENTS}")
EXECUTE_PROCESS( EXECUTE_PROCESS(
......
SET(ENV{PATH} "${PATH}${SEPARATOR}$ENV{PATH}") SET(ENV{PATH} "${PATH}${SEPARATOR}$ENV{PATH}")
SET(ENV{LD_LIBRARY_PATH} "${LDPATH}${SEPARATOR}$ENV{LD_LIBRARY_PATH}") SET(ENV{LD_LIBRARY_PATH} "${LDPATH}${SEPARATOR}$ENV{LD_LIBRARY_PATH}")
SET(ENV{MPIEXEC} "@MPIEXEC@")
MESSAGE("| Calling:\t${EXECUTABLE} ${ARGUMENTS}") MESSAGE("| Calling:\t${EXECUTABLE} ${ARGUMENTS}")
EXECUTE_PROCESS( EXECUTE_PROCESS(
......
...@@ -5,6 +5,7 @@ SET(ENV{PYTHONPATH} "${PYTHONPATH}${SEPARATOR}$ENV{PYTHONPATH}") ...@@ -5,6 +5,7 @@ SET(ENV{PYTHONPATH} "${PYTHONPATH}${SEPARATOR}$ENV{PYTHONPATH}")
SET(ENV{PATH} "${PATH}${SEPARATOR}$ENV{PATH}") SET(ENV{PATH} "${PATH}${SEPARATOR}$ENV{PATH}")
SET(ENV{LD_LIBRARY_PATH} "${LDPATH}${SEPARATOR}$ENV{LD_LIBRARY_PATH}") SET(ENV{LD_LIBRARY_PATH} "${LDPATH}${SEPARATOR}$ENV{LD_LIBRARY_PATH}")
SET(ENV{PYTHON_EXECUTABLE} "${python_runtime}") SET(ENV{PYTHON_EXECUTABLE} "${python_runtime}")
SET(ENV{MPIEXEC} "@MPIEXEC@")
MESSAGE("| Calling:\t ${EXECUTABLE} ${ARGUMENTS}") MESSAGE("| Calling:\t ${EXECUTABLE} ${ARGUMENTS}")
EXECUTE_PROCESS( EXECUTE_PROCESS(
......
...@@ -32,7 +32,7 @@ XdmfGridCollection::New() ...@@ -32,7 +32,7 @@ XdmfGridCollection::New()
{ {
shared_ptr<XdmfGridCollection> p(new XdmfGridCollection()); shared_ptr<XdmfGridCollection> p(new XdmfGridCollection());
return p; return p;
}; }
XdmfGridCollection::XdmfGridCollection() : XdmfGridCollection::XdmfGridCollection() :
XdmfDomain(), XdmfDomain(),
......
...@@ -48,7 +48,7 @@ namespace { ...@@ -48,7 +48,7 @@ namespace {
char one_byte; char one_byte;
char* data = static_cast<char*>(p); char* data = static_cast<char*>(p);
one_byte = data[0]; data[0] = data[1]; data[1] = one_byte; one_byte = data[0]; data[0] = data[1]; data[1] = one_byte;
}; }
template<> template<>
void ByteSwaper<4>::swap(void * p){ void ByteSwaper<4>::swap(void * p){
...@@ -57,7 +57,8 @@ namespace { ...@@ -57,7 +57,8 @@ namespace {
one_byte = data[0]; data[0] = data[3]; data[3] = one_byte; one_byte = data[0]; data[0] = data[3]; data[3] = one_byte;
one_byte = data[1]; data[1] = data[2]; data[2] = one_byte; one_byte = data[1]; data[1] = data[2]; data[2] = one_byte;
}; }
template<> template<>
void ByteSwaper<8>::swap(void * p){ void ByteSwaper<8>::swap(void * p){
char one_byte; char one_byte;
...@@ -66,7 +67,7 @@ namespace { ...@@ -66,7 +67,7 @@ namespace {
one_byte = data[1]; data[1] = data[6]; data[6] = one_byte; one_byte = data[1]; data[1] = data[6]; data[6] = one_byte;
one_byte = data[2]; data[2] = data[5]; data[5] = one_byte; one_byte = data[2]; data[2] = data[5]; data[5] = one_byte;
one_byte = data[3]; data[3] = data[4]; data[4] = one_byte; one_byte = data[3]; data[3] = data[4]; data[4] = one_byte;
}; }
} }
...@@ -91,7 +92,6 @@ XdmfBinaryController::XdmfBinaryController(const std::string & filePath, ...@@ -91,7 +92,6 @@ XdmfBinaryController::XdmfBinaryController(const std::string & filePath,
const unsigned int seek, const unsigned int seek,
const std::vector<unsigned int> & dimensions) : const std::vector<unsigned int> & dimensions) :
XdmfHeavyDataController(filePath, XdmfHeavyDataController(filePath,
"",
type, type,
dimensions), dimensions),
mEndian(endian), mEndian(endian),
......
...@@ -220,7 +220,29 @@ public: ...@@ -220,7 +220,29 @@ public:
XdmfSubset::ItemTag.compare((char *)currNode->name) == 0) { XdmfSubset::ItemTag.compare((char *)currNode->name) == 0) {
while(childNode != NULL) { while(childNode != NULL) {
if(childNode->type == XML_TEXT_NODE && childNode->content) { if(childNode->type == XML_TEXT_NODE && childNode->content) {
///*
const char * content = (char*)childNode->content;
// Determine if content is whitespace
bool whitespace = true;
const char * contentPtr = content;
// Step through to end of pointer
while(contentPtr != NULL) {
// If not a whitespace character, break
if(!isspace(*contentPtr++)) {
whitespace = false;
break;
}
}
if(!whitespace) {
itemProperties.insert(std::make_pair("Content", content));
itemProperties.insert(std::make_pair("XMLDir", mXMLDir));
break;
}
//*/
/*
std::string content((char *)childNode->content); std::string content((char *)childNode->content);
boost::algorithm::trim(content); boost::algorithm::trim(content);
...@@ -229,6 +251,7 @@ public: ...@@ -229,6 +251,7 @@ public:
itemProperties.insert(std::make_pair("XMLDir", mXMLDir)); itemProperties.insert(std::make_pair("XMLDir", mXMLDir));
break; break;
} }
*/
} }
childNode = childNode->next; childNode = childNode->next;
} }
......
...@@ -187,6 +187,7 @@ public: ...@@ -187,6 +187,7 @@ public:
virtual void virtual void
getProperties(std::map<std::string, std::string> & collectedProperties) const; getProperties(std::map<std::string, std::string> & collectedProperties) const;
/** /**
* Get the start index of the heavy data set owned by this controller. * Get the start index of the heavy data set owned by this controller.
* *
......
...@@ -33,6 +33,7 @@ XdmfHeavyDataController::XdmfHeavyDataController(const std::string & filePath, ...@@ -33,6 +33,7 @@ XdmfHeavyDataController::XdmfHeavyDataController(const std::string & filePath,
const std::vector<unsigned int> & dimensions) : const std::vector<unsigned int> & dimensions) :
mDimensions(dimensions), mDimensions(dimensions),
mFilePath(filePath), mFilePath(filePath),
mArrayStartOffset(0),
mType(type) mType(type)
{ {
} }
......
...@@ -235,6 +235,8 @@ public: ...@@ -235,6 +235,8 @@ public:
*/ */
unsigned int getArrayOffset() const; unsigned int getArrayOffset() const;
virtual void getProperties(std::map<std::string, std::string> & collectedProperties) const = 0;
/** /**
* Get the array type of the heavy data set owned by this * Get the array type of the heavy data set owned by this
* controller. * controller.
...@@ -290,7 +292,7 @@ public: ...@@ -290,7 +292,7 @@ public:
protected: protected:
XdmfHeavyDataController(const std::string & filePath, XdmfHeavyDataController(const std::string & filePath,
const shared_ptr<const XdmfArrayType> type, const shared_ptr<const XdmfArrayType> & type,
const std::vector<unsigned int> & dimensions); const std::vector<unsigned int> & dimensions);
const std::vector<unsigned int> mDimensions; const std::vector<unsigned int> mDimensions;
......
...@@ -33,7 +33,7 @@ XdmfInformation::New() ...@@ -33,7 +33,7 @@ XdmfInformation::New()
{ {
shared_ptr<XdmfInformation> p(new XdmfInformation()); shared_ptr<XdmfInformation> p(new XdmfInformation());
return p; return p;
}; }
shared_ptr<XdmfInformation> shared_ptr<XdmfInformation>
XdmfInformation::New(const std::string & key, XdmfInformation::New(const std::string & key,
...@@ -41,7 +41,7 @@ XdmfInformation::New(const std::string & key, ...@@ -41,7 +41,7 @@ XdmfInformation::New(const std::string & key,
{ {
shared_ptr<XdmfInformation> p(new XdmfInformation(key, value)); shared_ptr<XdmfInformation> p(new XdmfInformation(key, value));
return p; return p;
}; }
XdmfInformation::XdmfInformation(const std::string & key, XdmfInformation::XdmfInformation(const std::string & key,
const std::string & value) : const std::string & value) :
......
...@@ -183,13 +183,6 @@ static const H5FD_class_mpi_t XDMF_dsm_g = { ...@@ -183,13 +183,6 @@ static const H5FD_class_mpi_t XDMF_dsm_g = {
#define H5_INTERFACE_INIT_FUNC XDMF_dsm_init_interface #define H5_INTERFACE_INIT_FUNC XDMF_dsm_init_interface
void
XdmfUnused(void)
{
//To remove warning about XDMF_dsm_init_interface being unused
XDMF_dsm_init_interface();
}
static herr_t static herr_t
XDMF_dsm_init_interface(void) XDMF_dsm_init_interface(void)
{ {
...@@ -202,6 +195,13 @@ XDMF_dsm_init_interface(void) ...@@ -202,6 +195,13 @@ XDMF_dsm_init_interface(void)
FUNC_LEAVE_NOAPI(XDMF_dsm_init()) FUNC_LEAVE_NOAPI(XDMF_dsm_init())
} }
void
XdmfUnused(void)
{
//To remove warning about XDMF_dsm_init_interface being unused
XDMF_dsm_init_interface();
}
hid_t hid_t
XDMF_dsm_init(void) XDMF_dsm_init(void)
{ {
......
#include "stdio.h"
#include "XdmfArray.hpp" #include "XdmfArray.hpp"
#include "XdmfHDF5Controller.hpp" #include "XdmfHDF5Controller.hpp"
#include "XdmfHeavyDataWriter.hpp" #include "XdmfHeavyDataWriter.hpp"
...@@ -91,6 +92,7 @@ int main(int, char **) ...@@ -91,6 +92,7 @@ int main(int, char **)
// //
readArray2->read(); readArray2->read();
assert(readArray2->isInitialized()); assert(readArray2->isInitialized());
printf("size = %d\n", readArray2->getSize());
assert(readArray2->getSize() == 9); assert(readArray2->getSize() == 9);
readDimensions = readArray2->getDimensions(); readDimensions = readArray2->getDimensions();
assert(readDimensions.size() == 2); assert(readDimensions.size() == 2);
......
...@@ -26,8 +26,6 @@ if (MPIEXEC_MAX_NUMPROCS STRGREATER 5) ...@@ -26,8 +26,6 @@ if (MPIEXEC_MAX_NUMPROCS STRGREATER 5)
ADD_MPI_TEST_FORTRAN(ConnectDSMFortran.sh AcceptDSMFortran,ConnectDSMFortran2,ConnectDSMFortran) ADD_MPI_TEST_FORTRAN(ConnectDSMFortran.sh AcceptDSMFortran,ConnectDSMFortran2,ConnectDSMFortran)
ENDIF ("${IS_OPENMPI}" STREQUAL "") ENDIF ("${IS_OPENMPI}" STREQUAL "")
endif(MPIEXEC_MAX_NUMPROCS STRGREATER 5) endif(MPIEXEC_MAX_NUMPROCS STRGREATER 5)
SET_SOURCE_FILES_PROPERTIES(BinaryFortran.f90 PROPERTIES COMPILE_FLAGS -fno-range-check)
ADD_TEST_FORTRAN(BinaryFortran)
ADD_TEST_FORTRAN(OutputTestXdmfFortran) ADD_TEST_FORTRAN(OutputTestXdmfFortran)
ADD_TEST_FORTRAN(EditTestXdmfFortran) ADD_TEST_FORTRAN(EditTestXdmfFortran)
ADD_TEST_FORTRAN(TestXdmfFortran) ADD_TEST_FORTRAN(TestXdmfFortran)
...@@ -40,7 +38,6 @@ ADD_TEST_FORTRAN(FixedOutputTestXdmfFortran -ffixed-form) ...@@ -40,7 +38,6 @@ ADD_TEST_FORTRAN(FixedOutputTestXdmfFortran -ffixed-form)
# have multiple files (ie: CLEAN_TEST_CXX(testname outputfile1 ...)) # have multiple files (ie: CLEAN_TEST_CXX(testname outputfile1 ...))
# Read UseCxxTest.cmake for more information # Read UseCxxTest.cmake for more information
# --------------------------------------- # ---------------------------------------
CLEAN_TEST_FORTRAN(BinaryFortran)
CLEAN_TEST_FORTRAN(OutputTestXdmfFortran) CLEAN_TEST_FORTRAN(OutputTestXdmfFortran)
CLEAN_TEST_FORTRAN(TestXdmfFortran CLEAN_TEST_FORTRAN(TestXdmfFortran
my_output.h5 my_output.h5
......
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