File tree Expand file tree Collapse file tree 3 files changed +31
-3
lines changed Expand file tree Collapse file tree 3 files changed +31
-3
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
+ #if 0
15
+ /* need PR https://github.com/open-mpi/ompi/pull/12868 to be merged in
16
+ * before this can be uncommented.
17
+ */
18
+ MPI_Info_create (& info );
19
+ #endif
20
+ MPI_Session_init (MPI_INFO_NULL , MPI_ERRORS_RETURN , & s1 );
21
+ MPI_Session_finalize (& s1 );
22
+ MPI_Session_init (MPI_INFO_NULL , MPI_ERRORS_RETURN , & s2 );
23
+ MPI_Session_finalize (& s2 );
24
+ }
You can’t perform that action at this time.
0 commit comments