focusing on tweaking ifort branch first
This commit is contained in:
parent
ee148fe19c
commit
2cf5225875
|
@ -24,7 +24,7 @@ if (DAMASK_DRIVER STREQUAL "SPECTRAL")
|
|||
elseif (DAMASK_DRIVER STREQUAL "FEM")
|
||||
set (FEM ON )
|
||||
else (DAMASK_DRIVER STREQUAL "SPECTRAL")
|
||||
message (FATAL_ERROR "Unknown driver detected, check build script!")
|
||||
message (FATAL_ERROR "!?driver?!, check build script!")
|
||||
endif (DAMASK_DRIVER STREQUAL "SPECTRAL")
|
||||
|
||||
# COMPILE VARIABLES
|
||||
|
@ -110,9 +110,9 @@ message("***Set PETSC_LINK_LIB to:\n${PETSC_LINK_LIB}\n")
|
|||
message("***Use PETSC wrapped compiler:\n${MPIEXEC}\n")
|
||||
|
||||
# set include directories
|
||||
set (DAAMSK_INCLDUE_FLAGS "${DAAMSK_INCLDUE_FLAGS} ${PETSC_INCLUDES}" )
|
||||
set (DAAMSK_INCLDUE_FLAGS "${DAAMSK_INCLDUE_FLAGS} -I${PROJECT_SOURCE_DIR}/lib")
|
||||
#set (DAAMSK_INCLDUE_FLAGS "${DAAMSK_INCLDUE_FLAGS} -I${HDF5_DIR}/include -lm" )
|
||||
set (DAMASK_INCLUDE_FLAGS "${DAMASK_INCLUDE_FLAGS} ${PETSC_INCLUDES}" )
|
||||
set (DAMASK_INCLUDE_FLAGS "${DAMASK_INCLUDE_FLAGS} -I${PROJECT_SOURCE_DIR}/lib")
|
||||
#set (DAMASK_INCLUDE_FLAGS "${DAMASK_INCLUDE_FLAGS} -I${HDF5_DIR}/include -lm" )
|
||||
# set link libraries from PETSc
|
||||
set (DAMASK_LINK_FLAGS "${DAMASK_LINK_FLAGS} ${PETSC_LINK_LIB}" )
|
||||
set (DAMASK_LINK_FLAGS "${DAMASK_LINK_FLAGS} ${PETSC_EXTERNAL_LIB}")
|
||||
|
@ -376,8 +376,8 @@ set (PRECISION_gfortran "-fdefault-real-8 -fdefault-double-8")
|
|||
get_filename_component (Fortran_COMPILER_NAME ${CMAKE_Fortran_COMPILER} NAME)
|
||||
|
||||
# linker from PETSc goes first
|
||||
set (CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} ${DAMASK_LINK_FLAGS}" )
|
||||
set (CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} ${DAMASK_LINK_FLAGS}" )
|
||||
#set (CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} ${DAMASK_LINK_FLAGS}" )
|
||||
#set (CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} ${DAMASK_LINK_FLAGS}" )
|
||||
|
||||
if (Fortran_COMPILER_NAME MATCHES "ifort.*")
|
||||
# need the PETSC wrapped version of ifort
|
||||
|
@ -389,19 +389,24 @@ if (Fortran_COMPILER_NAME MATCHES "ifort.*")
|
|||
set (CMAKE_Fortran_FLAGS_RELEASE "${CMAKE_Fortran_FLAGS_RELEASE} ${COMPILE_OPTIONS_ifort}")
|
||||
set (CMAKE_Fortran_FLAGS_RELEASE "${CMAKE_Fortran_FLAGS_RELEASE} ${PRECISION_ifort}" )
|
||||
|
||||
set (CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} ${PETSC_LINK_LIB}" )
|
||||
set (CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} ${OPENMP_FLAG_ifort}" )
|
||||
set (CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} ${LINK_OPTIONS_ifort}" )
|
||||
set (CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} ${STANDARD_CHECK_ifort}")
|
||||
set (CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} ${OPTIMIZATION_ifort}" )
|
||||
# for DEBUG
|
||||
set (CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_DEBUG} ${COMPILE_OPTIONS_ifort}")
|
||||
set (CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_DEBUG} ${PRECISION_ifort}" )
|
||||
set (CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_DEBUG} ${DEBUG_OPTIONS_ifort}" )
|
||||
set (CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} ${STANDARD_CHECK_ifort}")
|
||||
set (CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} ${PETSC_EXTERNAL_LIB}" )
|
||||
|
||||
|
||||
# for DEBUG
|
||||
set (CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_DEBUG} ${CMAKE_Fortran_FLAGS_RELEASE}")
|
||||
set (CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_DEBUG} ${DEBUG_OPTIONS_ifort}" )
|
||||
|
||||
set (CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} ${PETSC_LINK_LIB}" )
|
||||
set (CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} ${OPENMP_FLAG_ifort}" )
|
||||
set (CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} ${LINK_OPTIONS_ifort}" )
|
||||
set (CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} ${STANDARD_CHECK_ifort}")
|
||||
set (CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} ${OPTIMIZATION_ifort}" )
|
||||
set (CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} ${STANDARD_CHECK_ifort}")
|
||||
set (CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} ${PETSC_EXTERNAL_LIB}" )
|
||||
set (CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} ${DEBUG_OPTIONS_ifort}" )
|
||||
#
|
||||
elseif (Fortran_COMPILER_NAME MATCHES "gfortran.*")
|
||||
|
|
|
@ -37,7 +37,4 @@ cmake -D PETSC_DIR=${PETSC_DIR} \
|
|||
-D OPENMP=ON \
|
||||
-D OPTIMIZATION=DEFENSIVE \
|
||||
-D DAMASK_DRIVER=SPECTRAL \
|
||||
../..
|
||||
|
||||
# instruction for compiling
|
||||
echo "Please go into the directory above and use make to build DAMASK_spectal.exe"
|
||||
../..
|
Loading…
Reference in New Issue