File: mpipython.c

package info (click to toggle)
python-scientific 2.2-5
  • links: PTS
  • area: main
  • in suites: woody
  • size: 1,368 kB
  • ctags: 2,396
  • sloc: python: 6,468; ansic: 3,643; xml: 3,596; makefile: 79; sh: 27
file content (20 lines) | stat: -rw-r--r-- 391 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/* MPI version of python.c. MPI initialization must occur before
   Python starts up. */

#include "Python.h"
#include "mpi.h"

extern DL_EXPORT(int) Py_Main();

int
main(argc, argv)
	int argc;
	char **argv;
{
  int return_code;
  MPI_Init(&argc, &argv);
  MPI_Errhandler_set(MPI_COMM_WORLD, MPI_ERRORS_RETURN);
  return_code = Py_Main(argc, argv);
  MPI_Finalize();
  return return_code;
}