X-Git-Url: http://mmka.chem.univ.gda.pl/gitweb/?a=blobdiff_plain;f=source%2Fcluster%2Fwham%2Fsrc-M%2FCMakeLists.txt;h=f41af65e43f5a42b4b4e030f482ea3adc890879b;hb=058b4e72d61c149f66570d580bda9b47464d9df6;hp=d5fecf6fb3107f28ad58496a32fe988eb414b79d;hpb=bb4c87a620a46bdeaf10eed1a5b095d29b7e54e7;p=unres.git diff --git a/source/cluster/wham/src-M/CMakeLists.txt b/source/cluster/wham/src-M/CMakeLists.txt index d5fecf6..f41af65 100644 --- a/source/cluster/wham/src-M/CMakeLists.txt +++ b/source/cluster/wham/src-M/CMakeLists.txt @@ -37,6 +37,7 @@ set(UNRES_CLUSTER_WHAM_M_SRC0 rescode.f setup_var.f srtclust.f + ssMD.F timing.F track.F wrtclust.f @@ -52,6 +53,7 @@ set(UNRES_CLUSTER_WHAM_M_PP_SRC probabl.F read_coords.F readrtns.F + ssMD.F timing.F track.F work_partition.F @@ -62,11 +64,13 @@ set(UNRES_CLUSTER_WHAM_M_PP_SRC # Set comipiler flags for different sourcefiles #================================================ if (Fortran_COMPILER_NAME STREQUAL "ifort") - set(FFLAGS0 "-ip -w -I. -I${CMAKE_CURRENT_SOURCE_DIR}/include_unres" ) + set(FFLAGS0 "-mcmodel=medium -shared-intel -ip -w -I. -I${CMAKE_CURRENT_SOURCE_DIR}/include_unres" ) elseif (Fortran_COMPILER_NAME STREQUAL "gfortran") - set(FFLAGS0 "-std=legacy -I. -I${CMAKE_CURRENT_SOURCE_DIR}/include_unres" ) + set(FFLAGS0 "-std=legacy -mcmodel=medium -I. -I${CMAKE_CURRENT_SOURCE_DIR}/include_unres" ) +elseif (Fortran_COMPILER_NAME STREQUAL "pgf90") + set(FFLAGS0 "-mcmodel=medium -Mlarge_arrays -I. -I${CMAKE_CURRENT_SOURCE_DIR}/include_unres" ) else () - set(FFLAGS0 "-I. -I${CMAKE_CURRENT_SOURCE_DIR}/include_unres" ) + set(FFLAGS0 "-mcmodel=medium -I. -I${CMAKE_CURRENT_SOURCE_DIR}/include_unres" ) endif (Fortran_COMPILER_NAME STREQUAL "ifort") #========================================= @@ -91,6 +95,8 @@ if(UNRES_MD_FF STREQUAL "GAB" ) elseif(UNRES_MD_FF STREQUAL "E0LL2Y") # set preprocesor flags set(CPPFLAGS "PROCOR -DSPLITELE -DSCCORPDB" ) +elseif(UNRES_MD_FF STREQUAL "4P") + set(CPPFLAGS "SPLITELE -DLANG0 -DCRYST_BOND -DCRYST_THETA -DCRYST_SC -DSCCORPDB" ) endif(UNRES_MD_FF STREQUAL "GAB") #========================================= @@ -110,6 +116,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_CLUSTER_WHAM_M_SRC0 ${CMAKE_CURRENT_BINARY_DIR}/isnan_pgi.f) endif (Fortran_COMPILER_NAME STREQUAL "ifort") @@ -138,7 +148,7 @@ set_property(SOURCE proc_proc.c PROPERTY COMPILE_DEFINITIONS "LINUX -DPGI" ) #======================================== # Setting binary name #======================================== -set(UNRES_CLUSTER_WHAM_M_BIN "cluster_wham-M_${Fortran_COMPILER_NAME}.exe") +set(UNRES_CLUSTER_WHAM_M_BIN "cluster_wham-mult_${Fortran_COMPILER_NAME}_MPI_${UNRES_MD_FF}.exe") #========================================= # cinfo.f workaround for CMake @@ -179,7 +189,7 @@ set_property(SOURCE proc_proc.c PROPERTY COMPILE_DEFINITIONS "LINUX -DPGI" ) #========================================= # Set full unres CLUSTER sources #========================================= -set(UNRES_CLUSTER_WHAM_M_SRCS ${UNRES_CLUSTER_WHAM_M_SRC0} proc_proc.c) +set(UNRES_CLUSTER_WHAM_M_SRCS ${UNRES_CLUSTER_WHAM_M_SRC0} ${CMAKE_CURRENT_BINARY_DIR}/cinfo.f proc_proc.c) #========================================= # Build the binary @@ -202,5 +212,92 @@ target_link_libraries( UNRES_CLUSTER_WHAM_M_BIN xdrf ) #========================================= # Install Path #========================================= -install(TARGETS UNRES_CLUSTER_WHAM_M_BIN DESTINATION ${CMAKE_INSTALL_PREFIX}) +install(TARGETS UNRES_CLUSTER_WHAM_M_BIN DESTINATION ${CMAKE_INSTALL_PREFIX}/cluster) + +#========================================= +# TESTS +#========================================= + +# 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(WRITE ${CMAKE_CURRENT_BINARY_DIR}/scripts/cluster_wham_mpi_E0LL2Y.sh +"#!/bin/sh +export POT=GB +export INPUT=$1 +export INTIN=1L2Y_wham +export OUTPUT=1L2Y_clust +export PDB=CART +export COORD=CX +export PRINTCOOR=PRINT_PDB +#----------------------------------------------------------------------------- +CLUSTER_WHAM_BIN=${CMAKE_BINARY_DIR}/bin/${UNRES_CLUSTER_WHAM_M_BIN} +#----------------------------------------------------------------------------- +DD=${CMAKE_SOURCE_DIR}/PARAM +export BONDPAR=$DD/bond_AM1_ext_dum.parm +export THETPAR=$DD/theta_abinitio_old_ext.parm +export ROTPAR=$DD/rotamers_AM1_aura_ext.10022007.parm +export TORPAR=$DD/torsion_631Gdp_old_ext.parm +export TORDPAR=$DD/torsion_double_631Gdp_old_ext.parm +export ELEPAR=$DD/electr_631Gdp_ext.parm +export SIDEPAR=$DD/scinter_GB_ext_lip.parm +export FOURIER=$DD/fourier_opt_ext.parm.1igd_hc_iter3_3 +export SCPPAR=$DD/scp_ext.parm +export SCCORPAR=$DD/sccor_am1_pawel_ext.dat +export THETPARPDB=$DD/thetaml_ext.5parm +export ROTPARPDB=$DD/scgauss_ext.parm +export PATTERN=$DD/patterns.cart +export LIPTRANPAR=$DD/Lip_tran_initial_ext.parm +export CONTFUNC=GB +export SIDEP=$DD/contact_ext.3.parm +export SCRATCHDIR=. +#----------------------------------------------------------------------------- +echo CTEST_FULL_OUTPUT +${mpiexec} ${boot_lam} ${np} $2 $CLUSTER_WHAM_BIN +./cluster_wham_check.sh $1 +") + +# +# File permissions workaround +# +FILE( COPY ${CMAKE_CURRENT_BINARY_DIR}/scripts/cluster_wham_mpi_E0LL2Y.sh + DESTINATION ${CMAKE_CURRENT_BINARY_DIR} + FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE +) + +FILE(COPY ${CMAKE_SOURCE_DIR}/ctest/cluster_wham_check.sh + DESTINATION ${CMAKE_CURRENT_BINARY_DIR} + FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE +) + +FILE(COPY ${CMAKE_SOURCE_DIR}/ctest/1L2Y_clust.inp + DESTINATION ${CMAKE_CURRENT_BINARY_DIR} ) + +FILE(COPY ${CMAKE_SOURCE_DIR}/ctest/1L2Y_wham.cx + DESTINATION ${CMAKE_CURRENT_BINARY_DIR} ) + +FILE(COPY ${CMAKE_SOURCE_DIR}/ctest/1L2Y.pdb + DESTINATION ${CMAKE_CURRENT_BINARY_DIR} ) + + +if(UNRES_MD_FF STREQUAL "E0LL2Y") + add_test(NAME CLUSTER_WHAM_M_remd COMMAND sh ${CMAKE_CURRENT_BINARY_DIR}/cluster_wham_mpi_E0LL2Y.sh 1L2Y_clust 2 ) +endif(UNRES_MD_FF STREQUAL "E0LL2Y")