Skip to content

Commit

Permalink
Abort first
Browse files Browse the repository at this point in the history
  • Loading branch information
streeve committed Jul 30, 2020
1 parent 3bbfb20 commit ba28aee
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions advanced_examples/04_unmanaged_aosoa/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
add_executable(ForParallelForUnmanaged Fortran_main.F90 Fortran_kernels.F90 parallel_for_example.cpp)
target_link_libraries(ForParallelForUnmanaged Cabana::cabanacore ${MPI_Fortran_LIBRARIES})
add_test(NAME Fortran_advance_example_04 COMMAND ForParallelForUnmanaged)
set_property(TARGET ForParallelForUnmanaged PROPERTY LINKER_LANGUAGE Fortran)
add_definitions(${MPI_Fortran_COMPILE_FLAGS})
include_directories(${MPI_Fortran_INCLUDE_PATH} ${CMAKE_CURRENT_BINARY_DIR}/../Fortran_features)
link_directories(${MPI_Fortran_LIBRARIES})

message(${CMAKE_Fortran_COMPILER_ID})
message(Kokkos_ENABLE_CUDA)
if (("${CMAKE_Fortran_COMPILER_ID}" STREQUAL "PGI") AND ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "PGI"))
if( Kokkos_ENABLE_CUDA )
target_compile_definitions(ForParallelForUnmanaged PUBLIC -DUSE_GPU=1)
Expand All @@ -19,7 +12,7 @@ if (("${CMAKE_Fortran_COMPILER_ID}" STREQUAL "PGI") AND ("${CMAKE_CXX_COMPILER_I
target_compile_definitions(ForParallelForUnmanaged PUBLIC -DUSE_GPU=0)
set(CMAKE_Fortran_FLAGS "-ta=host")
endif()

set(CMAKE_EXE_LINKER_FLAGS "-pgc++libs")
else()
if( Kokkos_ENABLE_CUDA )
Expand All @@ -34,3 +27,11 @@ else()
target_compile_definitions(ForParallelForUnmanaged PUBLIC -DUSE_GPU=0)
endif()
endif()

add_executable(ForParallelForUnmanaged Fortran_main.F90 Fortran_kernels.F90 parallel_for_example.cpp)
target_link_libraries(ForParallelForUnmanaged Cabana::cabanacore ${MPI_Fortran_LIBRARIES})
add_test(NAME Fortran_advance_example_04 COMMAND ForParallelForUnmanaged)
set_property(TARGET ForParallelForUnmanaged PROPERTY LINKER_LANGUAGE Fortran)
add_definitions(${MPI_Fortran_COMPILE_FLAGS})
include_directories(${MPI_Fortran_INCLUDE_PATH} ${CMAKE_CURRENT_BINARY_DIR}/../Fortran_features)
link_directories(${MPI_Fortran_LIBRARIES})

0 comments on commit ba28aee

Please sign in to comment.