Commit 0cd3721d authored by Chuck Atkins's avatar Chuck Atkins
Browse files

Added a cross_target for a generic Cray programming environment

parent b77803e7
diff --git cross/paraview/src/paraview/VTK/CMake/vtkWrapPython.cmake cross/paraview/src/paraview/VTK/CMake/vtkWrapPython.cmake
index 3b94fa0..1d0154c 100644
--- cross/paraview/src/paraview/VTK/CMake/vtkWrapPython.cmake
+++ cross/paraview/src/paraview/VTK/CMake/vtkWrapPython.cmake
@@ -191,6 +191,11 @@ if(VTK_WRAP_PYTHON_FIND_LIBS)
# the libraries. This should be needed only rarely. It should
# also be moved to the CMake FindPython.cmake module at some point.
if(UNIX)
+ find_library(PYTHON_UTIL_LIBRARY
+ NAMES util
+ DOC "Utility library needed for vtkpython")
+ mark_as_advanced(PYTHON_UTIL_LIBRARY)
+
if(NOT DEFINED PYTHON_EXTRA_LIBS)
set(PYTHON_EXTRA_LIBS "" CACHE STRING
"Extra libraries to link when linking to python (such as \"z\" for zlib). Separate multiple libraries with semicolons.")
@@ -199,7 +204,7 @@ if(VTK_WRAP_PYTHON_FIND_LIBS)
endif()
# Include any extra libraries for python.
- set(VTK_PYTHON_LIBRARIES ${VTK_PYTHON_LIBRARIES} ${PYTHON_EXTRA_LIBS})
+ set(VTK_PYTHON_LIBRARIES ${VTK_PYTHON_LIBRARIES} ${PYTHON_UTIL_LIBRARY} ${PYTHON_EXTRA_LIBS})
endif()
# Determine the location of the supplied header in the include_dirs supplied.
diff --git cross/paraview/src/paraview/VTK/Utilities/Python/CMakeLists.txt cross/paraview/src/paraview/VTK/Utilities/Python/CMakeLists.txt
index 999446f..97f97a2 100644
--- cross/paraview/src/paraview/VTK/Utilities/Python/CMakeLists.txt
+++ cross/paraview/src/paraview/VTK/Utilities/Python/CMakeLists.txt
@@ -3,7 +3,7 @@
set(VTK_WRAP_PYTHON_FIND_LIBS ON)
include(vtkWrapPython)
-set(${vtk-module}_LIBRARIES ${PYTHON_LIBRARIES})
+set(${vtk-module}_LIBRARIES ${VTK_PYTHON_LIBRARIES})
set(${vtk-module}_SYSTEM_INCLUDE_DIRS "${PYTHON_INCLUDE_DIRS}")
set(${vtk-module}_NO_Header_Test 1)
vtk_module_impl()
diff --git cross/paraview/src/paraview/VTK/Wrapping/Python/CMakeLists.txt cross/paraview/src/paraview/VTK/Wrapping/Python/CMakeLists.txt
index c5ac9e7..ce5c6d5 100644
--- cross/paraview/src/paraview/VTK/Wrapping/Python/CMakeLists.txt
+++ cross/paraview/src/paraview/VTK/Wrapping/Python/CMakeLists.txt
@@ -51,13 +51,6 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR}
${vtkPython_INCLUDE_DIRS}
${vtkWrappingPythonCore_INCLUDE_DIRS})
-if(UNIX)
- find_library(PYTHON_UTIL_LIBRARY
- NAMES util
- DOC "Utility library needed for vtkpython")
- mark_as_advanced(PYTHON_UTIL_LIBRARY)
-endif()
-
# Generate the header which initializes Python modules when BUILD_SHARED_LIBS is
# OFF. The py_module_dependencies will be set to the libraries we should link
# against when we use the vtkpythonmodules.h file.
set(PARAVIEW_OPTIONS "")
list(APPEND PARAVIEW_OPTIONS "-DBUILD_SHARED_LIBS:BOOL=OFF")
list(APPEND PARAVIEW_OPTIONS "-DBUILD_TESTING:BOOL=OFF")
list(APPEND PARAVIEW_OPTIONS "-DPARAVIEW_BUILD_QT_GUI:BOOL=OFF")
#
list(APPEND PARAVIEW_OPTIONS "-DENABLE_MPI4PY:BOOL=ON")
#
list(APPEND PARAVIEW_OPTIONS "-DPARAVIEW_USE_MPI:BOOL=ON")
#
list(APPEND PARAVIEW_OPTIONS "-DVTK_USE_SYSTEM_HDF5:BOOL=ON")
#
list(APPEND PARAVIEW_OPTIONS "-DVTK_USE_SYSTEM_ZLIB:BOOL=ON")
#
list(APPEND PARAVIEW_OPTIONS "-DPARAVIEW_ENABLE_FFMPEG:BOOL=OFF")
#
list(APPEND PARAVIEW_OPTIONS "-DPARAVIEW_USE_VISITBRIDGE:BOOL=ON")
list(APPEND PARAVIEW_OPTIONS "-DVISIT_BUILD_READER_CGNS:BOOL=OFF")
list(APPEND PARAVIEW_OPTIONS "-DVISIT_BUILD_READER_Silo:BOOL=OFF")
#
list(APPEND PARAVIEW_OPTIONS "-DPARAVIEW_BUILD_PLUGIN_AdiosReader:BOOL=OFF")
list(APPEND PARAVIEW_OPTIONS "-DPARAVIEW_BUILD_PLUGIN_AnalyzeNIfTIIO:BOOL=OFF")
list(APPEND PARAVIEW_OPTIONS "-DPARAVIEW_BUILD_PLUGIN_ArrowGlyph:BOOL=OFF")
list(APPEND PARAVIEW_OPTIONS "-DPARAVIEW_BUILD_PLUGIN_CoProcessingScriptGenerator:BOOL=OFF")
list(APPEND PARAVIEW_OPTIONS "-DPARAVIEW_BUILD_PLUGIN_EyeDomeLighting:BOOL=OFF")
list(APPEND PARAVIEW_OPTIONS "-DPARAVIEW_BUILD_PLUGIN_ForceTime:BOOL=OFF")
list(APPEND PARAVIEW_OPTIONS "-DPARAVIEW_BUILD_PLUGIN_GMVReader:BOOL=OFF")
list(APPEND PARAVIEW_OPTIONS "-DPARAVIEW_BUILD_PLUGIN_H5PartReader:BOOL=OFF")
list(APPEND PARAVIEW_OPTIONS "-DPARAVIEW_BUILD_PLUGIN_MantaView:BOOL=OFF")
list(APPEND PARAVIEW_OPTIONS "-DPARAVIEW_BUILD_PLUGIN_Moments:BOOL=OFF")
list(APPEND PARAVIEW_OPTIONS "-DPARAVIEW_BUILD_PLUGIN_NonOrthogonalSource:BOOL=OFF")
list(APPEND PARAVIEW_OPTIONS "-DPARAVIEW_BUILD_PLUGIN_PacMan:BOOL=OFF")
list(APPEND PARAVIEW_OPTIONS "-DPARAVIEW_BUILD_PLUGIN_PointSprite:BOOL=OFF")
list(APPEND PARAVIEW_OPTIONS "-DPARAVIEW_BUILD_PLUGIN_PrismPlugin:BOOL=OFF")
list(APPEND PARAVIEW_OPTIONS "-DPARAVIEW_BUILD_PLUGIN_QuadView:BOOL=OFF")
list(APPEND PARAVIEW_OPTIONS "-DPARAVIEW_BUILD_PLUGIN_SLACTools:BOOL=OFF")
list(APPEND PARAVIEW_OPTIONS "-DPARAVIEW_BUILD_PLUGIN_SciberQuestToolKit:BOOL=OFF")
list(APPEND PARAVIEW_OPTIONS "-DPARAVIEW_BUILD_PLUGIN_SierraPlotTools:BOOL=OFF")
list(APPEND PARAVIEW_OPTIONS "-DPARAVIEW_BUILD_PLUGIN_SurfaceLIC:BOOL=OFF")
list(APPEND PARAVIEW_OPTIONS "-DPARAVIEW_BUILD_PLUGIN_UncertaintyRendering:BOOL=OFF")
list(APPEND PARAVIEW_OPTIONS "-DPARAVIEW_BUILD_PLUGIN_VaporPlugin:BOOL=OFF")
list(APPEND PARAVIEW_OPTIONS "-DPARAVIEW_BUILD_PLUGIN_pvblot:BOOL=OFF")
list(APPEND PARAVIEW_OPTIONS "-DPARAVIEW_BUILD_PLUGIN_StreamingParticles:BOOL=OFF")
set( CMAKE_REQUIRE_LARGE_FILE_SUPPORT_COMPILED TRUE
CACHE INTERNAL "Result from TRY_COMPILE" FORCE)
set( CMAKE_REQUIRE_LARGE_FILE_SUPPORT 0
CACHE INTERNAL "Result from TRY_RUN" FORCE)
set( CMAKE_REQUIRE_LARGE_FILE_SUPPORT__TRYRUN_OUTPUT ""
CACHE INTERNAL "Output from TRY_RUN" FORCE)
set( NO_ICC_IDYNAMIC_NEEDED_COMPILED TRUE
CACHE INTERNAL "Result from TRY_COMPILE" FORCE)
set( NO_ICC_IDYNAMIC_NEEDED 1
CACHE INTERNAL "Result from TRY_RUN" FORCE)
set( NO_ICC_IDYNAMIC_NEEDED__TRYRUN_OUTPUT ""
CACHE INTERNAL "Output from TRY_RUN" FORCE)
set( KWSYS_LFS_WORKS_COMPILED TRUE
CACHE INTERNAL "Result from TRY_COMPILE" FORCE)
set( KWSYS_LFS_WORKS 0
CACHE INTERNAL "Result from TRY_RUN" FORCE)
set( KWSYS_LFS_WORKS__TRYRUN_OUTPUT ""
CACHE INTERNAL "Output from TRY_RUN" FORCE)
set(DOUBLE_IS_LITTLE_ENDIAN_IEEE754_COMPILED TRUE
CACHE INTERNAL "Result of TRY_COMPILE" FORCE)
set(DOUBLE_IS_LITTLE_ENDIAN_IEEE754 0
CACHE INTERNAL "Result of TRY_RUN" FORCE)
set(DOUBLE_IS_BIG_ENDIAN_IEEE754_COMPILED TRUE
CACHE INTERNAL "Result of TRY_COMPILE" FORCE)
set(DOUBLE_IS_BIG_ENDIAN_IEEE754 1
CACHE INTERNAL "Result of TRY_RUN" FORCE)
set(DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754_COMPILED TRUE
CACHE INTERNAL "Result of TRY_COMPILE" FORCE)
set(DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1
CACHE INTERNAL "Result of TRY_RUN" FORCE)
set(X87_DOUBLE_ROUNDING_COMPILED TRUE
CACHE INTERNAL "Result of TRY_COMPILE" FORCE)
set(X87_DOUBLE_ROUNDING 0
CACHE INTERNAL "Result of TRY_RUN" FORCE)
set(TANH_PRESERVES_ZERO_SIGN_COMPILED TRUE
CACHE INTERNAL "Result of TRY_COMPILE" FORCE)
set(TANH_PRESERVES_ZERO_SIGN 0
CACHE INTERNAL "Result of TRY_RUN" FORCE)
set(POSIX_SEMAPHORES_NOT_ENABLED_COMPILED TRUE
CACHE INTERNAL "Result of TRY_COMPILE" FORCE)
set(POSIX_SEMAPHORES_NOT_ENABLED 0
CACHE INTERNAL "Result of TRY_RUN" FORCE)
set(HAVE_BROKEN_SEM_GETVALUE_COMPILED TRUE
CACHE INTERNAL "Result of TRY_COMPILE" FORCE)
set(HAVE_BROKEN_SEM_GETVALUE 0
CACHE INTERNAL "Result of TRY_RUN" FORCE)
set(HAVE_BROKEN_NICE_EXITCODE_COMPILED TRUE
CACHE INTERNAL "Result of TRY_COMPILE" FORCE)
set(HAVE_BROKEN_NICE_EXITCODE 1
CACHE INTERNAL "Result of TRY_RUN" FORCE)
set(HAVE_BROKEN_POLL_EXITCODE_COMPILED TRUE
CACHE INTERNAL "Result of TRY_COMPILE" FORCE)
set(HAVE_BROKEN_POLL_EXITCODE 1
CACHE INTERNAL "Result of TRY_RUN" FORCE)
set(HAVE_WORKING_TZSET_COMPILED TRUE
CACHE INTERNAL "Result of TRY_COMPILE" FORCE)
set(HAVE_WORKING_TZSET 0
CACHE INTERNAL "Result of TRY_RUN" FORCE)
set(HAVE_LONG_LONG_FORMAT_COMPILED TRUE
CACHE INTERNAL "Result of TRY_COMPILE" FORCE)
set(HAVE_LONG_LONG_FORMAT 0
CACHE INTERNAL "Result of TRY_RUN" FORCE)
set(HAVE_SIZE_T_FORMAT_COMPILED TRUE
CACHE INTERNAL "Result of TRY_COMPILE" FORCE)
set(HAVE_SIZE_T_FORMAT 0
CACHE INTERNAL "Result of TRY_RUN" FORCE)
# The name of the target operating system
set(CMAKE_SYSTEM_NAME CrayLinuxEnvironment)
if(DEFINED ENV{ASYNCPE_DIR})
set(COMP_DIR $ENV{ASYNCPE_DIR})
elseif(DEFINED ENV{CRAYPE_DIR})
set(COMP_DIR $ENV{CRAYPE_DIR})
else()
message(FATAL_ERROR "Unable to determine compiler dir")
endif()
# Set the compilers
set(CMAKE_C_COMPILER ${COMP_DIR}/bin/cc)
set(CMAKE_CXX_COMPILER ${COMP_DIR}/bin/CC)
set(CMAKE_Fortran_COMPILER ${COMP_DIR}/bin/ftn)
# Configuration for building only libOSMesa on Cray
# for the compute nodes running Compute Node Linux
include $(TOP)/configs/default
CONFIG_NAME = craycle-osmesa-gnu
# Compiler and flags
CC = $(GCC_PATH)/bin/gcc
CXX = $(GCC_PATH)/bin/g++
CFLAGS = -O2 -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE
CXXFLAGS = -O2 -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE
MKLIB_OPTIONS = -static
OSMESA_LIB_NAME = libOSMesa.a
GLU_LIB_NAME = libGLU.a
# Directories
SRC_DIRS = mesa glu
DRIVER_DIRS = osmesa
PROGRAM_DIRS =
# Dependencies
OSMESA_LIB_DEPS = -lm
GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(OSMESA_LIB)
APP_LIB_DEPS = -lOSMesa -lGLU -lm
#!/bin/bash
if [ $# -ne 4 ]
then
echo "Usage: $0 gnu|intel /path/to/cmake download_dir install_dir"
exit 1
fi
COMP=$1
CMAKE=$2
DOWN=$3
INST=$4
SRC=$(readlink -f $(dirname $BASH_SOURCE)/../..)
# Old cray environments use the ASYNCPE_VERSION env var and need slightly
# different modules
#
# Note: substitute craype-mc8 or craype-haswell with whatever CPU module
# your compute nodes need
if [ "x${ASYNCPE_VERSION}x" != "xx" ]
then
echo "Loading modules for (older) Cray Programming Environment"
CPU=${CRAY_CPU_TARGET}
elif [ "x${CRAYPE_VERSION}x" != "xx" ]
then
echo "Loading modules for (newer) Cray Programming Environment"
CPU=${CRAY_CPU_TARGET}
EXTRA_MODULES=craype
else
echo "Error: can't identify the right Cray OS version to load modules for"
exit 2
fi
. /opt/modules/default/init/bash
module purge 1>/dev/null 2>/dev/null
module load modules ${EXTRA_MODULES} gcc PrgEnv-${COMP} craype-${CPU} cray-mpich cray-hdf5
export CC=gcc
export CXX=g++
export FC=gfortran
mkdir tools
cd tools
${CMAKE} \
-DCROSS_BUILD_STAGE:STRING=TOOLS -Dcross_target:STRING=cray_prgenv \
-DCMAKE_BUILD_TYPE:STRING=Release \
-DBUILD_TESTING:BOOL=FALSE \
-DParaView_FROM_GIT:BOOL=OFF \
-DENABLE_paraview:BOOL=TRUE \
-DENABLE_boost:BOOL=TRUE \
-DENABLE_python:BOOL=TRUE \
-DENABLE_zlib:BOOL=TRUE \
-DUSE_SYSTEM_zlib:BOOL=TRUE \
-DENABLE_png:BOOL=TRUE \
-DUSE_SYSTEM_png:BOOL=TRUE \
-DENABLE_bzip2:BOOL=TRUE \
-DUSE_SYSTEM_bzip2:BOOL=TRUE \
-Ddownload_location:PATH=${DOWN} \
${SRC}
make
unset CC
unset CXX
unset FC
cd ..
mkdir cross
cd cross
${CMAKE} \
-DCMAKE_INSTALL_PREFIX=${INST} \
-DCROSS_BUILD_STAGE:STRING=CROSS -Dcross_target:STRING=cray_prgenv \
-DCMAKE_BUILD_TYPE:STRING=Release \
-DBUILD_TESTING:BOOL=OFF \
-DParaView_FROM_GIT:BOOL=OFF \
-DENABLE_paraview:BOOL=TRUE \
-DENABLE_paraviewsdk:BOOL=TRUE \
-DENABLE_python:BOOL=TRUE \
-DENABLE_mesa:BOOL=TRUE \
-Ddownload_location:PATH=${DOWN} \
-DPV_MAKE_NCPUS=12 \
${SRC}
make
make install
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