@@ -58,7 +58,8 @@ TEST_P (shmem, test_shmem_init_finalize)
5858 int mpiret;
5959
6060 /* setup shared memory usage */
61- t8_shmem_init (comm);
61+ const int intrasize_from_init = t8_shmem_init (comm);
62+ ASSERT_GT (intrasize_from_init, 0 ) << " Error in t8_shmem_init. No intranode communicator set." ;
6263
6364 /* Get intranode and internode comm */
6465 sc_mpi_comm_get_node_comms (comm, &intranode, &internode);
@@ -113,7 +114,9 @@ TEST_P (shmem, test_sc_shmem_alloc)
113114 t8_debugf (" Checking shared memory type %s.\n " , sc_shmem_type_to_string[shmem_type]);
114115
115116 /* setup shared memory usage */
116- t8_shmem_init (comm);
117+ const int intranode_size = t8_shmem_init (comm);
118+ ASSERT_GT (intranode_size, 0 ) << " Could not initialize shared memory." ;
119+
117120 t8_shmem_set_type (comm, shmem_type);
118121
119122#if T8_ENABLE_MPI
@@ -196,7 +199,8 @@ TEST_P (shmem, test_shmem_array_allgatherv)
196199 const sc_shmem_type_t shmem_type = (sc_shmem_type_t ) shmem_type_int;
197200
198201 /* setup shared memory usage */
199- t8_shmem_init (comm);
202+ const int intranode_size = t8_shmem_init (comm);
203+ ASSERT_GT (intranode_size, 0 ) << " Could not initialize shared memory." ;
200204 t8_shmem_set_type (comm, shmem_type);
201205
202206#if T8_ENABLE_MPI
@@ -246,7 +250,8 @@ TEST_P (shmem, test_shmem_array_prefix)
246250 const sc_shmem_type_t shmem_type = (sc_shmem_type_t ) shmem_type_int;
247251
248252 /* setup shared memory usage */
249- t8_shmem_init (comm);
253+ const int intranode_size = t8_shmem_init (comm);
254+ ASSERT_GT (intranode_size, 0 ) << " Could not initialize shared memory." ;
250255 t8_shmem_set_type (comm, shmem_type);
251256
252257#if T8_ENABLE_MPI
@@ -291,7 +296,8 @@ TEST_P (shmem, test_shmem_array)
291296 const sc_shmem_type_t shmem_type = (sc_shmem_type_t ) shmem_type_int;
292297
293298 /* setup shared memory usage */
294- t8_shmem_init (comm);
299+ const int intranode_size = t8_shmem_init (comm);
300+ ASSERT_GT (intranode_size, 0 ) << " Could not initialize shared memory." ;
295301 t8_shmem_set_type (comm, shmem_type);
296302
297303#if T8_ENABLE_MPI
0 commit comments