Skip to content

Commit

Permalink
Remove deprecated Cabana variables
Browse files Browse the repository at this point in the history
  • Loading branch information
streeve committed Jul 29, 2020
1 parent a93c2fc commit 3bbfb20
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion advanced_examples/01_parallel_for/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
if( Cabana_ENABLE_Cuda )
if( Kokkos_ENABLE_CUDA )
if("${CMAKE_Fortran_COMPILER_ID}" STREQUAL "PGI")
add_definitions(-DSIMD_SIZE=1 -DVEC_LEN=32 -DUSE_GPU=1)
set(MPI_Fortran_COMPILE_FLAGS "-r -ta=tesla:cuda9.0 -Minfo=accel -Mcuda=cuda9.0")
Expand Down
2 changes: 1 addition & 1 deletion advanced_examples/02_push/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
if( Cabana_ENABLE_Cuda )
if( Kokkos_ENABLE_CUDA )
if("${CMAKE_Fortran_COMPILER_ID}" STREQUAL "PGI")
add_definitions(-DSIMD_SIZE=1 -DVEC_LEN=32 -DUSE_GPU=1)
set(MPI_Fortran_COMPILE_FLAGS "-r -ta=tesla:cuda9.0 -Minfo=accel -Mcuda=cuda9.0")
Expand Down
2 changes: 1 addition & 1 deletion advanced_examples/03_scatter/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
if( Cabana_ENABLE_Cuda )
if( Kokkos_ENABLE_CUDA )
if("${CMAKE_Fortran_COMPILER_ID}" STREQUAL "PGI")
add_definitions(-DSIMD_SIZE=1 -DVEC_LEN=32 -DUSE_GPU=1)
set(MPI_Fortran_COMPILE_FLAGS "-r -ta=tesla:cuda9.0 -Minfo=accel -Mcuda=cuda9.0")
Expand Down
12 changes: 6 additions & 6 deletions advanced_examples/04_unmanaged_aosoa/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,29 @@ link_directories(${MPI_Fortran_LIBRARIES})

message(${CMAKE_Fortran_COMPILER_ID})
if (("${CMAKE_Fortran_COMPILER_ID}" STREQUAL "PGI") AND ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "PGI"))
if( Cabana_ENABLE_Cuda )
if( Kokkos_ENABLE_CUDA )
target_compile_definitions(ForParallelForUnmanaged PUBLIC -DUSE_GPU=1)
set(CMAKE_Fortran_FLAGS "-ta=tesla:cuda9.0 -Minfo=accel -Mcuda=cuda9.0")
set(CMAKE_CXX_FLAGS "--relocatable-device-code=true")
elseif( Cabana_ENABLE_OpenMP )
elseif( Kokkos_ENABLE_OPENMP )
target_compile_definitions(ForParallelForUnmanaged PUBLIC -DUSE_GPU=0)
set(CMAKE_Fortran_FLAGS "-ta=multicore -mp")
elseif( Cabana_ENABLE_Serial )
elseif( Kokkos_ENABLE_SERIAL )
target_compile_definitions(ForParallelForUnmanaged PUBLIC -DUSE_GPU=0)
set(CMAKE_Fortran_FLAGS "-ta=host")
endif()

set(CMAKE_EXE_LINKER_FLAGS "-pgc++libs")
else()
if( Cabana_ENABLE_Cuda )
if( Kokkos_ENABLE_CUDA )
message("Only PGI is supported for compiling fortran cuda code. Right now
we only accept building with PGI for both CXX and Fortran to avoid mixing
compiler families.\n Skip.")
return()
elseif( Cabana_ENABLE_OpenMP )
elseif( Kokkos_ENABLE_OPENMP )
target_compile_definitions(ForParallelForUnmanaged PUBLIC -DUSE_GPU=0)
set(CMAKE_Fortran_FLAGS "-fopenmp")
elseif( Cabana_ENABLE_Serial )
elseif( Kokkos_ENABLE_SERIAL )
target_compile_definitions(ForParallelForUnmanaged PUBLIC -DUSE_GPU=0)
endif()
endif()

0 comments on commit 3bbfb20

Please sign in to comment.