gfortran wham and cluster -mcmodel=medium
[unres.git] / source / cluster / wham / src-M / CMakeLists.txt
index b911074..c9b26be 100644 (file)
@@ -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,9 +64,9 @@ 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" ) 
 else ()
   set(FFLAGS0 "-I. -I${CMAKE_CURRENT_SOURCE_DIR}/include_unres" ) 
 endif (Fortran_COMPILER_NAME STREQUAL "ifort")
@@ -181,7 +183,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
@@ -222,6 +224,9 @@ install(TARGETS UNRES_CLUSTER_WHAM_M_BIN DESTINATION ${CMAKE_INSTALL_PREFIX}/clu
   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")