forked from trilinos/Trilinos
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable OpenMP for GCC 4.8.4 build (trilinos#2562)
This was the agreement as part trilinos#2317. NOTE: This is using 'mpiexec --bind-to none ...' to avoid pinning the threads in differnet MPI ranks to the same cores. See trilinos#2422.
- Loading branch information
1 parent
684a965
commit c296f6c
Showing
4 changed files
with
48 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# This file can be read in using either: | ||
# | ||
# -C <abs-path>/<file-name>.cmake | ||
# | ||
# or: | ||
# | ||
# -DTrilinos_CONFIGURE_OPTIONS_FILE:STRING=cmake/std/<file-name>.cmake | ||
# | ||
|
||
# Handle this being passed in with -C option instead of | ||
# <Project>_CONFIGURE_OPTIONS_FILE. | ||
IF ("${PROJECT_NAME}" STREQUAL "") | ||
SET(PROJECT_NAME Trilinos) | ||
INCLUDE("${CMAKE_CURRENT_LIST_DIR}/../tribits/core/utils/AssertDefined.cmake") | ||
ENDIF() | ||
|
||
INCLUDE("${CMAKE_CURRENT_LIST_DIR}/SetUtils.cmake") | ||
|
||
TRIL_SET_BOOL_CACHE_VAR(${PROJECT_NAME}_ENABLE_OpenMP ON) | ||
|
||
TRIL_SET_CACHE_VAR(MPI_EXEC_PRE_NUMPROCS_FLAGS "--bind-to;none") | ||
# NOTE: The above is a workaround for the problem of having threads on MPI | ||
# ranks bind to the same cores (see #2422). | ||
|
||
# NOTE: The order of these includes matters! | ||
|
||
include("${CMAKE_CURRENT_LIST_DIR}/MpiReleaseDebugSharedPtSettings.cmake") | ||
include("${CMAKE_CURRENT_LIST_DIR}/BasicCiTestingSettings.cmake") | ||
include("${CMAKE_CURRENT_LIST_DIR}/sems/SEMSDevEnv.cmake") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,21 @@ | ||
MACRO(TRIL_SET_BOOL_CACHE_VAR VAR_NAME VAR_VALUE) | ||
# | ||
# Usage: | ||
# | ||
# TRIL_SET_CACHE_VAR(<varName> <varVal> CACHE <type>) | ||
# | ||
MACRO(TRIL_SET_CACHE_VAR VAR_NAME VAR_VALUE) | ||
IF ("${${VAR_NAME}}" STREQUAL "") | ||
MESSAGE("-- " "Setting ${VAR_NAME}='${VAR_VALUE}' by default") | ||
SET(${VAR_NAME} ${VAR_VALUE} CACHE BOOL | ||
SET(${VAR_NAME} "${VAR_VALUE}" ${ARGN} | ||
"Set in ${CMAKE_CURRENT_LIST_FILE}") | ||
ENDIF() | ||
ENDMACRO() | ||
|
||
# | ||
# Usage: | ||
# | ||
# TRIL_SET_BOOL_CACHE_VAR(<varName> <varVal>) | ||
# | ||
MACRO(TRIL_SET_BOOL_CACHE_VAR VAR_NAME VAR_VALUE) | ||
TRIL_SET_CACHE_VAR(${VAR_NAME} ${VAR_VALUE} CACHE BOOL) | ||
ENDMACRO() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters