Skip to content

Commit

Permalink
Do not silenly drop unsupported comm-type
Browse files Browse the repository at this point in the history
  • Loading branch information
janciesko committed Jun 17, 2024
1 parent a7eaaaf commit c051efb
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
6 changes: 6 additions & 0 deletions src/comm_types/comm_serial.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@
#ifdef MODULES_OPTION_CHECK
if( (strcmp(argv[i+1], "SERIAL") == 0) )
comm_type = COMM_SERIAL;
#if !defined(EXAMINIMD_ENABLE_MPI) && !defined(EXAMINIMD_ENABLE_KOKKOS_REMOTE_SPACES)
if( (strcmp(argv[i+1], "SERIAL") != 0) ){
printf("ERROR: Unsupported Comm-type selected\n");
exit(1);
}
#endif
#endif
#ifdef COMM_MODULES_INSTANTIATION
else if(input->comm_type == COMM_SERIAL) {
Expand Down
1 change: 0 additions & 1 deletion src/input.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ Input::Input(System* p):system(p),input_data(ItemizedFile()),integrator_type(INT
force_coeff_lines = Kokkos::View<int*,Kokkos::HostSpace>("Input::force_coeff_lines",0);
input_file_type = -1;


#if defined(EXAMINIMD_ENABLE_MPI) && defined(EXAMINIMD_ENABLE_KOKKOS_REMOTE_SPACES)
comm_type = COMM_MPI;
#else
Expand Down
5 changes: 3 additions & 2 deletions src/modules_comm.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,9 @@

// Include Module header files for comm

#if !defined(EXAMINIMD_ENABLE_MPI) && !defined(EXAMINIMD_ENABLE_KOKKOS_REMOTE_SPACES)
#if defined(EXAMINIMD_ENABLE_MPI) || defined(EXAMINIMD_ENABLE_KOKKOS_REMOTE_SPACES)
#include <comm_serial.h>
#else
#include <comm_mpi.h>
#else
#include <comm_serial.h>
#endif

0 comments on commit c051efb

Please sign in to comment.