Skip to content

Commit c051efb

Browse files
committed
Do not silenly drop unsupported comm-type
1 parent a7eaaaf commit c051efb

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

src/comm_types/comm_serial.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,12 @@
3939
#ifdef MODULES_OPTION_CHECK
4040
if( (strcmp(argv[i+1], "SERIAL") == 0) )
4141
comm_type = COMM_SERIAL;
42+
#if !defined(EXAMINIMD_ENABLE_MPI) && !defined(EXAMINIMD_ENABLE_KOKKOS_REMOTE_SPACES)
43+
if( (strcmp(argv[i+1], "SERIAL") != 0) ){
44+
printf("ERROR: Unsupported Comm-type selected\n");
45+
exit(1);
46+
}
47+
#endif
4248
#endif
4349
#ifdef COMM_MODULES_INSTANTIATION
4450
else if(input->comm_type == COMM_SERIAL) {

src/input.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,6 @@ Input::Input(System* p):system(p),input_data(ItemizedFile()),integrator_type(INT
123123
force_coeff_lines = Kokkos::View<int*,Kokkos::HostSpace>("Input::force_coeff_lines",0);
124124
input_file_type = -1;
125125

126-
127126
#if defined(EXAMINIMD_ENABLE_MPI) && defined(EXAMINIMD_ENABLE_KOKKOS_REMOTE_SPACES)
128127
comm_type = COMM_MPI;
129128
#else

src/modules_comm.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,9 @@
3838

3939
// Include Module header files for comm
4040

41-
#if !defined(EXAMINIMD_ENABLE_MPI) && !defined(EXAMINIMD_ENABLE_KOKKOS_REMOTE_SPACES)
41+
#if defined(EXAMINIMD_ENABLE_MPI) || defined(EXAMINIMD_ENABLE_KOKKOS_REMOTE_SPACES)
4242
#include <comm_serial.h>
43-
#else
4443
#include <comm_mpi.h>
44+
#else
45+
#include <comm_serial.h>
4546
#endif

0 commit comments

Comments
 (0)