Skip to content
Permalink
Browse files

Merge #3334 #3335 #3336

3334: Update io.rst r=jngrad a=jonaslandsgesell

link to h5md plugin for VMD

3335: Enable oversubscribing in OpenMPI 2.X r=fweik a=jngrad

Fixes #3333

3336: Fallthrough and remove duplicate line r=jngrad a=hirschsn

Description of changes:
 - Remove a duplicated line in `topology_check_resort` by falling through as done for other cell systems in this function.


PR Checklist
------------
 - [ ] Tests?
   - [ ] Interface
   - [ ] Core 
 - [ ] Docs?


Co-authored-by: Jonas Landsgesell <jonaslandsgesell@users.noreply.github.com>
Co-authored-by: Jean-Noël Grad <jgrad@icp.uni-stuttgart.de>
Co-authored-by: Steffen Hirschmann <steffen.hirschmann@ipvs.uni-stuttgart.de>
  • Loading branch information
4 people committed Nov 22, 2019
4 parents c91ea5e + e2b3de7 + d1440da + a13eb14 commit d588ea89d820d8b32ee930b5d539a5166f201d16
@@ -1,7 +1,16 @@
if(NOT DEFINED TEST_NP)
include(ProcessorCount)
ProcessorCount(NP)
math(EXPR TEST_NP "${NP}/2 + 1")
if(${TEST_NP} GREATER 4)
set(TEST_NP 4)
endif()
endif()

if(EXISTS ${MPIEXEC})
# OpenMPI 3.0 and higher checks the number of processes against the number of CPUs
# OpenMPI 2.0 and higher checks the number of processes against the number of CPUs
execute_process(COMMAND ${MPIEXEC} --version RESULT_VARIABLE mpi_version_result OUTPUT_VARIABLE mpi_version_output ERROR_VARIABLE mpi_version_output)
if (mpi_version_result EQUAL 0 AND mpi_version_output MATCHES "\\(Open(RTE| MPI)\\) ([3-9]\\.|1[0-9])")
if (mpi_version_result EQUAL 0 AND mpi_version_output MATCHES "\\(Open(RTE| MPI)\\) ([2-9]\\.|1[0-9])")
set(MPIEXEC_OVERSUBSCRIBE "-oversubscribe")
else()
set(MPIEXEC_OVERSUBSCRIBE "")
@@ -35,10 +44,8 @@ function(UNIT_TEST)

# If NUM_PROC is given, set up MPI parallel test case
if( TEST_NUM_PROC )
if(DEFINED TEST_NP)
if(${TEST_NUM_PROC} GREATER ${TEST_NP})
set(TEST_NUM_PROC ${TEST_NP})
endif()
if(${TEST_NUM_PROC} GREATER ${TEST_NP})
set(TEST_NUM_PROC ${TEST_NP})
endif()

add_test(${TEST_NAME} ${MPIEXEC} ${MPIEXEC_OVERSUBSCRIBE} ${MPIEXEC_NUMPROC_FLAG} ${TEST_NUM_PROC} ${MPIEXEC_PREFLAGS} ${CMAKE_CURRENT_BINARY_DIR}/${TEST_NAME} ${MPIEXEC_POSTFLAGS})
@@ -188,7 +188,8 @@ all positions stored in the file called "h5mdfile.h5" can be read using:
h5file = h5py.File("h5mdfile.h5", 'r')
positions = h5file['particles/atoms/position/value']
Furthermore, the files can be inspected with the GUI tool hdfview.
Furthermore, the files can be inspected with the GUI tool hdfview or visually with the
H5MD VMD plugin (see `H5MD plugin <https://github.com/h5md/VMD-h5mdplugin>`_).

For other examples, see :file:`/samples/h5md.py`

@@ -218,7 +218,6 @@ void topology_init(int cs, double range, CellPList *local) {
bool topology_check_resort(int cs, bool local_resort) {
switch (cs) {
case CELL_STRUCTURE_DOMDEC:
return boost::mpi::all_reduce(comm_cart, local_resort, std::logical_or<>());
case CELL_STRUCTURE_NSQUARE:
case CELL_STRUCTURE_LAYERED:
return boost::mpi::all_reduce(comm_cart, local_resort, std::logical_or<>());
@@ -1,3 +1,5 @@
include(unit_test)

add_subdirectory(python)
add_subdirectory(cmake)

@@ -1,19 +1,3 @@
if(NOT DEFINED TEST_NP)
include(ProcessorCount)
ProcessorCount(NP)
math(EXPR TEST_NP "${NP}/2 + 1")
endif()

if(EXISTS ${MPIEXEC})
# OpenMPI 3.0 and higher checks the number of processes against the number of CPUs
execute_process(COMMAND ${MPIEXEC} --version RESULT_VARIABLE mpi_version_result OUTPUT_VARIABLE mpi_version_output ERROR_VARIABLE mpi_version_output)
if (mpi_version_result EQUAL 0 AND mpi_version_output MATCHES "\\(Open(RTE| MPI)\\) ([3-9]\\.|1[0-9])")
set(MPIEXEC_OVERSUBSCRIBE "-oversubscribe")
else()
set(MPIEXEC_OVERSUBSCRIBE "")
endif()
endif()

function(PYTHON_TEST)
cmake_parse_arguments(TEST "" "FILE;MAX_NUM_PROC;SUFFIX" "DEPENDS;DEPENDENCIES;LABELS" ${ARGN})
get_filename_component(TEST_NAME ${TEST_FILE} NAME_WE)
@@ -1,9 +1,3 @@
if(NOT DEFINED TEST_NP)
include(ProcessorCount)
ProcessorCount(NP)
math(EXPR TEST_NP "${NP}/2 + 1")
endif()

set(TEST_FILE_CONFIGURED_IMPORTLIB_WRAPPER ${CMAKE_CURRENT_BINARY_DIR}/test_importlib_wrapper.py)
configure_file(importlib_wrapper.py ${CMAKE_CURRENT_BINARY_DIR}/importlib_wrapper.py)
configure_file(test_importlib_wrapper.py ${TEST_FILE_CONFIGURED_IMPORTLIB_WRAPPER})

0 comments on commit d588ea8

Please sign in to comment.
You can’t perform that action at this time.