File tree Expand file tree Collapse file tree 4 files changed +28
-10
lines changed Expand file tree Collapse file tree 4 files changed +28
-10
lines changed Original file line number Diff line number Diff line change 40
40
pushd examples
41
41
make
42
42
popd
43
- - name : Test ring
43
+ - name : Test ring and sessions sanity check
44
44
run : |
45
45
mpirun --map-by ppr:1:core examples/ring_c
46
+ mpirun --map-by ppr:1:core examples/hello_sessions_c
Original file line number Diff line number Diff line change @@ -65,14 +65,15 @@ EXAMPLES = \
65
65
oshmem_max_reduction \
66
66
oshmem_strided_puts \
67
67
oshmem_symmetric_data \
68
- spc_example
68
+ spc_example \
69
+ hello_sessions_c
69
70
70
71
71
72
# Default target. Always build the C MPI examples. Only build the
72
73
# others if we have the appropriate Open MPI / OpenSHMEM language
73
74
# bindings.
74
75
75
- all : hello_c ring_c connectivity_c spc_example
76
+ all : hello_c ring_c connectivity_c spc_example hello_sessions_c
76
77
@ if which ompi_info > /dev/null 2>&1 ; then \
77
78
$(MAKE ) mpi; \
78
79
fi
@@ -129,6 +130,8 @@ connectivity_c: connectivity_c.c
129
130
$(MPICC ) $(CFLAGS ) $(LDFLAGS ) $? $(LDLIBS ) -o $@
130
131
spc_example : spc_example.c
131
132
$(MPICC ) $(CFLAGS ) $(LDFLAGS ) $? $(LDLIBS ) -o $@
133
+ hello_sessions_c : hello_sessions_c.c
134
+ $(MPICC ) $(CFLAGS ) $(LDFLAGS ) $? $(LDLIBS ) -o $@
132
135
133
136
hello_mpifh : hello_mpifh.f
134
137
$(MPIFC ) $(FCFLAGS ) $(LDFLAGS ) $? $(LDLIBS ) -o $@
Original file line number Diff line number Diff line change
1
+ #include "mpi.h"
2
+ #include <stdio.h>
3
+
4
+ /*
5
+ * Simple test to demonstrate several aspects of MPI 4 Sessions and related
6
+ * functionality. See sections 11.3 and 11.4 of the MPI 4 standard for more
7
+ * details.
8
+ */
9
+
10
+ int main (int argc , char * * argv ) {
11
+ MPI_Info info ;
12
+ MPI_Session s1 , s2 ;
13
+
14
+ MPI_Info_create (& info );
15
+ MPI_Session_init (MPI_INFO_NULL , MPI_ERRORS_RETURN , & s1 );
16
+ MPI_Session_finalize (& s1 );
17
+ MPI_Session_init (MPI_INFO_NULL , MPI_ERRORS_RETURN , & s2 );
18
+ MPI_Session_finalize (& s2 );
19
+ MPI_Info_free (& info );
20
+ return 0 ;
21
+ }
Original file line number Diff line number Diff line change @@ -954,13 +954,6 @@ static int ompi_mpi_instance_finalize_common (void)
954
954
955
955
ompi_mpi_instance_release ();
956
956
957
- if (0 == opal_initialized ) {
958
- /* if there is no MPI_T_init_thread that has been MPI_T_finalize'd,
959
- * then be gentle to the app and release all the memory now (instead
960
- * of the opal library destructor */
961
- opal_class_finalize ();
962
- }
963
-
964
957
return OMPI_SUCCESS ;
965
958
}
966
959
You can’t perform that action at this time.
0 commit comments