#include
<stdio.h>
#include
<time.h>
#include
<string.h>
#include
"localmpi.h"
#include
"extern.h"
int
main ( int
argc, char
** argv )
{
if
( mpi_allocate ( argc, argv ) != 0 )
return
( mpi_err );
if
( my_rank != MASTER_RANK ) {
if
( child_proc() != 0 )
{
fprintf ( stderr, "%s: Error: Error in executing child\n", argv[0]);
return
( mpi_err );
}
}
else
{
if
( handle_returns() != 0 )
{
fprintf ( stderr, "%s: Error: Error in handling return from child\n", argv[0] );
return
( mpi_err );
}
}
mpi_err = MPI_Finalize();
if
( mpi_err != MPI_SUCCESS )
return
( mpi_err );
return
( 0 );
}