Commit f8b24806 authored by ghweber's avatar ghweber
Browse files

Added hack/workaround to add MPI libraries to the end of the link line....

Added hack/workaround to add MPI libraries to the end of the link line. Updated config for franklin.

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@9709 18c085ea-50e0-402c-830e-de6fd14e8384
parent bc2eb8bf
......@@ -55,6 +55,14 @@
# Added new function ADD_TARGET_DEFINITIONS to add defines to targets.
# This was needed for the plots to define ENGINE only for the engine build.
#
# Gunther H. Weber, Thu Jan 28 14:33:36 PST 2010
# Added hack/workaround that ensures that the static MPI libraries get added
# to the end of the link line. In essence, we add a dummy/empty library
# that has the MPI libraries as dependencies. This libary is added to the
# end of the link line of parallel executables. Doing so ensures that cmake
# will add the depencies of this dummy library, i.e., the MPI libraries, to
# the end of the link line.
#
#****************************************************************************/
CMAKE_MINIMUM_REQUIRED(VERSION 2.6.4 FATAL_ERROR)
......@@ -702,10 +710,23 @@ FUNCTION(ADD_PARALLEL_EXECUTABLE target sources)
LINK_FLAGS ${PAR_LINK_FLAGS}
)
ENDIF(VISIT_PARALLEL_LINKER_FLAGS)
TARGET_LINK_LIBRARIES(${target} ${VISIT_PARALLEL_LIBS})
# If we're on doing this "nolink mpi" option, we rely on the
# PARALLEL_TARGET_LINK_LIBRARIES function to actually link the
# target with MPI.
IF(NOT VISIT_NOLINK_MPI_WITH_LIBRARIES) # This is a new if test
TARGET_LINK_LIBRARIES(${target} ${VISIT_PARALLEL_LIBS})
ENDIF(NOT VISIT_NOLINK_MPI_WITH_LIBRARIES)
ENDIF(VISIT_PARALLEL_CXXFLAGS)
ENDFUNCTION(ADD_PARALLEL_EXECUTABLE)
FUNCTION(PARALLEL_EXECUTABLE_LINK_LIBRARIES target)
IF(VISIT_NOLINK_MPI_WITH_LIBRARIES)
TARGET_LINK_LIBRARIES(${target} ${ARGN} link_mpi_libs)
ELSE(VISIT_NOLINK_MPI_WITH_LIBRARIES)
TARGET_LINK_LIBRARIES(${target} ${ARGN})
ENDIF(VISIT_NOLINK_MPI_WITH_LIBRARIES)
ENDFUNCTION(PARALLEL_EXECUTABLE_LINK_LIBRARIES)
FUNCTION(ADD_PARALLEL_LIBRARY target sources)
SET(allsources ${sources})
FOREACH (X ${ARGN})
......
......@@ -12,6 +12,9 @@
SET(VISITHOME /usr/common/graphics/installs/visit_3rdparty)
SET(VISITARCH linux-x86_64_gcc-4.4)
SET(VISIT_VERBOSE_MAKEFILE TRUE)
VISIT_OPTION_DEFAULT(CMAKE_INSTALL_PREFIX /usr/common/graphics/visit)
VISIT_OPTION_DEFAULT(VISIT_INSTALL_THIRD_PARTY ON)
VISIT_OPTION_DEFAULT(CMAKE_BUILD_TYPE Release)
##
## Do not build Tuvok
......@@ -75,7 +78,7 @@ VISIT_OPTION_DEFAULT(VISIT_CGNS_DIR ${VISITHOME}/cgns/2.4/${VISITARCH})
##
## Exodus
##
VISIT_OPTION_DEFAULT(VISIT_EXODUSII_DIR ${VISITHOME}/exodus/4.46/${VISITARCH})
#VISIT_OPTION_DEFAULT(VISIT_EXODUSII_DIR ${VISITHOME}/exodus/4.46/${VISITARCH})
##
## GDAL
......
......@@ -36,6 +36,14 @@
#
# Modifications:
#
# Gunther H. Weber, Thu Jan 28 14:33:36 PST 2010
# Added hack/workaround that ensures that the static MPI libraries get added
# to the end of the link line. In essence, we add a dummy/empty library
# that has the MPI libraries as dependencies. This libary is added to the
# end of the link line of parallel executables. Doing so ensures that cmake
# will add the depencies of this dummy library, i.e., the MPI libraries, to
# the end of the link line.
#
#****************************************************************************/
SET(LIBENGINE_SOURCES
......@@ -211,10 +219,13 @@ IF(VISIT_PARALLEL)
cognomen
)
ADD_LIBRARY(link_mpi_libs STATIC empty.c)
TARGET_LINK_LIBRARIES(link_mpi_libs ${VISIT_PARALLEL_LIBS})
ADD_PARALLEL_EXECUTABLE(engine_par_exe main.C ${ENGINE_STATIC_SOURCES})
SET_TARGET_PROPERTIES(engine_par_exe PROPERTIES OUTPUT_NAME engine_par)
TARGET_LINK_LIBRARIES(engine_par_exe
PARALLEL_EXECUTABLE_LINK_LIBRARIES(engine_par_exe
${engine_par_exe_IDatabase_par}
${engine_par_exe_EDatabase_par}
${engine_par_exe_IOperator_par}
......
......@@ -39,6 +39,14 @@
# Hank Childs, Wed Jan 13 11:23:39 CST 2010
# Rename convert to visitconvert, to avoid name conflicts with other tools.
#
# Gunther H. Weber, Thu Jan 28 14:33:36 PST 2010
# Added hack/workaround that ensures that the static MPI libraries get added
# to the end of the link line. In essence, we add a dummy/empty library
# that has the MPI libraries as dependencies. This libary is added to the
# end of the link line of parallel executables. Doing so ensures that cmake
# will add the depencies of this dummy library, i.e., the MPI libraries, to
# the end of the link line.
#
#****************************************************************************/
INCLUDE_DIRECTORIES(
......@@ -169,7 +177,7 @@ IF(VISIT_PARALLEL)
IF(VISIT_DBIO_ONLY)
SET_TARGET_PROPERTIES(visitconvert_par PROPERTIES OUTPUT_NAME visitconvert_par_lite)
TARGET_LINK_LIBRARIES(visitconvert_par
PARALLEL_EXECUTABLE_LINK_LIBRARIES(visitconvert_par
${engine_par_exe_IDatabase_par}
${engine_par_exe_EDatabase_par}
avtdatabase_par
......@@ -187,7 +195,7 @@ IF(VISIT_PARALLEL)
${ZLIB_LIB}
)
ELSE(VISIT_DBIO_ONLY)
TARGET_LINK_LIBRARIES(visitconvert_par
PARALLEL_EXECUTABLE_LINK_LIBRARIES(visitconvert_par
${engine_par_exe_IDatabase_par}
${engine_par_exe_EDatabase_par}
avtdatabase_par
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment