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

Reduce code divergence.

parent d10cf1f9
No related branches found
No related tags found
1 merge request!14Draft: K202125/cdi 1.8.x pio merge followup
Pipeline #16263 failed
...@@ -192,7 +192,10 @@ static int modelRun(MPI_Comm comm) ...@@ -192,7 +192,10 @@ static int modelRun(MPI_Comm comm)
int bufferSize, differ; int bufferSize, differ;
#ifdef USE_MPI #ifdef USE_MPI
const char *fname = "example_resource_copy_mpi.grb";
cdiPioSerializeSetMPI(); cdiPioSerializeSetMPI();
#else
const char *fname = "example_resource_copy.grb";
#endif #endif
gridID = defineGrid (); gridID = defineGrid ();
...@@ -203,11 +206,7 @@ static int modelRun(MPI_Comm comm) ...@@ -203,11 +206,7 @@ static int modelRun(MPI_Comm comm)
{ {
struct idPair temp = defineVlist(gridID, zaxisID, taxisID); struct idPair temp = defineVlist(gridID, zaxisID, taxisID);
vlistID = temp.id1; vlistID = temp.id1;
#ifdef USE_MPI streamID = streamOpenWrite(fname, CDI_FILETYPE_GRB);
streamID = streamOpenWrite("example_resource_copy_mpi.grb", CDI_FILETYPE_GRB);
#else
streamID = streamOpenWrite("example_resource_copy.grb", CDI_FILETYPE_GRB);
#endif
if ( streamID < 0 ) xabort ( "Could not open file" ); if ( streamID < 0 ) xabort ( "Could not open file" );
defineStream ( streamID, vlistID ); defineStream ( streamID, vlistID );
vlistDestroy(temp.id1); vlistDestroy(temp.id1);
......
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