#include <stdlib.h>
#include <stdio.h>
#include <inttypes.h>
#include <mpi.h>
#if MPI_VERSION < 3
#define OTF2_MPI_UINT64_T MPI_UNSIGNED_LONG
#define OTF2_MPI_INT64_T MPI_LONG
#endif
get_time( void )
{
double t = MPI_Wtime() * 1e9;
return ( uint64_t )t;
}
pre_flush( void* userData,
void* callerData,
bool final )
{
}
post_flush( void* userData,
{
return get_time();
}
{
.otf2_post_flush = post_flush
};
int
main( int argc,
char** argv )
{
MPI_Init( &argc, &argv );
int size;
MPI_Comm_size( MPI_COMM_WORLD, &size );
int rank;
MPI_Comm_rank( MPI_COMM_WORLD, &rank );
"ArchiveName",
1024 * 1024 ,
4 * 1024 * 1024 ,
MPI_COMM_WORLD,
MPI_COMM_NULL );
rank );
uint64_t epoch_start = get_time();
NULL,
get_time(),
0 );
NULL,
get_time() );
MPI_Barrier( MPI_COMM_WORLD );
NULL,
get_time(),
0 ,
0 ,
0 );
NULL,
get_time(),
0 );
uint64_t epoch_end = get_time();
uint64_t global_epoch_start;
MPI_Reduce( &epoch_start,
&global_epoch_start,
0, MPI_COMM_WORLD );
uint64_t global_epoch_end;
MPI_Reduce( &epoch_end,
&global_epoch_end,
0, MPI_COMM_WORLD );
if ( 0 == rank )
{
1000000000,
global_epoch_start,
global_epoch_end - global_epoch_start + 1 );
0 ,
2 ,
3 ,
4 ,
7 ,
0 ,
0 );
0 ,
5 ,
6 ,
for ( int r = 0; r < size; r++ )
{
char process_name[ 32 ];
sprintf( process_name, "MPI Rank %d", r );
9 + r,
process_name );
r ,
9 + r ,
0 );
r ,
1 ,
4 ,
r );
}
uint64_t comm_locations[ size ];
for ( int r = 0; r < size; r++ )
{
comm_locations[ r ] = r;
}
0 ,
7 ,
size,
comm_locations );
1 ,
0 ,
size,
comm_locations );
0 ,
8 ,
1 ,
global_def_writer );
}
MPI_Barrier( MPI_COMM_WORLD );
MPI_Finalize();
return EXIT_SUCCESS;
}