Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • mosaic/software/parallel-computing/openfpm/openfpm_devices
  • argupta/openfpm_devices
2 results
Show changes
Commits on Source (9)
......@@ -41,25 +41,11 @@ Thumbs.db
*.vtk
*.swp
install-sh
AUTHORS
COPYING
ChangeLog
INSTALL
NEWS
README
Makefile
Makefile.in
config.status
config.guess
config.sub
configure
numerics
**/.deps
**/src/config
aclocal.m4
**/autom4te.cache
compile
depcomp
missing
src/mem
cmake_minimum_required(VERSION 3.8 FATAL_ERROR)
project(openfpm_devices LANGUAGES C CXX)
set(BOOST_INCLUDE ${Boost_INCLUDE_DIR} CACHE PATH "Include directory for BOOST")
set(AMD_ARCH_COMPILE "gfx900" CACHE STRING "AMD gpu architecture used to compile kernels")
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CUDA_STANDARD 14)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/cmake_modules/ /opt/rocm/hip/cmake)
set (CMAKE_CXX_STANDARD 14)
set (CMAKE_CUDA_STANDARD 14)
set (ENV{BOOST_ROOT} ${BOOST_ROOT})
set (Boost_NO_BOOST_CMAKE OFF)
find_package(Boost 1.72.0 REQUIRED COMPONENTS unit_test_framework iostreams program_options OPTIONAL_COMPONENTS fiber context)
if (NOT CUDA_ON_BACKEND STREQUAL "HIP")
find_package(OpenMP)
if (ENABLE_GARBAGE_INJECTOR)
set(DEFINE_GARBAGE_INJECTOR "#define GARBAGE_INJECTOR")
endif()
set(CUDA_ON_BACKEND CACHE STRING "Activate several backend for CUDA")
if (OPENMP_FOUND)
set(DEFINE_HAVE_OPENMP "#define HAVE_OPENMP")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
endif()
# Save Boost_LIBRARIES before alpaka fuck-up Boost
set(Boost_LIBRARIES_BCK ${Boost_LIBRARIES})
if(CUDA_ON_CPU)
set(DEFINE_CUDA_GPU "#define CUDA_GPU")
endif()
if (CUDA_ON_BACKEND STREQUAL "HIP")
find_package(HIP)
if(NOT HIP_FOUND)
message( FATAL_ERROR "HIP has not been found" )
if(NOT HIP_FOUND)
message( FATAL_ERROR "HIP has not been found" )
else()
message("HIP has been found")
endif()
if (CUDA_ON_BACKEND="HIP")
set(CMAKE_CXX_EXTENSIONS OFF)
endif()
set(DEFINE_CUDA_GPU "#define CUDA_GPU")
endif()
if (CUDA_ON_BACKEND="HIP")
set(CMAKE_CXX_EXTENSIONS OFF)
endif()
set(DEFINE_CUDA_GPU "#define CUDA_GPU")
endif()
if(HIP_FOUND)
set(DEFINE_CUDA_GPU "#define CUDA_GPU")
set(DEFINE_CUDIFY_USE_HIP "#define CUDIFY_USE_HIP")
endif()
if (CUDA_ON_BACKEND STREQUAL "CUDA")
enable_language(CUDA)
include(CheckLanguage)
if (CMAKE_CUDA_COMPILER)
set(CUDA_FOUND ON)
......@@ -46,81 +47,49 @@ if (CUDA_ON_BACKEND STREQUAL "CUDA")
list(GET CUDA_VERSION_LIST 2 CUDA_VERSION_PATCH)
if (CUDA_VERSION_MAJOR EQUAL 9 AND CUDA_VERSION_MINOR EQUAL 2)
message("CUDA is compatible 9.2")
set(WARNING_SUPPRESSION_AND_OPTION_NVCC -Xcudafe "--display_error_number --diag_suppress=611 --diag_suppress=2885 --diag_suppress=2886 --diag_suppress=2887 --diag_suppress=2888 --diag_suppress=186 --diag_suppress=111" --expt-extended-lambda)
set(WARNING_SUPPRESSION_AND_OPTION_NVCC_TEXT "-Xcudafe \"--display_error_number --diag_suppress=611 --diag_suppress=2885 --diag_suppress=2886 --diag_suppress=2887 --diag_suppress=2888 --diag_suppress=186 --diag_suppress=111\" --expt-extended-lambda ")
set(WARNING_SUPPRESSION_AND_OPTION_NVCC -Xcudafe "--display_error_number --diag_suppress=611 --diag_suppress=2885 --diag_suppress=2886 --diag_suppress=2887 --diag_suppress=2888 --diag_suppress=186 --diag_suppress=111" --expt-extended-lambda)
set(WARNING_SUPPRESSION_AND_OPTION_NVCC_TEXT "-Xcudafe \"--display_error_number --diag_suppress=611 --diag_suppress=2885 --diag_suppress=2886 --diag_suppress=2887 --diag_suppress=2888 --diag_suppress=186 --diag_suppress=111\" --expt-extended-lambda ")
elseif ( CUDA_VERSION_MAJOR EQUAL 10 AND CUDA_VERSION_MINOR EQUAL 1 )
message("CUDA is compatible 10.1")
set(WARNING_SUPPRESSION_AND_OPTION_NVCC -Xcudafe "--display_error_number --diag_suppress=2931 --diag_suppress=2930 --diag_suppress=2929 --diag_suppress=2928 --diag_suppress=2915 --diag_suppress=2912 --diag_suppress=2913 --diag_suppress=111 --diag_suppress=186 --diag_suppress=611 --diag_suppress=128" --expt-extended-lambda)
set(WARNING_SUPPRESSION_AND_OPTION_NVCC_TEXT "-Xcudafe \"--display_error_number --display_error_number --diag_suppress=2931 --diag_suppress=2930 --diag_suppress=2929 --diag_suppress=2928 --diag_suppress=2915 --diag_suppress=2912 --diag_suppress=2913 --diag_suppress=111 --diag_suppress=186 --diag_suppress=611 --diag_suppress=128 \" --expt-extended-lambda")
message("CUDA is compatible 10.1")
set(WARNING_SUPPRESSION_AND_OPTION_NVCC -Xcudafe "--display_error_number --diag_suppress=2931 --diag_suppress=2930 --diag_suppress=2929 --diag_suppress=2928 --diag_suppress=2915 --diag_suppress=2912 --diag_suppress=2913 --diag_suppress=111 --diag_suppress=186 --diag_suppress=611 --diag_suppress=128" --expt-extended-lambda)
set(WARNING_SUPPRESSION_AND_OPTION_NVCC_TEXT "-Xcudafe \"--display_error_number --display_error_number --diag_suppress=2931 --diag_suppress=2930 --diag_suppress=2929 --diag_suppress=2928 --diag_suppress=2915 --diag_suppress=2912 --diag_suppress=2913 --diag_suppress=111 --diag_suppress=186 --diag_suppress=611 --diag_suppress=128 \" --expt-extended-lambda")
elseif ( CUDA_VERSION_MAJOR EQUAL 10 AND CUDA_VERSION_MINOR EQUAL 2 )
message("CUDA is compatible 10.2")
set(WARNING_SUPPRESSION_AND_OPTION_NVCC -Xcudafe "--display_error_number --diag_suppress=2976 --diag_suppress=2977 --diag_suppress=2978 --diag_suppress=2979 --diag_suppress=1835 --diag_suppress=611 --diag_suppress=186 --diag_suppress=128" --expt-extended-lambda)
set(WARNING_SUPPRESSION_AND_OPTION_NVCC_TEXT "-Xcudafe \"--display_error_number --diag_suppress=2976 --diag_suppress=2977 --diag_suppress=2978 --diag_suppress=2979 --diag_suppress=1835 --diag_suppress=611 --diag_suppress=186 --diag_suppress=128\" --expt-extended-lambda")
elseif ( CUDA_VERSION_MAJOR EQUAL 11 AND CUDA_VERSION_MINOR EQUAL 0 )
message("CUDA is compatible 11.0")
set(WARNING_SUPPRESSION_AND_OPTION_NVCC -Xcudafe "--display_error_number --diag_suppress=3056 --diag_suppress=3057 --diag_suppress=3058 --diag_suppress=3059 --diag_suppress=611 --diag_suppress=186 --diag_suppress=128" --expt-extended-lambda)
set(WARNING_SUPPRESSION_AND_OPTION_NVCC_TEXT "-Xcudafe \"--display_error_number --diag_suppress=3056 --diag_suppress=3057 --diag_suppress=3058 --diag_suppress=3059 --diag_suppress=611 --diag_suppress=186 --diag_suppress=128\" --expt-extended-lambda")
set(WARNING_SUPPRESSION_AND_OPTION_NVCC -Xcudafe "--display_error_number --diag_suppress=2976 --diag_suppress=2977 --diag_suppress=2978 --diag_suppress=2979 --diag_suppress=1835 --diag_suppress=611 --diag_suppress=186 --diag_suppress=128" --expt-extended-lambda)
set(WARNING_SUPPRESSION_AND_OPTION_NVCC_TEXT "-Xcudafe \"--display_error_number --diag_suppress=2976 --diag_suppress=2977 --diag_suppress=2978 --diag_suppress=2979 --diag_suppress=1835 --diag_suppress=611 --diag_suppress=186 --diag_suppress=128\" --expt-extended-lambda")
elseif ( CUDA_VERSION_MAJOR EQUAL 11 AND CUDA_VERSION_MINOR EQUAL 0 )
message("CUDA is compatible 11.0")
set(WARNING_SUPPRESSION_AND_OPTION_NVCC -Xcudafe "--display_error_number --diag_suppress=3056 --diag_suppress=3057 --diag_suppress=3058 --diag_suppress=3059 --diag_suppress=611 --diag_suppress=186 --diag_suppress=128" --expt-extended-lambda)
set(WARNING_SUPPRESSION_AND_OPTION_NVCC_TEXT "-Xcudafe \"--display_error_number --diag_suppress=3056 --diag_suppress=3057 --diag_suppress=3058 --diag_suppress=3059 --diag_suppress=611 --diag_suppress=186 --diag_suppress=128\" --expt-extended-lambda")
elseif ( CUDA_VERSION_MAJOR EQUAL 11 AND CUDA_VERSION_MINOR EQUAL 1 )
message("CUDA is compatible 11.1")
set(WARNING_SUPPRESSION_AND_OPTION_NVCC -Xcudafe "--display_error_number --diag_suppress=3124 --diag_suppress=3126 --diag_suppress=3125 --diag_suppress=3123 --diag_suppress=611 --diag_suppress=186 --diag_suppress=128" --expt-extended-lambda)
set(WARNING_SUPPRESSION_AND_OPTION_NVCC_TEXT "-Xcudafe \"--display_error_number --diag_suppress=3124 --diag_suppress=3126 --diag_suppress=3125 --diag_suppress=3123 --diag_suppress=611 --diag_suppress=186 --diag_suppress=128\" --expt-extended-lambda")
message("CUDA is compatible 11.1")
set(WARNING_SUPPRESSION_AND_OPTION_NVCC -Xcudafe "--display_error_number --diag_suppress=3124 --diag_suppress=3126 --diag_suppress=3125 --diag_suppress=3123 --diag_suppress=611 --diag_suppress=186 --diag_suppress=128" --expt-extended-lambda)
set(WARNING_SUPPRESSION_AND_OPTION_NVCC_TEXT "-Xcudafe \"--display_error_number --diag_suppress=3124 --diag_suppress=3126 --diag_suppress=3125 --diag_suppress=3123 --diag_suppress=611 --diag_suppress=186 --diag_suppress=128\" --expt-extended-lambda")
elseif ( CUDA_VERSION_MAJOR EQUAL 11 AND (CUDA_VERSION_MINOR EQUAL 2 OR CUDA_VERSION_MINOR EQUAL 3 OR CUDA_VERSION_MINOR EQUAL 4 OR CUDA_VERSION_MINOR EQUAL 5 OR CUDA_VERSION_MINOR EQUAL 6))
message("CUDA is compatible 11.2/3/4/5")
set(WARNING_SUPPRESSION_AND_OPTION_NVCC -Xcudafe "--display_error_number --diag_suppress=20014 --diag_suppress=20013 --diag_suppress=20012 --diag_suppress=20011 --diag_suppress=611 --diag_suppress=550 --diag_suppress=186 --diag_suppress=128" --expt-extended-lambda)
set(WARNING_SUPPRESSION_AND_OPTION_NVCC_TEXT "-Xcudafe \"--display_error_number --diag_suppress=20014 --diag_suppress=20013 --diag_suppress=20012 --diag_suppress=20011 --diag_suppress=611 --diag_suppress=550 --diag_suppress=186 --diag_suppress=128\" --expt-extended-lambda")
message("CUDA is compatible 11.2/3/4/5")
set(WARNING_SUPPRESSION_AND_OPTION_NVCC -Xcudafe "--display_error_number --diag_suppress=20014 --diag_suppress=20013 --diag_suppress=20012 --diag_suppress=20011 --diag_suppress=611 --diag_suppress=550 --diag_suppress=186 --diag_suppress=128" --expt-extended-lambda)
set(WARNING_SUPPRESSION_AND_OPTION_NVCC_TEXT "-Xcudafe \"--display_error_number --diag_suppress=20014 --diag_suppress=20013 --diag_suppress=20012 --diag_suppress=20011 --diag_suppress=611 --diag_suppress=550 --diag_suppress=186 --diag_suppress=128\" --expt-extended-lambda")
elseif ( CUDA_VERSION_MAJOR EQUAL 12 AND (CUDA_VERSION_MINOR EQUAL 0))
message("CUDA is compatible 12")
set(WARNING_SUPPRESSION_AND_OPTION_NVCC -Xcudafe "--display_error_number --diag_suppress=20014 --diag_suppress=20013 --diag_suppress=20012 --diag_suppress=20011 --diag_suppress=611 --diag_suppress=550 --diag_suppress=186 --diag_suppress=128" --expt-extended-lambda)
set(WARNING_SUPPRESSION_AND_OPTION_NVCC_TEXT "-Xcudafe \"--display_error_number --diag_suppress=20014 --diag_suppress=20013 --diag_suppress=20012 --diag_suppress=20011 --diag_suppress=611 --diag_suppress=550 --diag_suppress=186 --diag_suppress=128\" --expt-extended-lambda")
message("CUDA is compatible 12")
set(WARNING_SUPPRESSION_AND_OPTION_NVCC -Xcudafe "--display_error_number --diag_suppress=20014 --diag_suppress=20013 --diag_suppress=20012 --diag_suppress=20011 --diag_suppress=611 --diag_suppress=550 --diag_suppress=186 --diag_suppress=128" --expt-extended-lambda)
set(WARNING_SUPPRESSION_AND_OPTION_NVCC_TEXT "-Xcudafe \"--display_error_number --diag_suppress=20014 --diag_suppress=20013 --diag_suppress=20012 --diag_suppress=20011 --diag_suppress=611 --diag_suppress=550 --diag_suppress=186 --diag_suppress=128\" --expt-extended-lambda")
else()
message(FATAL_ERROR "CUDA is incompatible, version 9.2 10.1 10.2 11.1 11.2 11.3 11.4 is only supported")
endif()
set(DEFINE_CUDIFY_BACKEND "#define CUDIFY_USE_CUDA")
set(DEFINE_CUDA_GPU "#define CUDA_GPU")
set(DEFINE_CUDA_GPU "#define CUDA_GPU")
elseif (CUDA_ON_BACKEND STREQUAL "OpenMP")
set(DEFINE_CUDIFY_BACKEND "#define CUDIFY_USE_OPENMP")
set(DEFINE_CUDA_GPU "#define CUDA_GPU")
set(DEFINE_CUDA_GPU "#define CUDA_GPU")
elseif (CUDA_ON_BACKEND STREQUAL "SEQUENTIAL")
set(DEFINE_CUDIFY_BACKEND "#define CUDIFY_USE_SEQUENTIAL")
set(DEFINE_CUDA_GPU "#define CUDA_GPU")
else()
find_package(alpaka)
endif()
###### CONFIG.h FILE ######
if(HIP_FOUND)
set(DEFINE_HIP_GPU "#define HIP_GPU")
set(DEFINE_CUDIFY_USE_HIP "#define CUDIFY_USE_HIP")
endif()
if (Boost_FOUND)
set(DEFINE_HAVE_BOOST "#define HAVE_BOOST")
set(DEFINE_HAVE_BOOST_IOSTREAMS "#define HAVE_BOOST_IOSTREAMS")
set(DEFINE_HAVE_BOOST_PROGRAM_OPTIONS "#define HAVE_BOOST_PROGRAM_OPTIONS")
set(DEFINE_HAVE_BOOST_UNIT_TEST_FRAMEWORK "#define HAVE_BOOST_UNIT_TEST_FRAMEWORK")
if (Boost_CONTEXT_FOUND)
set(DEFINE_HAVE_BOOST_CONTEXT "#define HAVE_BOOST_CONTEXT")
set(OPTIONAL_BOOST_LIBS "-lboost_context")
endif()
if (Boost_FIBER_FOUND)
set(DEFINE_HAVE_BOOST_FIBER "#define HAVE_BOOST_FIBER")
string(CONCAT OPTIONAL_BOOST_LIBS ${OPTIONAL_BOOST_LIBS} " -lboost_fiber")
endif()
endif()
if (OPENMP_FOUND)
set(DEFINE_HAVE_OPENMP "#define HAVE_OPENMP")
set(DEFINE_CUDA_GPU "#define CUDA_GPU")
endif()
if (ALPAKA_ROOT)
set(DEFINE_HAVE_ALPAKA "#define HAVE_ALPAKA")
endif()
######## COMPONENT CHECK ########, some component require dependencies, HERE we check that what you want can be satisfied
if (CUDA_ON_BACKEND STREQUAL "SEQUENTIAL")
## We need BOOST_CONTEXT
if (NOT Boost_CONTEXT_FOUND)
......@@ -131,7 +100,6 @@ endif()
if (CUDA_ON_BACKEND STREQUAL "OpenMP")
## We need OpenMP
if (NOT OPENMP_FOUND OR NOT Boost_CONTEXT_FOUND)
file(WRITE error_code "220")
message(FATAL_ERROR "Error to run CUDA on CPU (OpenMP backend) we need Boost::context and OpenMP installed, it seems is not available in your system")
endif()
endif()
......@@ -140,42 +108,37 @@ if (CUDA_ON_BACKEND STREQUAL "HIP")
## We need HIP
if (NOT HIP_FOUND)
message(FATAL_ERROR "Error to run CUDA on HIP (HIP backend) RocM/HIP, it seems is not available in your system")
endif()
endif()
endif()
if (CUDA_ON_BACKEND STREQUAL "CUDA")
## We need CUDA
if (NOT CUDA_FOUND)
message(FATAL_ERROR "Error to run on CUDA you need a CUDA compatible compiler, it seems is not available in your system")
endif()
endif()
endif()
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/config/config_cmake.h.in ${CMAKE_CURRENT_SOURCE_DIR}/src/config/config.h)
add_subdirectory (src)
get_directory_property(hasParent PARENT_DIRECTORY)
if(hasParent)
set(DEFINE_CUDA_GPU ${DEFINE_CUDA_GPU} PARENT_SCOPE)
set(WARNING_SUPPRESSION_AND_OPTION_NVCC ${WARNING_SUPPRESSION_AND_OPTION_NVCC} PARENT_SCOPE)
set(WARNING_SUPPRESSION_AND_OPTION_NVCC_TEXT ${WARNING_SUPPRESSION_AND_OPTION_NVCC_TEXT} PARENT_SCOPE)
set(DEFINE_HIP_GPU ${DEFINE_HIP_GPU} PARENT_SCOPE)
set(DEFINE_CUDIFY_USE_HIP ${DEFINE_CUDIFY_USE_HIP} PARENT_SCOPE)
set(DEFINE_HAVE_BOOST ${DEFINE_HAVE_BOOST} PARENT_SCOPE)
set(DEFINE_HAVE_BOOST_IOSTREAMS ${DEFINE_HAVE_BOOST_IOSTREAMS} PARENT_SCOPE)
set(DEFINE_HAVE_BOOST_PROGRAM_OPTIONS ${DEFINE_HAVE_BOOST_PROGRAM_OPTIONS} PARENT_SCOPE)
set(DEFINE_HAVE_BOOST_UNIT_TEST_FRAMEWORK ${DEFINE_HAVE_BOOST_UNIT_TEST_FRAMEWORK} PARENT_SCOPE)
set(DEFINE_HAVE_BOOST_CONTEXT ${DEFINE_HAVE_BOOST_CONTEXT} PARENT_SCOPE)
set(DEFINE_HAVE_BOOST_FIBER ${DEFINE_HAVE_BOOST_FIBER} PARENT_SCOPE)
set(DEFINE_CUDIFY_BACKEND ${DEFINE_CUDIFY_BACKEND} PARENT_SCOPE)
set(DEFINE_CUDA_GPU ${DEFINE_CUDA_GPU} PARENT_SCOPE)
set(OPTIONAL_BOOST_LIBS ${OPTIONAL_BOOST_LIBS} PARENT_SCOPE)
set(DEFINE_HAVE_OPENMP ${DEFINE_HAVE_OPENMP} PARENT_SCOPE)
set(DEFINE_HAVE_ALPAKA ${DEFINE_HAVE_ALPAKA} PARENT_SCOPE)
set(CUDA_FOUND ${CUDA_FOUND} PARENT_SCOPE)
set(CUDA_VERSION_MAJOR ${CUDA_VERSION_MAJOR} PARENT_SCOPE)
set(CUDA_VERSION_MINOR ${CUDA_VERSION_MINOR} PARENT_SCOPE)
set(CUDA_VERSION_PATCH ${CUDA_VERSION_PATCH} PARENT_SCOPE)
set(DEFINE_GARBAGE_INJECTOR ${DEFINE_GARBAGE_INJECTOR} CACHE INTERNAL "")
set(CMAKE_CXX_EXTENSIONS ${CMAKE_CXX_EXTENSIONS} CACHE INTERNAL "")
set(CMAKE_EXE_LINKER_FLAGS ${CMAKE_EXE_LINKER_FLAGS} CACHE INTERNAL "")
set(WARNING_SUPPRESSION_AND_OPTION_NVCC ${WARNING_SUPPRESSION_AND_OPTION_NVCC} CACHE INTERNAL "")
set(WARNING_SUPPRESSION_AND_OPTION_NVCC_TEXT ${WARNING_SUPPRESSION_AND_OPTION_NVCC_TEXT} CACHE INTERNAL "")
set(DEFINE_CUDIFY_USE_HIP ${DEFINE_CUDIFY_USE_HIP} CACHE INTERNAL "")
set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} CACHE INTERNAL "")
set(CMAKE_C_FLAGS ${CMAKE_C_FLAGS} CACHE INTERNAL "")
set(DEFINE_HAVE_OPENMP ${DEFINE_HAVE_OPENMP} CACHE INTERNAL "")
set(DEFINE_CUDIFY_USE_HIP ${DEFINE_CUDIFY_USE_HIP} CACHE INTERNAL "")
set(DEFINE_CUDIFY_BACKEND ${DEFINE_CUDIFY_BACKEND} CACHE INTERNAL "")
set(DEFINE_CUDA_GPU ${DEFINE_CUDA_GPU} CACHE INTERNAL "")
set(DEFINE_HAVE_OPENMP ${DEFINE_HAVE_OPENMP} CACHE INTERNAL "")
set(DEFINE_HAVE_ALPAKA ${DEFINE_HAVE_ALPAKA} CACHE INTERNAL "")
set(CUDA_FOUND ${CUDA_FOUND} CACHE INTERNAL "")
set(CUDA_VERSION_MAJOR ${CUDA_VERSION_MAJOR} CACHE INTERNAL "")
set(CUDA_VERSION_MINOR ${CUDA_VERSION_MINOR} CACHE INTERNAL "")
set(CUDA_VERSION_PATCH ${CUDA_VERSION_PATCH} CACHE INTERNAL "")
endif()
#!groovy
parallel (
"gin" : {node ('gin')
{
stage ('gin_build')
{
deleteDir()
int ntry = 5
while (ntry != 0)
{
try {
checkout scm
ntry = 0
}
catch (IOException e)
{
ntry--
sleep(50)
}
}
sh "./build.sh $WORKSPACE $NODE_NAME"
}
stage ('gin_run')
{
sh "./src/mem"
sh "./success.sh 2 gin openfpm_devices"
}
}},
"nyu" : {node ('nyu')
{
stage ('nyu_build')
{
deleteDir()
int ntry = 5
while (ntry != 0)
{
try {
checkout scm
ntry = 0
}
catch (IOException e)
{
ntry--
sleep(50)
}
}
sh "./build.sh $WORKSPACE $NODE_NAME"
}
stage ('nyu_run')
{
sh "./src/mem"
sh "./success.sh 2 nyu openfpm_devices"
}
}},
"sb15" : {node ('sbalzarini-mac-15')
{
env.PATH = "/usr/local/bin:${env.PATH}"
stage ('sb15_build')
{
deleteDir()
int ntry = 5
while (ntry != 0)
{
try {
checkout scm
ntry = 0
}
catch (IOException e)
{
ntry--
sleep(50)
}
}
sh "./build.sh $WORKSPACE $NODE_NAME"
}
stage ('sb15_run')
{
sh "./src/mem"
sh "./success.sh 2 sbalzarini-mac-15 openfpm_devices"
}
}}
)
#!groovy
parallel (
"centos" : {node ('cifarm-centos-node')
{
stage ('centos_build')
{
deleteDir()
int ntry = 5
while (ntry != 0)
{
try {
checkout scm
ntry = 0
}
catch (IOException e)
{
ntry--
sleep(50)
}
}
sh "./build.sh $WORKSPACE $NODE_NAME"
}
stage ('centos_run')
{
sh "./build/src/mem"
sh "./success.sh 2 centos openfpm_devices"
}
}},
"ubuntu" : {node ('cifarm-ubuntu-node')
{
stage ('ubuntu_build')
{
deleteDir()
int ntry = 5
while (ntry != 0)
{
try {
checkout scm
ntry = 0
}
catch (IOException e)
{
ntry--
sleep(50)
}
}
sh "./build.sh $WORKSPACE $NODE_NAME"
}
stage ('ubuntu_run')
{
sh "./build/src/mem"
sh "./success.sh 2 ubuntu openfpm_devices"
}
}},
"macos" : {node ('cifarm-mac-node')
{
env.PATH = "/usr/local/bin:${env.PATH}"
stage ('mac_build')
{
deleteDir()
int ntry = 5
while (ntry != 0)
{
try {
checkout scm
ntry = 0
}
catch (IOException e)
{
ntry--
sleep(50)
}
}
sh "./build.sh $WORKSPACE $NODE_NAME"
}
stage ('mac_run')
{
sh "./build/src/mem"
sh "./success.sh 2 macos openfpm_devices"
}
}}
)
#!/bin/sh
# a u t o g e n . s h
#
#
# Nothing to do we converted autotools to cmake but because many installation and build scripts call
#! /bin/bash
hostname=$(hostname)
branch=$3
echo "Machine: $hostname"
echo "Branch: $branch"
if [ x"$hostname" == x"cifarm-centos-node.mpi-cbg.de" ]; then
echo "CentOS node"
source /opt/rh/devtoolset-8/enable
export PATH="$HOME/openfpm_dependencies/openfpm_pdata/$branch/CMAKE/bin:$PATH"
fi
if [ x"$hostname" == x"cifarm-ubuntu-node" ]; then
echo "Ubuntu node"
export PATH="/opt/bin:$PATH"
fi
if [ x"$hostname" == x"cifarm-mac-node.mpi-cbg.de" ]; then
echo "Mac node"
export PATH="$HOME/openfpm_dependencies/openfpm_devices/CMAKE/CMAKE/bin:$PATH"
fi
mkdir src/config
if [ ! -d $HOME/openfpm_dependencies/openfpm_devices/BOOST ]; then
if [ x"$hostname" == x"cifarm-mac-node" ]; then
echo "Compiling for OSX"
./install_BOOST.sh $HOME/openfpm_dependencies/openfpm_devices/ 4 clang
else
echo "Compiling for Linux"
./install_BOOST.sh $HOME/openfpm_dependencies/openfpm_devices 4 gcc
fi
fi
if [ x"$hostname" == x"cifarm-mac-node.mpi-cbg.de" ]; then
./configure --with-boost=$HOME/openfpm_dependencies/openfpm_devices/BOOST --enable-cuda-on-cpu
else
./configure --with-boost=$HOME/openfpm_dependencies/openfpm_devices/BOOST --with-cuda-on-backend=OpenMP
fi
make VERBOSE=1
#! /bin/bash
mkdir src/config
sh ./autogen.sh
if [ "$2" == "master" ]
then
sh ./configure --disable-gpu
elif [ "$2" == "gin" ]
then
module load gcc/4.9.2
module load boost/1.54.0
sh ./configure --with-boost=/sw/apps/boost/1.54.0/
else
sh ./configure
fi
make
./src/mem
#!/bin/bash
# configure script
#
#
# Because we moved to cmake this script emulate the configure script from autotools
conf_options=
ld_lib_pathopt=
# Avoid depending upon Character Ranges.
as_cr_letters='abcdefghijklmnopqrstuvwxyz'
as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
as_cr_Letters=$as_cr_letters$as_cr_LETTERS
as_cr_digits='0123456789'
as_cr_alnum=$as_cr_Letters$as_cr_digits
# as_fn_error STATUS ERROR [LINENO LOG_FD]
# ----------------------------------------
# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
# script with STATUS, using 1 if that was 0.
as_fn_error ()
{
as_status=$1; test $as_status -eq 0 && as_status=1
if test "$4"; then
as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
$as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
fi
$as_echo "$as_me: error: $2" >&2
as_fn_exit $as_status
} # as_fn_error
# as_fn_exit STATUS
# -----------------
# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
as_fn_exit ()
{
set +e
as_fn_set_status $1
exit $1
} # as_fn_exit
# as_fn_set_status STATUS
# -----------------------
# Set $? to STATUS, without forking.
as_fn_set_status ()
{
return $1
} # as_fn_set_status
# Printing a long string crashes Solaris 7 /usr/bin/printf.
as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
# Prefer a ksh shell builtin over an external printf program on Solaris,
# but without wasting forks for bash or zsh.
if test -z "$BASH_VERSION$ZSH_VERSION" \
&& (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
as_echo='print -r --'
as_echo_n='print -rn --'
elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
as_echo='printf %s\n'
as_echo_n='printf %s'
else
if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
as_echo_n='/usr/ucb/echo -n'
else
as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
as_echo_n_body='eval
arg=$1;
case $arg in #(
*"$as_nl"*)
expr "X$arg" : "X\\(.*\\)$as_nl";
arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
esac;
expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
'
export as_echo_n_body
as_echo_n='sh -c $as_echo_n_body as_echo'
fi
export as_echo_body
as_echo='sh -c $as_echo_body as_echo'
fi
ac_user_opts='
enable_option_checking
enable_silent_rules
enable_shared
enable_static
with_pic
enable_fast_install
with_aix_soname
enable_dependency_tracking
with_gnu_ld
with_sysroot
enable_libtool_lock
enable_debug
with_metis
with_hdf5
with_libhilbert
with_cuda_on_backend
enable_cuda_on_cpu
enable_scan_coverty
enable_test_performance
enable_test_coverage
with_parmetis
enable_se_class1
enable_se_class2
enable_se_class3
with_alpaka
with_action_on_error
with_boost
with_boost_libdir
with_boost_unit_test_framework
with_boost_program_options
with_boost_iostreams
with_blas
with_lapack
with_suitesparse
with_petsc
with_eigen
with_vcdevel
enable_gpu
enable_asan
enable_garbageinj
enable_garbageinjv
'
rm -rf build
if [ ! -d "build" ]; then
mkdir build
fi
echo "/usr/local" > install_dir
##### Go over all options
for ac_option
do
# If the previous option needs an argument, assign it.
if test -n "$ac_prev"; then
eval $ac_prev=\$ac_option
ac_prev=
continue
fi
case $ac_option in
*=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
*=) ac_optarg= ;;
*) ac_optarg=yes ;;
esac
# Accept the important Cygnus configure options, so we can diagnose typos.
case $ac_dashdash$ac_option in
--)
ac_dashdash=yes ;;
-bindir | --bindir | --bindi | --bind | --bin | --bi)
ac_prev=bindir ;;
-bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
bindir=$ac_optarg ;;
-build | --build | --buil | --bui | --bu)
ac_prev=build_alias ;;
-build=* | --build=* | --buil=* | --bui=* | --bu=*)
build_alias=$ac_optarg ;;
-cache-file | --cache-file | --cache-fil | --cache-fi \
| --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
ac_prev=cache_file ;;
-cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
| --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
cache_file=$ac_optarg ;;
--config-cache | -C)
cache_file=config.cache ;;
-datadir | --datadir | --datadi | --datad)
ac_prev=datadir ;;
-datadir=* | --datadir=* | --datadi=* | --datad=*)
datadir=$ac_optarg ;;
-datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
| --dataroo | --dataro | --datar)
ac_prev=datarootdir ;;
-datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
| --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
datarootdir=$ac_optarg ;;
-disable-* | --disable-*)
ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
as_fn_error $? "invalid feature name: $ac_useropt"
ac_useropt_orig=$ac_useropt
ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_useropt in
gpu)
conf_options="$conf_options -DENABLE_GPU=OFF"
;;
*) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
ac_unrecognized_sep=', ';;
esac
eval enable_$ac_useropt=no ;;
-docdir | --docdir | --docdi | --doc | --do)
ac_prev=docdir ;;
-docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
docdir=$ac_optarg ;;
-dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
ac_prev=dvidir ;;
-dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
dvidir=$ac_optarg ;;
-enable-* | --enable-*)
ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
as_fn_error $? "invalid feature name: $ac_useropt"
ac_useropt_orig=$ac_useropt
ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_useropt in
debug)
conf_options="$conf_options -DCMAKE_BUILD_TYPE=Debug"
debug_mode=1
;;
se_class1)
conf_options="$conf_options -DSE_CLASS1=ON"
;;
se_class2)
conf_options="$conf_options -DSE_CLASS2=ON"
;;
se_class3)
conf_options="$conf_options -DSE_CLASS3=ON"
;;
test_coverage)
conf_options="$conf_options -DTEST_COVERAGE=ON"
;;
scan_coverty)
conf_options="$conf_options -DSCAN_COVERTY=ON"
;;
cuda_on_cpu)
conf_options="$conf_options -DCUDA_ON_BACKEND=SEQUENTIAL"
;;
test_performance)
conf_options="$conf_options -DTEST_PERFORMANCE=ON"
;;
gpu)
if [ x"$CXX" == x"" ]; then
conf_options="$conf_options"
else
conf_options="$conf_options -DCMAKE_CUDA_HOST_COMPILER=$(which $CXX)"
fi
if [ x"$CXXCUDA" == x"" ]; then
conf_options="$conf_options"
else
conf_options="$conf_options -DCMAKE_CUDA_COMPILER=$(which $CXXCUDA)"
fi
conf_options="$conf_options -DENABLE_GPU=ON"
;;
asan)
conf_options="$conf_options -DENABLE_ASAN=ON"
;;
garbageinj)
conf_options="$conf_options -DENABLE_GARBAGE_INJECTOR=ON"
;;
garbageinjv)
conf_options="$conf_options -DENABLE_VCLUSTER_GARBAGE_INJECTOR=ON"
;;
*) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
ac_unrecognized_sep=', '
;;
esac
eval enable_$ac_useropt=\$ac_optarg ;;
-exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
| --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
| --exec | --exe | --ex)
ac_prev=exec_prefix ;;
-exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
| --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
| --exec=* | --exe=* | --ex=*)
exec_prefix=$ac_optarg ;;
-gas | --gas | --ga | --g)
# Obsolete; use --with-gas.
with_gas=yes ;;
-help | --help | --hel | --he | -h)
ac_init_help=long ;;
-help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
ac_init_help=recursive ;;
-help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
ac_init_help=short ;;
-host | --host | --hos | --ho)
ac_prev=host_alias ;;
-host=* | --host=* | --hos=* | --ho=*)
host_alias=$ac_optarg ;;
-htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
ac_prev=htmldir ;;
-htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
| --ht=*)
htmldir=$ac_optarg ;;
-includedir | --includedir | --includedi | --included | --include \
| --includ | --inclu | --incl | --inc)
ac_prev=includedir ;;
-includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
| --includ=* | --inclu=* | --incl=* | --inc=*)
includedir=$ac_optarg ;;
-infodir | --infodir | --infodi | --infod | --info | --inf)
ac_prev=infodir ;;
-infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
infodir=$ac_optarg ;;
-libdir | --libdir | --libdi | --libd)
ac_prev=libdir ;;
-libdir=* | --libdir=* | --libdi=* | --libd=*)
libdir=$ac_optarg ;;
-libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
| --libexe | --libex | --libe)
ac_prev=libexecdir ;;
-libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
| --libexe=* | --libex=* | --libe=*)
libexecdir=$ac_optarg ;;
-localedir | --localedir | --localedi | --localed | --locale)
ac_prev=localedir ;;
-localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
localedir=$ac_optarg ;;
-localstatedir | --localstatedir | --localstatedi | --localstated \
| --localstate | --localstat | --localsta | --localst | --locals)
ac_prev=localstatedir ;;
-localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
| --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
localstatedir=$ac_optarg ;;
-mandir | --mandir | --mandi | --mand | --man | --ma | --m)
ac_prev=mandir ;;
-mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
mandir=$ac_optarg ;;
-nfp | --nfp | --nf)
# Obsolete; use --without-fp.
with_fp=no ;;
-no-create | --no-create | --no-creat | --no-crea | --no-cre \
| --no-cr | --no-c | -n)
no_create=yes ;;
-no-recursion | --no-recursion | --no-recursio | --no-recursi \
| --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
no_recursion=yes ;;
-oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
| --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
| --oldin | --oldi | --old | --ol | --o)
ac_prev=oldincludedir ;;
-oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
| --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
| --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
oldincludedir=$ac_optarg ;;
-prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
ac_prev=prefix ;;
-prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
prefix=$ac_optarg
conf_options="$conf_options -DCMAKE_INSTALL_PREFIX=$ac_optarg"
echo "$prefix" > install_dir
;;
-program-prefix | --program-prefix | --program-prefi | --program-pref \
| --program-pre | --program-pr | --program-p)
ac_prev=program_prefix ;;
-program-prefix=* | --program-prefix=* | --program-prefi=* \
| --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
program_prefix=$ac_optarg ;;
-program-suffix | --program-suffix | --program-suffi | --program-suff \
| --program-suf | --program-su | --program-s)
ac_prev=program_suffix ;;
-program-suffix=* | --program-suffix=* | --program-suffi=* \
| --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
program_suffix=$ac_optarg ;;
-program-transform-name | --program-transform-name \
| --program-transform-nam | --program-transform-na \
| --program-transform-n | --program-transform- \
| --program-transform | --program-transfor \
| --program-transfo | --program-transf \
| --program-trans | --program-tran \
| --progr-tra | --program-tr | --program-t)
ac_prev=program_transform_name ;;
-program-transform-name=* | --program-transform-name=* \
| --program-transform-nam=* | --program-transform-na=* \
| --program-transform-n=* | --program-transform-=* \
| --program-transform=* | --program-transfor=* \
| --program-transfo=* | --program-transf=* \
| --program-trans=* | --program-tran=* \
| --progr-tra=* | --program-tr=* | --program-t=*)
program_transform_name=$ac_optarg ;;
-pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
ac_prev=pdfdir ;;
-pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
pdfdir=$ac_optarg ;;
-psdir | --psdir | --psdi | --psd | --ps)
ac_prev=psdir ;;
-psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
psdir=$ac_optarg ;;
-q | -quiet | --quiet | --quie | --qui | --qu | --q \
| -silent | --silent | --silen | --sile | --sil)
silent=yes ;;
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
ac_prev=sbindir ;;
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
| --sbi=* | --sb=*)
sbindir=$ac_optarg ;;
-sharedstatedir | --sharedstatedir | --sharedstatedi \
| --sharedstated | --sharedstate | --sharedstat | --sharedsta \
| --sharedst | --shareds | --shared | --share | --shar \
| --sha | --sh)
ac_prev=sharedstatedir ;;
-sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
| --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
| --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
| --sha=* | --sh=*)
sharedstatedir=$ac_optarg ;;
-site | --site | --sit)
ac_prev=site ;;
-site=* | --site=* | --sit=*)
site=$ac_optarg ;;
-srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
ac_prev=srcdir ;;
-srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
srcdir=$ac_optarg ;;
-sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
| --syscon | --sysco | --sysc | --sys | --sy)
ac_prev=sysconfdir ;;
-sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
| --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
sysconfdir=$ac_optarg ;;
-target | --target | --targe | --targ | --tar | --ta | --t)
ac_prev=target_alias ;;
-target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
target_alias=$ac_optarg ;;
-v | -verbose | --verbose | --verbos | --verbo | --verb)
verbose=yes ;;
-version | --version | --versio | --versi | --vers | -V)
ac_init_version=: ;;
-with-* | --with-*)
ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
as_fn_error $? "invalid package name: $ac_useropt"
ac_useropt_orig=$ac_useropt
ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_useropt in
cuda_on_backend)
conf_options="$conf_options -DCUDA_ON_BACKEND=$ac_optarg"
;;
libhilbert)
conf_options="$conf_options -DLIBHILBERT_ROOT=$ac_optarg"
;;
metis)
conf_options="$conf_options -DMETIS_ROOT=$ac_optarg"
;;
parmetis)
conf_options="$conf_options -DPARMETIS_ROOT=$ac_optarg"
;;
hdf5)
conf_options="$conf_options -DHDF5_ROOT=$ac_optarg"
;;
petsc)
conf_options="$conf_options -DPETSC_ROOT=$ac_optarg"
;;
blas)
conf_options="$conf_options -DOPENBLAS_ROOT=$ac_optarg"
;;
suitesparse)
conf_options="$conf_options -DSUITESPARSE_ROOT=$ac_optarg"
ld_lib_pathopt=$ac_optarg/lib
;;
eigen)
conf_options="$conf_options -DEIGEN3_ROOT=$ac_optarg"
;;
boost)
conf_options="$conf_options -DBOOST_ROOT=$ac_optarg -DBoost_NO_BOOST_CMAKE=ON"
;;
action_on_error)
conf_options="$conf_options -DACTION_ON_ERROR=$ac_optarg"
;;
mpivendor)
conf_options="$conf_options -DMPI_VENDOR=$ac_optarg"
;;
vcdevel)
conf_options="$conf_options -DVc_ROOT=$ac_optarg"
;;
alpaka)
conf_options="$conf_options -DALPAKA_ROOT=$ac_optarg"
;;
*) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
ac_unrecognized_sep=', ';;
esac
eval with_$ac_useropt=\$ac_optarg ;;
-without-* | --without-*)
ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
as_fn_error $? "invalid package name: $ac_useropt"
ac_useropt_orig=$ac_useropt
ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
*"
"with_$ac_useropt"
"*) ;;
*) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
ac_unrecognized_sep=', ';;
esac
eval with_$ac_useropt=no ;;
--x)
# Obsolete; use --with-x.
with_x=yes ;;
-x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
| --x-incl | --x-inc | --x-in | --x-i)
ac_prev=x_includes ;;
-x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
| --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
x_includes=$ac_optarg ;;
-x-libraries | --x-libraries | --x-librarie | --x-librari \
| --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
ac_prev=x_libraries ;;
-x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
| --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
x_libraries=$ac_optarg ;;
-*) as_fn_error $? "unrecognized option: \`$ac_option'
Try \`$0 --help' for more information"
;;
*=*)
ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
# Reject names that are not valid shell variable names.
case $ac_envvar in #(
'' | [0-9]* | *[!_$as_cr_alnum]* )
as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
esac
eval $ac_envvar=\$ac_optarg
export $ac_envvar ;;
*)
# FIXME: should be removed in autoconf 3.0.
$as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
$as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
: "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
;;
esac
done
if [ x"$debug_mode" != x"1" ]; then
conf_options="$conf_options -DCMAKE_BUILD_TYPE=Release"
fi
cd build
## remove enerything
echo "Calling cmake ../. $conf_options"
printf "cmake ../. $conf_options" > cmake_build_options
rm ../error_code
DYLD_LIBRARY_PATH=$ld_lib_pathopt cmake ../. $conf_options
if [ $? != 0 ]; then
#ok something went wrong the install script analyze the return code to potentially fix the problem automatically
# Read the error code and exit with that
if [ -f ../error_code ]; then
ecod=$(cat ../error_code)
if [ x"$ecod" == x"0" ]; then
exit 1
else
echo "Analyze error $ecod"
exit $ecod
fi
else
exit 1
fi
fi
cd ..
echo "all:
\$(MAKE) -C build \$@
clean:
\$(MAKE) -C build \$@
install:
\$(MAKE) -C build \$@
script/install_parallel_debugger
pdata:
\$(MAKE) -C build \$@
numerics:
\$(MAKE) -C build \$@
.PHONY: all clean install" > Makefile
echo "$0 $@" > config.log
#! /bin/bash
function discover_os() {
platform=unknown
arch=$(uname -m)
if [[ "$OSTYPE" == "linux-gnu" ]]; then
echo -e "We are on\033[1;34m LINUX \033[0m, with architecture \033[1;34m$arch\033[0m"
platform=linux
elif [[ "$OSTYPE" == "linux" ]]; then
echo -e "We are on\033[1;34m LINUX \033[0m, with architecture \033[1;34m$arch\033[0m"
platform=linux
elif [[ "$OSTYPE" == "darwin"* ]]; then
echo -e "We are on\033[1;34m MAC OSX \033[0m, with architecture \033[1;34m$arch\033[0m"
platform=osx
elif [[ "$OSTYPE" == "cygwin" ]]; then
echo -e "We are on\033[1;34m CYGWIN \033[0m, with architecture \033[1;34m$arch\033[0m"
platform=cygwin
elif [[ "$OSTYPE" == "msys" ]]; then
echo -e "We are on\033[1;34m Microsoft Window \033[0m, with architecture \033[1;34m$arch\033[0m"
echo "This platform is not supported"
exit 1
elif [[ "$OSTYPE" == "win32" ]]; then
echo -e "We are on\033[1;34m Microsoft Window \033[0m, with architecture \033[1;34m$arch\033[0m"
echo "This platform is not supported"
exit 1
elif [[ "$OSTYPE" == "freebsd"* ]]; then
echo -e "We are on\033[1;34m FREEBSD \033[0m, with architecture \033[1;34m$arch\033[0m"
echo "This platform is not supported"
exit 1
else
echo -e "We are on an\033[1;34m unknown OS \033[0m, with architecture \033[1;34m$arch\033[0m"
echo "This platform is not supported"
exit 1
fi
}
#!/bin/bash
source discover_os
discover_os
# check if the directory $1/BOOST exist
if [ -d "$1/BOOST" ]; then
echo "BOOST already installed"
exit 0
fi
rm boost_1_75_0.tar.bz2
wget http://ppmcore.mpi-cbg.de/upload/boost_1_75_0.tar.bz2
tar -xf boost_1_75_0.tar.bz2
cd boost_1_75_0
if [ x"$4" != x"" ]; then
if [ -f $HOME/user-config.jam ]; then
mv $HOME/user-config.jam $HOME/user-config.jam_bck
fi
if [ x"$5" != x"" ]; then
echo "using gcc : $5.$6 : $4 ; " > $HOME/user-config.jam
else
echo "using gcc : : $4 ; " > $HOME/user-config.jam
fi
fi
./bootstrap.sh --with-toolset=$3
mkdir $1/BOOST
# Several flavours
if [ x"$platform" == x"osx" ]; then
if [ x"$arch" == x"arm64" ]; then
if [ x"$3" == x"" ]; then
./b2 -j $2 install --prefix=$1/BOOST address-model=64 architecture=arm abi=aapcs binary-format=mach-o toolset=clang -sNO_LZMA=1 -sNO_ZSTD=1
else
./b2 -j $2 install --prefix=$1/BOOST address-model=64 architecture=arm abi=aapcs binary-format=mach-o toolset=$3 -sNO_LZMA=1 -sNO_ZSTD=1
fi
else
./b2 -j $2 install --prefix=$1/BOOST address-model=64 architecture=x86 abi=sysv binary-format=mach-o toolset=clang -sNO_LZMA=1 -sNO_ZSTD=1
fi
else
./b2 -j $2 install --prefix=$1/BOOST -sNO_LZMA=1 -sNO_ZSTD=1
fi
rm -rf boost_1_75_0
if [ -f $HOME/user-config.jam_bck ]; then
mv $HOME/user-config.jam_bck $HOME/user-config.jam
fi
rm -rf boost_1_75_0.tar.bz2
#!/bin/bash
if [ -d "$1/CMAKE" ]; then
exit 0
fi
wget https://github.com/Kitware/CMake/releases/download/v3.20.3/cmake-3.20.3.tar.gz
tar -xvf cmake-3.20.3.tar.gz
cd cmake-3.20.3
./bootstrap --prefix=$1/CMAKE
make
make install
......@@ -81,7 +81,7 @@ if (CUDA_FOUND)
endif()
target_include_directories (mem PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_include_directories (mem PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/config)
target_include_directories (mem PUBLIC ${CMAKE_BINARY_DIR}/config)
target_include_directories (mem PUBLIC ${Boost_INCLUDE_DIRS})
if (ALPAKA_ROOT)
target_include_directories (mem PUBLIC ${ALPAKA_ROOT}/include)
......@@ -89,25 +89,25 @@ endif()
target_include_directories (ofpmmemory PRIVATE ${CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES})
target_include_directories (ofpmmemory PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
target_include_directories (ofpmmemory PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/config)
target_include_directories (ofpmmemory PRIVATE ${CMAKE_BINARY_DIR}/config)
target_include_directories (ofpmmemory PUBLIC ${ALPAKA_ROOT}/include)
target_include_directories (ofpmmemory PUBLIC ${Boost_INCLUDE_DIRS})
target_include_directories (ofpmmemory_dl PRIVATE ${CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES})
target_include_directories (ofpmmemory_dl PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
target_include_directories (ofpmmemory_dl PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/config)
target_include_directories (ofpmmemory_dl PRIVATE ${CMAKE_BINARY_DIR}/config)
target_include_directories (ofpmmemory_dl PUBLIC ${ALPAKA_ROOT}/include)
target_include_directories (ofpmmemory_dl PUBLIC ${Boost_INCLUDE_DIRS})
target_link_libraries(mem ${Boost_LIBRARIES_BCK})
target_link_libraries(mem ${Boost_LIBRARIES})
if (OPENMP_FOUND)
target_link_libraries(mem OpenMP::OpenMP_CXX)
target_link_libraries(ofpmmemory OpenMP::OpenMP_CXX)
target_link_libraries(ofpmmemory_dl OpenMP::OpenMP_CXX)
endif()
target_link_libraries(ofpmmemory ${Boost_LIBRARIES_BCK})
target_link_libraries(ofpmmemory_dl ${Boost_LIBRARIES_BCK})
target_link_libraries(ofpmmemory ${Boost_LIBRARIES})
target_link_libraries(ofpmmemory_dl ${Boost_LIBRARIES})
if (TEST_COVERAGE)
target_link_libraries(mem -lgcov)
......@@ -141,7 +141,6 @@ install(FILES util/ofp_context.hpp
util/gpu_context.hpp
util/gpu_types.hpp
util/print_stack.hpp
util/cuda_launch.hpp
util/se_util.hpp
util/cuda_util.hpp
util/cuda_kernel_error_checker.hpp
......@@ -171,7 +170,6 @@ install(FILES util/cudify/cuda/cudify_cuda.hpp
COMPONENT OpenFPM)
install(FILES util/cudify/cudify_hardware_cpu.hpp
util/cudify/cudify.hpp
DESTINATION openfpm_devices/include/util/cudify
COMPONENT OpenFPM)
......
/* Coverty scan */
${DEFINE_COVERTY_SCAN}
/* GPU support */
${DEFINE_CUDA_GPU}
/* Define CUDIFY backend */
${DEFINE_CUDIFY_BACKEND}
/* OpenMP support */
${DEFINE_HAVE_OPENMP}
/* HIP GPU support */
${DEFINE_HIP_GPU}
/* HIP Cudify GPU support */
${DEFINE_CUDIFY_USE_HIP}
/* Debug */
${DEFINE_DEBUG} /**/
/* Debug */
${DEFINE_DEBUG_MODE} /**/
/* Define to dummy `main' function (if any) required to link to the Fortran
libraries. */
${DEFINE_F77_DUMMY_MAIN}
/* Define if F77 and FC dummy `main' functions are identical. */
${DEFINE_FC_DUMMY_MAIN_EQ_F77}
/* Define if you have a BLAS library. */
${DEFINE_HAVE_BLAS}
/* define if the Boost library is available */
${DEFINE_HAVE_BOOST}
/* define if the Boost::IOStreams library is available */
${DEFINE_HAVE_BOOST_IOSTREAMS} /**/
/* define if the Boost::PROGRAM_OPTIONS library is available */
${DEFINE_HAVE_BOOST_PROGRAM_OPTIONS} /**/
/* define if the Boost::Unit_Test_Framework library is available */
${DEFINE_HAVE_BOOST_UNIT_TEST_FRAMEWORK} /**/
/* define if the Boost::Context library is available */
${DEFINE_HAVE_BOOST_CONTEXT} /**/
/* define if the Boost::Fiber library is available */
${DEFINE_HAVE_BOOST_FIBER} /**/
/* Have clock time */
${DEFINE_HAVE_CLOCK_GETTIME} /**/
/* Define to 1 if you have the <dlfcn.h> header file. */
${DEFINE_HAVE_DLFCN_H}
/* Define if you have EIGEN library. */
${DEFINE_HAVE_EIGEN}
/* Define to 1 if you have the <Eigen/Dense> header file. */
${DEFINE_HAVE_EIGEN_DENSE}
/* Define to 1 if you have the <Eigen/LU> header file. */
${DEFINE_HAVE_EIGEN_LU}
/* Defined if you have HDF5 support */
${DEFINE_HAVE_HDF5}
/* Define to 1 if you have the <inttypes.h> header file. */
${DEFINE_HAVE_INTTYPES_H}
/* Define if you have LAPACK library */
${DEFINE_HAVE_LAPACK}
/* Define if you have LIBHILBERT library */
${DEFINE_HAVE_LIBHILBERT}
/* Have quad math lib */
${DEFINE_HAVE_LIBQUADMATH}
/* Define to 1 if you have the <memory.h> header file. */
${DEFINE_HAVE_MEMORY_H}
/* Define if you have METIS library */
${DEFINE_HAVE_METIS}
/* MPI Enabled */
${DEFINE_HAVE_MPI}
/* We have OSX */
${DEFINE_HAVE_OSX}
/* Define if you have PARMETIS library */
${DEFINE_HAVE_PARMETIS}
/* Define if you have PETSC library */
${DEFINE_HAVE_PETSC}
/* Define to 1 if you have the <stdint.h> header file. */
${DEFINE_HAVE_STDINT_H}
/* Define to 1 if you have the <stdlib.h> header file. */
${DEFINE_HAVE_STDLIB_H}
/* Define to 1 if you have the <strings.h> header file. */
${DEFINE_HAVE_STRINGS_H}
/* Define to 1 if you have the <string.h> header file. */
${DEFINE_HAVE_STRING_H}
/* Define if you have SUITESPARSE library. */
${DEFINE_HAVE_SUITESPARSE}
/* Define to 1 if you have the <sys/stat.h> header file. */
${DEFINE_HAVE_SYS_STAT_H}
/* Define to 1 if you have the <sys/types.h> header file. */
${DEFINE_HAVE_SYS_TYPES_H}
/* Define to 1 if you have the <unistd.h> header file. */
${DEFINE_HAVE_UNISTD_H}
/* Test TinyObjLoader */
${DEFINE_HAVE_TINYOBJLOADER}
/* ACTION to take in case of error */
${DEFINE_ACTION_ON_ERROR}
/* Define to the sub-directory where libtool stores uninstalled libraries. */
#define LT_OBJDIR ".libs/"
/* NVCC compiling */
${DEFINE_NVCC} /**/
/* Define if we have Alpaka */
${DEFINE_HAVE_ALPAKA}
/* Additional alpaka definitions */
${ALPAKA_ACC_CPU_B_SEQ_T_SEQ_ENABLE_DEF}
${ALPAKA_ACC_CPU_B_SEQ_T_THREADS_ENABLE_DEF}
${ALPAKA_ACC_CPU_B_SEQ_T_FIBERS_ENABLE_DEF}
${ALPAKA_ACC_CPU_B_TBB_T_SEQ_ENABLE_DEF}
${ALPAKA_ACC_CPU_B_OMP2_T_SEQ_ENABLE_DEF}
${ALPAKA_ACC_CPU_B_SEQ_T_OMP2_ENABLE_DEF}
${ALPAKA_ACC_CPU_BT_OMP4_ENABLE_DEF}
/* Name of package */
#define PACKAGE "openfpm_pdata"
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT "BUG-REPORT-ADDRESS"
/* Define to the full name of this package. */
#define PACKAGE_NAME "OpenFPM_pdata"
/* Define to the full name and version of this package. */
#define PACKAGE_STRING "OpenFPM_pdata 1.0.0"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "openfpm_pdata"
/* Define to the home page for this package. */
#define PACKAGE_URL ""
/* Define to the version of this package. */
#define PACKAGE_VERSION "1.0.0"
/* Test performance mode */
${DEFINE_PERFORMANCE_TEST}
/* Security enhancement class 1 */
${DEFINE_SE_CLASS1}
/* Security enhancement class 2 */
${DEFINE_SE_CLASS2}
/* Security enhancement class 3 */
${DEFINE_SE_CLASS3}
/* Define to 1 if you have the ANSI C header files. */
${DEFINE_STDC_HEADERS}
/* If an error occur stop the program */
${DEFINE_STOP_ON_ERROR}
/* Garbage injector*/
${DEFINE_GARBAGE_INJECTOR}
/* Test coverage mode */
${DEFINE_TEST_COVERAGE_MODE}
/* when an error accur continue but avoid unsafe operation */
/* #undef THROW_ON_ERROR */
/* Version number of package */
#define VERSION "1.0.0"
......@@ -2,7 +2,7 @@
#include <cstddef>
#include "CudaMemory.cuh"
#include "cuda_macro.h"
#include "util/cudify/cudify.hpp"
#include "util/cuda_util.hpp"
#include <cstring>
#define CUDA_EVENT 0x1201
......
#include "config.h"
#include "util/cuda_launch.hpp"
#include "util/cuda_util.hpp"
#include "mem_conf.hpp"
size_t openfpm_ofpmmemory_compilation_mask()
......@@ -9,4 +9,4 @@ size_t openfpm_ofpmmemory_compilation_mask()
compiler_mask = CUDA_ON_BACKEND;
return compiler_mask;
}
\ No newline at end of file
}
/*
* cuda_launch.hpp
*
* Created on: Jan 14, 2019
* Author: i-bird
*/
#ifndef CUDA_LAUNCH_HPP_
#define CUDA_LAUNCH_HPP_
#include "config.h"
#include "cuda_kernel_error_checker.hpp"
#include "util/cudify/cudify.hpp"
#endif /* CUDA_LAUNCH_HPP_ */