X-Git-Url: http://mmka.chem.univ.gda.pl/gitweb/?a=blobdiff_plain;f=source%2Funres%2Fsrc_MD-M%2FCMakeLists.txt;h=fdcdd4fd86d11d781bc2f706665ca906e016e83e;hb=f4fee4f336542f1e52bca12b8d97c42f60156b5d;hp=28bdae4c5ef7377c2c839e821b4fbeae49d42113;hpb=00b366442802129f22edbf1f65224295b08efddc;p=unres.git diff --git a/source/unres/src_MD-M/CMakeLists.txt b/source/unres/src_MD-M/CMakeLists.txt index 28bdae4..fdcdd4f 100644 --- a/source/unres/src_MD-M/CMakeLists.txt +++ b/source/unres/src_MD-M/CMakeLists.txt @@ -226,6 +226,10 @@ elseif (Fortran_COMPILER_NAME STREQUAL "f95") elseif (Fortran_COMPILER_NAME STREQUAL "gfortran") # Add old gfortran flags set(CPPFLAGS "${CPPFLAGS} -DG77") +elseif (Fortran_COMPILER_NAME STREQUAL "pgf90") + set(CPPFLAGS "${CPPFLAGS} -DPGI") + FILE(COPY ${CMAKE_SOURCE_DIR}/source/lib/isnan_pgi.f DESTINATION ${CMAKE_CURRENT_BINARY_DIR} ) + list(APPEND UNRES_MDM_SRC0 ${CMAKE_CURRENT_BINARY_DIR}/isnan_pgi.f) endif (Fortran_COMPILER_NAME STREQUAL "ifort") @@ -505,6 +509,26 @@ $UNRES_BIN ./prota_unres_energy_check.sh $1 ${UNRES_BIN} ") +# MESSAGE (STATUS "${MPI_Fortran_LIBRARIES}") + if ("${MPI_Fortran_LIBRARIES}" MATCHES "lam") + MESSAGE (STATUS "LAM MPI library detected") + set (boot_lam "-boot") + else() + set (boot_lam "") + endif() + + if (UNRES_SRUN) + set (np "-n") + set (mpiexec "srun") + elseif(UNRES_MPIRUN) + set (np "-np") + set (mpiexec "mpirun") + else() + set (np "-np") + set (mpiexec "mpiexec") + endif() + + # # File permissions workaround # @@ -537,7 +561,7 @@ export ROTPARPDB=$DD/scgauss.parm export PATTERN=$DD/patterns.cart #----------------------------------------------------------------------------- echo CTEST_FULL_OUTPUT -mpiexec -np $3 $UNRES_BIN | grep -v traj1file +${mpiexec} ${boot_lam} ${np} $3 $UNRES_BIN | grep -v traj1file ./prota_unres_energy_check.sh $1 ${UNRES_BIN} ") @@ -581,25 +605,18 @@ if(NOT UNRES_WITH_MPI) else(NOT UNRES_WITH_MPI) -# MESSAGE (STATUS "${MPI_Fortran_LIBRARIES}") - if ("${MPI_Fortran_LIBRARIES}" MATCHES "lam") - MESSAGE (STATUS "LAM MPI library detected") - set (boot_lam "-boot") - else() - set (boot_lam "") - endif() if(UNRES_MD_FF STREQUAL "GAB") - add_test(NAME UNRES_M_MD_MPI_Ala10 COMMAND mpiexec ${boot_lam} ${CMAKE_CURRENT_BINARY_DIR}/test_single_ala.sh ) + add_test(NAME UNRES_M_MD_MPI_Ala10 COMMAND ${mpiexec} ${boot_lam} ${CMAKE_CURRENT_BINARY_DIR}/test_single_ala.sh ) endif(UNRES_MD_FF STREQUAL "GAB") if(UNRES_MD_FF STREQUAL "E0LL2Y") - add_test(NAME UNRES_M_ENE_prota COMMAND mpiexec ${boot_lam} -np 2 ${CMAKE_CURRENT_BINARY_DIR}/test_prota_E0LL2Y.sh prota_ENE 2 ) - add_test(NAME UNRES_M_ENE1_prota COMMAND mpiexec ${boot_lam} -np 1 ${CMAKE_CURRENT_BINARY_DIR}/test_prota_E0LL2Y.sh prota_ENE 1 ) - add_test(NAME UNRES_M_MIN_prota COMMAND mpiexec ${boot_lam} -np 2 ${CMAKE_CURRENT_BINARY_DIR}/test_prota_E0LL2Y.sh prota_MIN_CART 2 ) - add_test(NAME UNRES_M_MIN_INT COMMAND mpiexec ${boot_lam} -np 1 ${CMAKE_CURRENT_BINARY_DIR}/test_prota_E0LL2Y.sh 1l2y_MIN_INT 1 ) - add_test(NAME UNRES_M_REGULAR COMMAND mpiexec ${boot_lam} -np 1 ${CMAKE_CURRENT_BINARY_DIR}/test_prota_E0LL2Y.sh 1l2y_MIN_REGULAR_INT 1 ) - add_test(NAME UNRES_M_MD_microcanonical COMMAND mpiexec ${boot_lam} -np 2 ${CMAKE_CURRENT_BINARY_DIR}/test_prota_E0LL2Y.sh 1l2y_micro 2 ) + add_test(NAME UNRES_M_ENE_prota COMMAND ${mpiexec} ${boot_lam} ${np} 2 ${CMAKE_CURRENT_BINARY_DIR}/test_prota_E0LL2Y.sh prota_ENE 2 ) + add_test(NAME UNRES_M_ENE1_prota COMMAND ${mpiexec} ${boot_lam} ${np} 1 ${CMAKE_CURRENT_BINARY_DIR}/test_prota_E0LL2Y.sh prota_ENE 1 ) + add_test(NAME UNRES_M_MIN_prota COMMAND ${mpiexec} ${boot_lam} ${np} 2 ${CMAKE_CURRENT_BINARY_DIR}/test_prota_E0LL2Y.sh prota_MIN_CART 2 ) + add_test(NAME UNRES_M_MIN_INT COMMAND ${mpiexec} ${boot_lam} ${np} 1 ${CMAKE_CURRENT_BINARY_DIR}/test_prota_E0LL2Y.sh 1l2y_MIN_INT 1 ) + add_test(NAME UNRES_M_REGULAR COMMAND ${mpiexec} ${boot_lam} ${np} 1 ${CMAKE_CURRENT_BINARY_DIR}/test_prota_E0LL2Y.sh 1l2y_MIN_REGULAR_INT 1 ) + add_test(NAME UNRES_M_MD_microcanonical COMMAND ${mpiexec} ${boot_lam} ${np} 2 ${CMAKE_CURRENT_BINARY_DIR}/test_prota_E0LL2Y.sh 1l2y_micro 2 ) add_test(NAME UNRES_M_Langevin COMMAND sh ${CMAKE_CURRENT_BINARY_DIR}/test_mpi_E0LL2Y.sh 1L2Y_L 2 2 ) # no NH in src_MD-M code # add_test(NAME UNRES_M_NoseHoover COMMAND sh ${CMAKE_CURRENT_BINARY_DIR}/test_mpi_E0LL2Y.sh 1L2Y_NH 2 2 )