Commit 7f5d7003 authored by Andrew J. Burns's avatar Andrew J. Burns Committed by Andrew J. Burns (Cont
Browse files

Rework of HeavyDataController and HDF5Controller to remove extra code and move...

Rework of HeavyDataController and HDF5Controller to remove extra code and move HeavyDataController away from being too dependent on hdf5 style
XdmfFunction now supports negative numbers in addition to the - operator
Reworked the interaction between array references and reading
Cleaned up some warnings that showed up in pedantic
Adjusted mpi tests to test against the MPIEXEC variable as opposed to hard calling mpirun
Still needs to be changed to work better with Cray mpi style execution
Updates to XdmfArrayType to allow for signed and floating point checking
General test and Documentation updates
parent 975536e3
......@@ -17,27 +17,38 @@ include(AddTestsFortran)
if (MPIEXEC_MAX_NUMPROCS STRGREATER 5)
get_filename_component(MPI_BIN_DIRECTORY ${MPI_C_COMPILER} PATH)
EXECUTE_PROCESS(
COMMAND ${MPI_BIN_DIRECTORY}/mpirun --version
COMMAND ${MPIEXEC} --version
OUTPUT_VARIABLE MPI_TYPE_OUTPUT
ERROR_VARIABLE MPI_TYPE_ERROR
)
STRING(REGEX MATCH "Open MPI" IS_OPENMPI "${MPI_TYPE_ERROR}")
STRING(REGEX MATCH "Open" IS_OPENMPI "${MPI_TYPE_ERROR}")
IF ("${IS_OPENMPI}" STREQUAL "")
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)
ADD_TEST_FORTRAN(NestedInfoFortran)
SET_SOURCE_FILES_PROPERTIES(FixedOutputTestXdmfFortran.f90 PROPERTIES COMPILE_FLAGS -ffixed-form)
ADD_TEST_FORTRAN(FixedOutputTestXdmfFortran)
ADD_TEST_FORTRAN(FixedOutputTestXdmfFortran -ffixed-form)
# Add any cxx cleanup here:
# Note: We don't want to use a foreach loop to test the files incase we
# 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
my_output.xmf)
CLEAN_TEST_FORTRAN(NestedInfoFortran
nested_output.xmf
nested_output.h5)
CLEAN_TEST_FORTRAN(EditTestXdmfFortran
edited_output.xmf
edited_output.h5)
CLEAN_TEST_FORTRAN(FixedOutputTestXdmfFortran)
# Intel MPI requires a minimum of 2 cores per process
mpirun -n 2 ./AcceptDSMFortran &
$MPIEXEC -n 2 ./AcceptDSMFortran &
sleep 5
mpirun -n 2 ./ConnectDSMFortran &
$MPIEXEC -n 2 ./ConnectDSMFortran &
sleep 5
mpirun -n 2 ./ConnectDSMFortran2
$MPIEXEC -n 2 ./ConnectDSMFortran2
......@@ -85,7 +85,7 @@ PROGRAM XdmfFortranExample
PRINT *, "Value: ", itemValue
CALL XDMFRETRIEVEMAPPROPERTYBYKEY(obj, 0, itemKey, itemValue, 256)
PRINT *, "Value: ", itemValue
CALL XDMFRETRIEVEREMOTENODEIDS(obj, 0, 3, 1, myMappedNodes)
CALL XDMFRETRIEVEREMOTENODEIDS(obj, 0, 1, 3, myMappedNodes)
PRINT *, 'Nodes: ', myMappedNodes
!!!! Unstructured and Curvilinear only
PRINT *, 'Geometry'
......
......@@ -24,7 +24,7 @@
INTEGER nodeAttributeId, nodeSmallAttributeId, cellAttributeId, &
& testSetID, testMapID, tempID
filename = 'my_output.xmf'//CHAR(0)
filename = 'my_fixed_form_output.xmf'//CHAR(0)
myPoints(1,1,1) = 0
myPoints(2,1,1) = 0
......
......@@ -150,14 +150,17 @@ PROGRAM XdmfFortranExample
nodeAttributeId = XDMFADDATTRIBUTE(obj, 'NodeValues'//CHAR(0), &
XDMF_ATTRIBUTE_CENTER_NODE, XDMF_ATTRIBUTE_TYPE_SCALAR, 12, &
XDMF_ARRAY_TYPE_FLOAT64, myNodeAttribute)
PRINT *, 'Node Attribute ID: ', nodeAttributeId
CALL XDMFRETRIEVEATTRIBUTEVALUES(obj, 0, mySmallerNode, XDMF_ARRAY_TYPE_FLOAT64, 6, 0, 1, 1)
tempID = XDMFADDINFORMATION(obj, 'Attrib2'//CHAR(0), 'This is Attribute 2'//CHAR(0))
cellAttributeId = XDMFADDATTRIBUTE(obj, 'CellValues'//CHAR(0), &
XDMF_ATTRIBUTE_CENTER_CELL, XDMF_ATTRIBUTE_TYPE_SCALAR, 2, &
XDMF_ARRAY_TYPE_FLOAT64, myCellAttribute)
PRINT *, 'Cell Attribute ID: ', cellAttributeId
nodeSmallAttributeId = XDMFADDATTRIBUTE(obj, 'SmallNodeValues'//CHAR(0), &
XDMF_ATTRIBUTE_CENTER_NODE, XDMF_ATTRIBUTE_TYPE_SCALAR, 6, &
XDMF_ARRAY_TYPE_FLOAT64, mySmallerNode)
PRINT *, 'Node Attribute ID: ', nodeSmallAttributeId
tempID = XDMFADDINFORMATION(obj, 'Grid1'//CHAR(0), 'This is Grid 1'//CHAR(0))
tempID = XDMFADDINFORMATION(obj, 'SubInformation'//CHAR(0), 'This is an information inside an information'//CHAR(0))
CALL XDMFADDINFORMATIONARRAY(obj, 1, myBrick, 3, XDMF_ARRAY_TYPE_FLOAT64)
......
......@@ -26,13 +26,6 @@ PROGRAM XdmfFortranExample
infilename = 'my_output.xmf'//CHAR(0)
CALL XDMFINIT(obj)
CALL XDMFSETMAXOPENEDFILES(1)
numContained = XDMFGETMAXOPENEDFILES()
PRINT *, 'Maximum hdf5 files loaded: ', numContained
CALL XDMFREAD(obj, infilename)
PRINT *, 'Load From: ', TRIM(infilename)
......@@ -319,7 +312,6 @@ PROGRAM XdmfFortranExample
PRINT *, 'Key: ', itemKey
PRINT *, 'Value: ', itemValue
CALL XDMFCLOSEOPENEDHDF5FILES()
CALL XDMFCLOSE(obj)
......
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