Skip to content

Commit

Permalink
Merge pull request #193 from arcaneframework/dev/gg-add-test-using-ac…
Browse files Browse the repository at this point in the history
…celerator-api-with-sequential-runtime

Add test using accelerator API but with sequential runtime.
  • Loading branch information
grospelliergilles authored Nov 26, 2024
2 parents dd731eb + 62a7e5b commit d13c2e2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
14 changes: 12 additions & 2 deletions cmake/Utils.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,24 @@ macro(arcanefem_add_gpu_test)
if (NOT ARGS_COMMAND)
message(FATAL_ERROR "No arg COMMAND for macro 'arcanefem_add_gpu_test'")
endif()
# Add test without accelerator Runtime
if (ARGS_NB_MPI)
if (MPIEXEC_EXECUTABLE)
add_test(NAME ${ARGS_NAME} COMMAND ${MPIEXEC_EXECUTABLE} -n ${ARGS_NB_MPI} ${ARGS_COMMAND} ${ARGS_ARGS})
endif()
else()
add_test(NAME ${ARGS_NAME} COMMAND ${ARGS_COMMAND} ${ARGS_ARGS})
endif()

# Add test WITH accelerator Runtime
if(ARCANE_HAS_ACCELERATOR)
set(_RUNTIME_ARGS "-A,AcceleratorRuntime=${ARCANE_ACCELERATOR_RUNTIME}")
if (ARGS_NB_MPI)
if (MPIEXEC_EXECUTABLE)
add_test(NAME ${ARGS_NAME} COMMAND ${MPIEXEC_EXECUTABLE} -n ${ARGS_NB_MPI} ${ARGS_COMMAND} ${_RUNTIME_ARGS} ${ARGS_ARGS})
add_test(NAME ${ARGS_NAME}_${ARCANE_ACCELERATOR_RUNTIME} COMMAND ${MPIEXEC_EXECUTABLE} -n ${ARGS_NB_MPI} ${ARGS_COMMAND} ${_RUNTIME_ARGS} ${ARGS_ARGS})
endif()
else()
add_test(NAME ${ARGS_NAME} COMMAND ${ARGS_COMMAND} ${_RUNTIME_ARGS} ${ARGS_ARGS})
add_test(NAME ${ARGS_NAME}_${ARCANE_ACCELERATOR_RUNTIME} COMMAND ${ARGS_COMMAND} ${_RUNTIME_ARGS} ${ARGS_ARGS})
endif()
endif()
endmacro()
Expand Down
2 changes: 0 additions & 2 deletions poisson/FemModule.cc
Original file line number Diff line number Diff line change
Expand Up @@ -183,13 +183,11 @@ _handleFlags()
m_use_legacy = false;
info() << "CSR: The CSR datastructure and its associated methods will be used";
}
#ifdef ARCANE_HAS_ACCELERATOR
if (parameter_list.getParameterOrNull("CSR_GPU") == "TRUE" || options()->csrGpu()) {
m_use_csr_gpu = true;
m_use_legacy = false;
info() << "CSR_GPU: The CSR datastructure GPU compatible and its associated methods will be used";
}
#endif
if (parameter_list.getParameterOrNull("NWCSR") == "TRUE" || options()->nwcsr()) {
m_use_nodewise_csr = true;
m_use_legacy = false;
Expand Down

0 comments on commit d13c2e2

Please sign in to comment.