From b30191b71ae1a27f87f9ce6f6e9f33d264e80982 Mon Sep 17 00:00:00 2001 From: Cezary Czaplewski Date: Thu, 26 May 2016 10:44:16 +0200 Subject: [PATCH] cmake and ctest corrections for mpi and srun --- CMakeLists.txt | 5 +++++ source/xdrfpdb/src/CMakeLists.txt | 19 +++++++++++++------ 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3022b58..2ee17e3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -144,7 +144,12 @@ find_package(MPI QUIET) if (MPI_Fortran_FOUND) message("MPI found") FIX_DBL_INCLUDE(MPI_Fortran_INCLUDE_PATH) + message(MPI_Fortran_INCLUDE_PATH) + message(${MPI_Fortran_INCLUDE_PATH}) + message(MPI_Fortran_LIBRARIES) + message(${MPI_Fortran_LIBRARIES}) option(UNRES_SRUN "Use srun instead of mpiexec ?" OFF ) + option(UNRES_MPIRUN "Use mpirun instead of mpiexec ?" OFF ) else() message("MPI not found - disabling MPI compile flags ") set ( UNRES_WITH_MPI "OFF") diff --git a/source/xdrfpdb/src/CMakeLists.txt b/source/xdrfpdb/src/CMakeLists.txt index dabac2e..e7b6907 100644 --- a/source/xdrfpdb/src/CMakeLists.txt +++ b/source/xdrfpdb/src/CMakeLists.txt @@ -103,6 +103,13 @@ install(TARGETS xdrf2ang DESTINATION ${CMAKE_INSTALL_PREFIX}/xdrfpdb) # TESTS #========================================= + if (UNRES_SRUN) + set (SRUN "srun") + else() + set (SRUN "") + endif() + + # Create files needed for tests @@ -126,16 +133,16 @@ file( COPY ${CMAKE_SOURCE_DIR}/ctest/1L2Y_MREMD_MD000.cx # Test xdrf2pdb -add_test(NAME XDRF2PDB-one COMMAND ${CMAKE_BINARY_DIR}/bin/xdrf2pdb one ala10one.seq ala10MD.cx ) -add_test(NAME XDRF2PDB-three COMMAND ${CMAKE_BINARY_DIR}/bin/xdrf2pdb three ala10three.seq ala10MD.cx ) +add_test(NAME XDRF2PDB-one COMMAND ${SRUN} ${CMAKE_BINARY_DIR}/bin/xdrf2pdb one ala10one.seq ala10MD.cx ) +add_test(NAME XDRF2PDB-three COMMAND ${SRUN} ${CMAKE_BINARY_DIR}/bin/xdrf2pdb three ala10three.seq ala10MD.cx ) # Test xdrf2pdb-m -add_test(NAME XDRF2PDB-M-one COMMAND ${CMAKE_BINARY_DIR}/bin/xdrf2pdb-m one 1L2Yone.seq 1L2Y_MREMD_MD000.cx 32 30 ) -add_test(NAME XDRF2PDB-M-three COMMAND ${CMAKE_BINARY_DIR}/bin/xdrf2pdb-m three 1L2Ythree.seq 1L2Y_MREMD_MD000.cx 32 30 ) +add_test(NAME XDRF2PDB-M-one COMMAND ${SRUN} ${CMAKE_BINARY_DIR}/bin/xdrf2pdb-m one 1L2Yone.seq 1L2Y_MREMD_MD000.cx 32 30 ) +add_test(NAME XDRF2PDB-M-three COMMAND ${SRUN} ${CMAKE_BINARY_DIR}/bin/xdrf2pdb-m three 1L2Ythree.seq 1L2Y_MREMD_MD000.cx 32 30 ) # Test xdrf2ang -add_test(NAME XDRF2ANG-one COMMAND ${CMAKE_BINARY_DIR}/bin/xdrf2ang one ala10one.seq ala10MD.cx ) -add_test(NAME XDRF2ANG-three COMMAND ${CMAKE_BINARY_DIR}/bin/xdrf2ang three ala10three.seq ala10MD.cx ) +add_test(NAME XDRF2ANG-one COMMAND ${SRUN} ${CMAKE_BINARY_DIR}/bin/xdrf2ang one ala10one.seq ala10MD.cx ) +add_test(NAME XDRF2ANG-three COMMAND ${SRUN} ${CMAKE_BINARY_DIR}/bin/xdrf2ang three ala10three.seq ala10MD.cx ) -- 1.7.9.5