From c5f1574f477be107a6ae38c1d95479cf5d03e46c Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Wed, 26 Apr 2017 09:40:45 +0200 Subject: [PATCH 1/2] commands depend on build type --- CMakeLists.txt | 17 +++++++++-------- src/CMakeLists.txt | 2 -- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9712ab1d7..2d95f87fb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -447,19 +447,20 @@ elseif(${CMAKE_Fortran_COMPILER_ID} STREQUAL "GNU") # -fdefault-integer-8: Use it to set precision to 8 bytes for integer, don't use it for the standard case of pInt=4 (there is no -fdefault-integer-4) endif () -set (CMAKE_Fortran_FLAGS "${BUILDCMD_PRE} ${OPENMP_FLAGS} ${STANDARD_CHECK} ${OPTIMIZATION_FLAGS} ${COMPILE_FLAGS} ${PRECISION_FLAGS}") -set (CMAKE_Fortran_LINK_EXECUTABLE "${BUILDCMD_PRE} ${CMAKE_LINKER} ${OPENMP_FLAGS} ${OPTIMIZATION_FLAGS} ${LINKER_FLAGS}") +set (CMAKE_Fortran_FLAGS_${CMAKE_BUILD_TYPE} "${BUILDCMD_PRE} ${OPENMP_FLAGS} ${STANDARD_CHECK} ${OPTIMIZATION_FLAGS} ${COMPILE_FLAGS} ${PRECISION_FLAGS}") +set (CMAKE_Fortran_LINK_EXECUTABLE "${BUILDCMD_PRE} ${CMAKE_LINKER} ${OPENMP_FLAGS} ${OPTIMIZATION_FLAGS} ${LINKER_FLAGS}") if ("${CMAKE_BUILD_TYPE}" STREQUAL "DEBUG") - set (CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${DEBUG_FLAGS}") - set (CMAKE_Fortran_LINK_EXECUTABLE "${CMAKE_Fortran_LINK_EXECUTABLE} ${DEBUG_FLAGS}") + set (CMAKE_Fortran_FLAGS_${CMAKE_BUILD_TYPE} "${CMAKE_Fortran_FLAGS_${CMAKE_BUILD_TYPE}} ${DEBUG_FLAGS}") + set (CMAKE_Fortran_LINK_EXECUTABLE "${CMAKE_Fortran_LINK_EXECUTABLE} ${DEBUG_FLAGS}") endif () -set (CMAKE_Fortran_LINK_EXECUTABLE "${CMAKE_Fortran_LINK_EXECUTABLE} -o ${PETSC_EXTERNAL_LIB} ${BUILDCMD_POST}") -set (CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${DAMASK_INCLUDE_FLAGS} ${BUILDCMD_POST}") +set (CMAKE_Fortran_FLAGS_${CMAKE_BUILD_TYPE} "${CMAKE_Fortran_FLAGS_${CMAKE_BUILD_TYPE}} ${DAMASK_INCLUDE_FLAGS} ${BUILDCMD_POST}") +set (CMAKE_Fortran_LINK_EXECUTABLE "${CMAKE_Fortran_LINK_EXECUTABLE} -o ${PETSC_EXTERNAL_LIB} ${BUILDCMD_POST}") -message ("Fortran Compiler Flags:\n${CMAKE_Fortran_FLAGS}\n") -message ("Fortran Linker Flags:\n${CMAKE_Fortran_LINK_EXECUTABLE}\n") +message ("Fortran Compiler Flags:\n${CMAKE_Fortran_FLAGS_${CMAKE_BUILD_TYPE}}\n") +message ("C Compiler Flags:\n${CMAKE_C_FLAGS_${CMAKE_BUILD_TYPE}}\n") +message ("Fortran Linker Command:\n${CMAKE_Fortran_LINK_EXECUTABLE}\n") # location of code add_subdirectory (src) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index a613d2f79..83647d8d0 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -16,8 +16,6 @@ if (${CMAKE_Fortran_COMPILER_ID} STREQUAL "GNU") # long lines for interaction matrix endif() -set( CMAKE_VERBOSE_MAKEFILE on ) - # The dependency detection in CMake is not functioning for Fortran, # hence we declare the dependencies from top to bottom in the following add_library(C_ROUTINES OBJECT "C_routines.c") From 175e119d7b988f41af71f2e19bb04ce10d17aba6 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Wed, 26 Apr 2017 09:41:25 +0200 Subject: [PATCH 2/2] new PETSc on matesting (inlcuding use of IMKL) --- .gitlab-ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f41487d2e..c4db3225f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -53,10 +53,11 @@ variables: MPICH_Intel: "$MPICH3_2Intel17_0" # ++++++++++++ PETSc +++++++++++++++++++++++++++++++++++++++++++++++++ PETSc3_6_4MPICH3_2Intel17_0: "Libraries/PETSc/3.6.4/Intel-17.0-MPICH-3.2" + PETSc3_7_6MPICH3_2Intel17_0: "Libraries/PETSc/3.7.5/Intel-17.0-MPICH-3.2" PETSc3_7_5MPICH3_2Intel17_0: "Libraries/PETSc/3.7.5/Intel-17.0-MPICH-3.2" PETSc3_7_5MPICH3_2GNU5_3: "Libraries/PETSc/3.7.5/GNU-5.3-MPICH-3.2" # ------------ Defaults ---------------------------------------------- - PETSc_MPICH_Intel: "$PETSc3_7_5MPICH3_2Intel17_0" + PETSc_MPICH_Intel: "$PETSc3_7_6MPICH3_2Intel17_0" PETSc_MPICH_GNU: "$PETSc3_7_5MPICH3_2GNU5_3" # ++++++++++++ FEM +++++++++++++++++++++++++++++++++++++++++++++++++++ Abaqus2016: "FEM/Abaqus/2016"