File: hello_sessions_c.c

package info (click to toggle)
openmpi 5.0.7-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 202,312 kB
  • sloc: ansic: 612,441; makefile: 42,495; sh: 11,230; javascript: 9,244; f90: 7,052; java: 6,404; perl: 5,154; python: 1,856; lex: 740; fortran: 61; cpp: 20; tcl: 12
file content (21 lines) | stat: -rw-r--r-- 524 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include "mpi.h"
#include <stdio.h>

/*
 * Simple test to demonstrate several aspects of MPI 4 Sessions and related
 * functionality.  See sections 11.3 and 11.4 of the MPI 4 standard for more
 * details.
 */

int main(int argc, char** argv) {
  MPI_Info info;
  MPI_Session s1, s2;

  MPI_Info_create(&info);
  MPI_Session_init(MPI_INFO_NULL, MPI_ERRORS_RETURN, &s1);
  MPI_Session_finalize(&s1);
  MPI_Session_init(MPI_INFO_NULL, MPI_ERRORS_RETURN, &s2);
  MPI_Session_finalize(&s2);
  MPI_Info_free(&info);
  return 0;
}