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