Skip to content

Commit

Permalink
Fix test data creation
Browse files Browse the repository at this point in the history
  • Loading branch information
Flamefire committed Nov 2, 2016
1 parent 7f76953 commit 9654f7e
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions examples/hdf5Test/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,16 @@ tests:
cmakeFlag: 2
cfgFile: 0001gpusHDF5Field.cfg
pre-run: &createHDF5Field
- mkdir "${TEST_INSTALL_PATH}/testData/$TEST_NAME"
- python3 "${TEST_INSTALL_PATH}/testData/createHDF5Filesets.py" --createDensity --folder "${TEST_INSTALL_PATH}/testData/$TEST_NAME" --size ${TEST_GRID_SIZE} --dt "2e-16" --time "1.5e-15"
# CellSize is multiplied with 4 and dt with 8, 130 timesteps long
- python3 "${TEST_INSTALL_PATH}/testData/createHDF5Filesets.py" --createLaser --folder "${TEST_INSTALL_PATH}/testData/$TEST_NAME" --size ${TEST_GRID_SIZE} --cellSize "16e-9" "16e-9" "16e-9" --dt "10.64e-17" --time "1.5e-15"
# Check for openPMD conformance
- find "${TEST_INSTALL_PATH}/testData/$TEST_NAME" -type f -name "*.h5" -print0 | xargs -0 -n 1 -r python "${TEST_INSTALL_PATH}/buildSystem/checkOpenPMD_h5.py" -i
- |
TESTDATA_PATH="${TEST_INSTALL_PATH}/testData"
TESTDATA_OUT_PATH="${TESTDATA_PATH}/$TEST_NAME"
mkdir "${TESTDATA_OUT_PATH}"
python3 "${TESTDATA_PATH}/createHDF5Filesets.py" --createDensity --folder "${TESTDATA_OUT_PATH}" --size ${TEST_GRID_SIZE} --cellSize "4e-9" "4e-9" "4e-9" --dt "2e-16" --time "1.5e-15"
# For laser: CellSize is multiplied with 4 and dt with 8, 130 timesteps long
python3 "${TESTDATA_PATH}/createHDF5Filesets.py" --createLaser --folder "${TESTDATA_OUT_PATH}" --size ${TEST_GRID_SIZE} --cellSize "16e-9" "16e-9" "16e-9" --dt "10.64e-17" --time "1.5e-15"
# Check for openPMD conformance
echo "Validating generated test files"
find "${TESTDATA_OUT_PATH}" -type f -name "*.h5" -print0 | xargs -0 -n 1 -r python "${TEST_INSTALL_PATH}/buildSystem/checkOpenPMD_h5.py" -i
post-run: &validateHDF5Field
- *validateOpenPMD
- python3 "${TEST_INSTALL_PATH}/testData/validateCheckpoint.py"
Expand Down

0 comments on commit 9654f7e

Please sign in to comment.