Skip to content
Snippets Groups Projects
Commit cd73d1e5 authored by Thomas Jahns's avatar Thomas Jahns :cartwheel:
Browse files

Fix missing xt_initialize/finalize calls.

parent 5c31151a
No related branches found
No related tags found
No related merge requests found
......@@ -5,6 +5,7 @@
#ifdef USE_MPI
#include <unistd.h>
#include <mpi.h>
#include <yaxt.h>
#endif
#include "cdi.h"
......@@ -125,7 +126,8 @@ int main (int argc, char *argv[])
int nProcsIO = 2;
xmpi ( MPI_Init ( &argc, &argv));
xmpi ( MPI_Comm_dup ( MPI_COMM_WORLD, &commGlob ));
commGlob = MPI_COMM_WORLD;
xt_initialize(commGlob);
xmpi ( MPI_Comm_set_errhandler ( commGlob, MPI_ERRORS_RETURN ));
xmpi ( MPI_Comm_size ( commGlob, &sizeGlob ));
xmpi ( MPI_Comm_rank ( commGlob, &rankGlob ));
......@@ -168,6 +170,7 @@ int main (int argc, char *argv[])
#ifdef USE_MPI
pioFinalize ();
xt_finalize();
MPI_Finalize ();
#endif
return 0;
......
......@@ -3,6 +3,9 @@
#endif
PROGRAM collectdata2003
#ifdef USE_MPI
USE yaxt, ONLY: xt_initialize, xt_finalize
#endif
IMPLICIT NONE
......@@ -28,7 +31,8 @@ PROGRAM collectdata2003
! Start parallel environment
#ifdef USE_MPI
CALL MPI_INIT ( error )
CALL MPI_COMM_DUP ( MPI_COMM_WORLD, commGlob, error )
commGlob = MPI_COMM_WORLD
CALL xt_initialize(commGlob)
! For parallel IO:
! Initialize environment.
......@@ -41,7 +45,7 @@ PROGRAM collectdata2003
! For parallel IO:
! Cleanup environment.
CALL pioFinalize ()
CALL xt_finalize
CALL MPI_FINALIZE ( error )
#endif
......
......@@ -166,7 +166,8 @@ int main (int argc, char *argv[])
int IOMode, nProcsIO, count;
xmpi ( MPI_Init ( &argc, &argv));
xmpi ( MPI_Comm_dup ( MPI_COMM_WORLD, &commGlob ));
commGlob = MPI_COMM_WORLD;
xt_initialize(commGlob);
xmpi ( MPI_Comm_set_errhandler ( commGlob, MPI_ERRORS_RETURN ));
xmpi ( MPI_Comm_size ( commGlob, &sizeGlob ));
xmpi ( MPI_Comm_rank ( commGlob, &rankGlob ));
......@@ -194,6 +195,7 @@ int main (int argc, char *argv[])
#ifdef USE_MPI
pioFinalize ();
xt_finalize();
MPI_Finalize ();
#endif
return 0;
......
......@@ -6,6 +6,7 @@
#ifdef USE_MPI
#include <mpi.h>
#include <yaxt.h>
#include "cdi.h"
#include "pio_util.h"
......@@ -225,7 +226,8 @@ int main (int argc, char *argv[])
MPI_Comm commGlob, commModel;
MPI_Init(&argc, &argv);
xmpi ( MPI_Comm_dup ( MPI_COMM_WORLD, &commGlob ));
commGlob = MPI_COMM_WORLD;
xt_initialize(commGlob);
xmpi ( MPI_Comm_set_errhandler ( commGlob, MPI_ERRORS_RETURN ));
xmpi ( MPI_Comm_size ( commGlob, &sizeGlob ));
......@@ -240,6 +242,7 @@ int main (int argc, char *argv[])
modelRun ( commModel );
xt_finalize();
MPI_Finalize ();
#else
printf ( "Use MPI for this testprogram.\n" );
......
......@@ -14,6 +14,7 @@
#ifdef USE_MPI
#include <mpi.h>
#include <yaxt.h>
#else
typedef int MPI_Comm;
#endif
......@@ -395,6 +396,7 @@ int main (int argc, char *argv[])
xmpi ( MPI_Init ( &argc, &argv));
commGlob = MPI_COMM_WORLD;
xt_initialize(commGlob);
xmpi ( MPI_Comm_set_errhandler ( commGlob, MPI_ERRORS_RETURN ));
xmpi ( MPI_Comm_size ( commGlob, &sizeGlob ));
xmpi ( MPI_Comm_rank ( commGlob, &rankGlob ));
......@@ -489,6 +491,7 @@ int main (int argc, char *argv[])
#ifdef USE_MPI
pioFinalize ();
xt_finalize();
MPI_Finalize ();
#endif
return 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment