Commit 1a14b1bc authored by BRAMAS Berenger's avatar BRAMAS Berenger

Update flags and defines for starpu and cuda

parent 5d14ef1b
...@@ -276,6 +276,8 @@ endif() ...@@ -276,6 +276,8 @@ endif()
################################################################## ##################################################################
################################################################## ##################################################################
# #
MESSAGE( STATUS "ScalFMM_USE_STARPU = ${ScalFMM_USE_STARPU}" )
if( ScalFMM_USE_STARPU ) if( ScalFMM_USE_STARPU )
SET(STARPU_LIBRARIES " -L$ENV{STARPU_LIB}; -lstarpu-$ENV{STARPU_VERSION}") # CACHE STRING "Set your STARPU flags" SET(STARPU_LIBRARIES " -L$ENV{STARPU_LIB}; -lstarpu-$ENV{STARPU_VERSION}") # CACHE STRING "Set your STARPU flags"
...@@ -290,24 +292,25 @@ if( ScalFMM_USE_STARPU ) ...@@ -290,24 +292,25 @@ if( ScalFMM_USE_STARPU )
MESSAGE(STATUS " STARPU_LIBRARIES = ${STARPU_LIBRARIES}") MESSAGE(STATUS " STARPU_LIBRARIES = ${STARPU_LIBRARIES}")
MESSAGE(STATUS " STARPU_INCLUDES = ${STARPU_INCLUDES}") MESSAGE(STATUS " STARPU_INCLUDES = ${STARPU_INCLUDES}")
OPTION( ScalFMM_USE_CUDA "Set to ON to use CUDA with StarPU" OFF ) OPTION( ScalFMM_USE_CUDA "Set to ON to use CUDA with StarPU" OFF )
if(ScalFMM_USE_CUDA) MESSAGE( STATUS "ScalFMM_USE_CUDA = ${ScalFMM_USE_CUDA}" )
execute_process(COMMAND nvcc --version ERROR_VARIABLE cuda_error_output OUTPUT_QUIET) if(ScalFMM_USE_CUDA)
if(cuda_error_output) execute_process(COMMAND nvcc --version ERROR_VARIABLE cuda_error_output OUTPUT_QUIET)
message( FATAL_ERROR "nvcc is needed with CUDA." ) if(cuda_error_output)
endif() message( FATAL_ERROR "nvcc is needed with CUDA." )
if(NOT DEFINED CUSTOM_CUDA_FLAGS) endif()
SET( CUSTOM_CUDA_FLAGS "-std=c++11;-arch=sm_20" CACHE STRING "Set your CUDA flags, for example : -arch=sm_20;-ptxas-options=-v;-use_fast_math") if(NOT DEFINED CUSTOM_CUDA_FLAGS)
endif() SET( CUSTOM_CUDA_FLAGS "-std=c++11;-arch=sm_20" CACHE STRING "Set your CUDA flags, for example : -arch=sm_20;-ptxas-options=-v;-use_fast_math")
# This is needed to remove backslash after space in ADD_CUSTOM_COMMAND endif()
SEPARATE_ARGUMENTS(CUSTOM_CUDA_FLAGS) # This is needed to remove backslash after space in ADD_CUSTOM_COMMAND
MESSAGE( STATUS "CUSTOM_CUDA_FLAGS = ${CUSTOM_CUDA_FLAGS}" ) SEPARATE_ARGUMENTS(CUSTOM_CUDA_FLAGS)
MESSAGE( STATUS "CUSTOM_CUDA_FLAGS = ${CUSTOM_CUDA_FLAGS}" )
# Add libcudart and cuda.h
# link_directories($ENV{CUDA_LIB}) # Add libcudart and cuda.h
include_directories(${$ENV{CUDA_INC}}) # link_directories($ENV{CUDA_LIB})
SET(SCALFMM_LIBRARIES "${SCALFMM_LIBRARIES}; -L$ENV{CUDA_LIB}; -lcudart") include_directories(${$ENV{CUDA_INC}})
endif() SET(SCALFMM_LIBRARIES "${SCALFMM_LIBRARIES}; -L$ENV{CUDA_LIB}; -lcudart")
endif()
endif(ScalFMM_USE_STARPU) endif(ScalFMM_USE_STARPU)
list(APPEND FUSE_LIST "STARPU") list(APPEND FUSE_LIST "STARPU")
list(APPEND FUSE_LIST "CUDA") list(APPEND FUSE_LIST "CUDA")
......
...@@ -58,13 +58,13 @@ ...@@ -58,13 +58,13 @@
// CUDA // CUDA
/////////////////////////////////////////////////////// ///////////////////////////////////////////////////////
#cmakedefine SCALFMM_USE_CUDA #cmakedefine ScalFMM_USE_CUDA
/////////////////////////////////////////////////////// ///////////////////////////////////////////////////////
// STARPU // STARPU
/////////////////////////////////////////////////////// ///////////////////////////////////////////////////////
#cmakedefine SCALFMM_USE_STARPU #cmakedefine ScalFMM_USE_STARPU
/////////////////////////////////////////////////////// ///////////////////////////////////////////////////////
// SSE // SSE
...@@ -80,12 +80,6 @@ ...@@ -80,12 +80,6 @@
#cmakedefine ScalFMM_USE_AVX #cmakedefine ScalFMM_USE_AVX
#cmakedefine __SSEPE_INTEL_COMPILER #cmakedefine __SSEPE_INTEL_COMPILER
///////////////////////////////////////////////////////
// STARPU
///////////////////////////////////////////////////////
#cmakedefine ScalFMM_USE_STARPU
/////////////////////////////////////////////////////// ///////////////////////////////////////////////////////
// Assert tests // Assert tests
/////////////////////////////////////////////////////// ///////////////////////////////////////////////////////
......
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