📄 trace_mpi_core.c
字号:
/* MPI_Error_string - prototyping replacement for MPI_Error_string Trace the beginning and ending of MPI_Error_string.*/ TRACE_PRINTF( "Starting MPI_Error_string..." ); returnVal = PMPI_Error_string( errorcode, string, resultlen ); TRACE_PRINTF( "Ending MPI_Error_string" ); return returnVal;}int MPI_Errhandler_set( comm, errhandler )MPI_Comm comm;MPI_Errhandler errhandler;{ int returnVal; int llrank;/* MPI_Errhandler_set - prototyping replacement for MPI_Errhandler_set Trace the beginning and ending of MPI_Errhandler_set.*/ TRACE_PRINTF( "Starting MPI_Errhandler_set..." ); returnVal = PMPI_Errhandler_set( comm, errhandler ); TRACE_PRINTF( "Ending MPI_Errhandler_set" ); return returnVal;}int MPI_Finalize( ){ int returnVal; int llrank;/* MPI_Finalize - prototyping replacement for MPI_Finalize Trace the beginning and ending of MPI_Finalize.*/ PMPI_Comm_rank( MPI_COMM_WORLD, &llrank ); TRACE_PRINTF( "Starting MPI_Finalize..." ); MPE_Trace_hasBeenFinished = 1; returnVal = PMPI_Finalize( ); printf( "[%d] Ending MPI_Finalize\n", llrank ); fflush( stdout ); return returnVal;}int MPI_Get_processor_name( name, resultlen )char * name;int * resultlen;{ int returnVal; int llrank;/* MPI_Get_processor_name - prototyping replacement for MPI_Get_processor_name Trace the beginning and ending of MPI_Get_processor_name.*/ TRACE_PRINTF( "Starting MPI_Get_processor_name..." ); returnVal = PMPI_Get_processor_name( name, resultlen ); TRACE_PRINTF( "Ending MPI_Get_processor_name" ); return returnVal;}int MPI_Init( argc, argv )int * argc;char *** argv;{ int returnVal; int llrank;/* MPI_Init - prototyping replacement for MPI_Init Trace the beginning and ending of MPI_Init.*/ printf( "Starting MPI_Init...\n" ); fflush( stdout ); returnVal = PMPI_Init( argc, argv ); MPE_Trace_hasBeenInit = 1; TRACE_PRINTF( "Ending MPI_Init" ); return returnVal;}int MPI_Initialized( flag )int * flag;{ int returnVal; int llrank;/* MPI_Initialized - prototyping replacement for MPI_Initialized Trace the beginning and ending of MPI_Initialized.*/ TRACE_PRINTF( "Starting MPI_Initialized..." ); returnVal = PMPI_Initialized( flag ); TRACE_PRINTF( "Ending MPI_Initialized" ); return returnVal;}#ifdef FOO/* Don't trace the timer calls */double MPI_Wtick( ){ double returnVal; int llrank;/* MPI_Wtick - prototyping replacement for MPI_Wtick Trace the beginning and ending of MPI_Wtick.*/ TRACE_PRINTF( "Starting MPI_Wtick..." ); returnVal = PMPI_Wtick( ); TRACE_PRINTF( "Ending MPI_Wtick" ); return returnVal;}double MPI_Wtime( ){ double returnVal; int llrank;/* MPI_Wtime - prototyping replacement for MPI_Wtime Trace the beginning and ending of MPI_Wtime.*/ TRACE_PRINTF( "Starting MPI_Wtime..." ); returnVal = PMPI_Wtime( ); TRACE_PRINTF( "Ending MPI_Wtime" ); return returnVal;}#endifint MPI_Address( location, address )void * location;MPI_Aint * address;{ int returnVal; int llrank;/* MPI_Address - prototyping replacement for MPI_Address Trace the beginning and ending of MPI_Address.*/ TRACE_PRINTF( "Starting MPI_Address..." ); returnVal = PMPI_Address( location, address ); TRACE_PRINTF( "Ending MPI_Address" ); return returnVal;}int MPI_Bsend( buf, count, datatype, dest, tag, comm )void * buf;int count;MPI_Datatype datatype;int dest;int tag;MPI_Comm comm;{ int returnVal; int llrank; char msg[100];/* MPI_Bsend - prototyping replacement for MPI_Bsend Trace the beginning and ending of MPI_Bsend.*/ sprintf( msg, "Starting MPI_Bsend with count = %d, dest = %d, tag = %d...", count, dest, tag ); TRACE_PRINTF( msg ); returnVal = PMPI_Bsend( buf, count, datatype, dest, tag, comm ); TRACE_PRINTF( "Ending MPI_Bsend" ); return returnVal;}int MPI_Bsend_init( buf, count, datatype, dest, tag, comm, request )void * buf;int count;MPI_Datatype datatype;int dest;int tag;MPI_Comm comm;MPI_Request * request;{ int returnVal; int llrank; char msg[100];/* MPI_Bsend_init - prototyping replacement for MPI_Bsend_init Trace the beginning and ending of MPI_Bsend_init.*/ sprintf( msg, "Starting MPI_Bsend_init with count = %d, dest = %d, tag = %d...", count, dest, tag ); TRACE_PRINTF( msg ); returnVal = PMPI_Bsend_init( buf, count, datatype, dest, tag, comm, request ); TRACE_PRINTF( "Ending MPI_Bsend_init" ); return returnVal;}int MPI_Buffer_attach( buffer, size )void * buffer;int size;{ int returnVal; int llrank;/* MPI_Buffer_attach - prototyping replacement for MPI_Buffer_attach Trace the beginning and ending of MPI_Buffer_attach.*/ TRACE_PRINTF( "Starting MPI_Buffer_attach..." ); returnVal = PMPI_Buffer_attach( buffer, size ); TRACE_PRINTF( "Ending MPI_Buffer_attach" ); return returnVal;}int MPI_Buffer_detach( buffer, size )void * buffer;int * size;{ int returnVal; int llrank;/* MPI_Buffer_detach - prototyping replacement for MPI_Buffer_detach Trace the beginning and ending of MPI_Buffer_detach.*/ TRACE_PRINTF( "Starting MPI_Buffer_detach..." ); returnVal = PMPI_Buffer_detach( buffer, size ); TRACE_PRINTF( "Ending MPI_Buffer_detach" ); return returnVal;}int MPI_Cancel( request )MPI_Request * request;{ int returnVal; int llrank;/* MPI_Cancel - prototyping replacement for MPI_Cancel Trace the beginning and ending of MPI_Cancel.*/ TRACE_PRINTF( "Starting MPI_Cancel..." ); returnVal = PMPI_Cancel( request ); TRACE_PRINTF( "Ending MPI_Cancel" ); return returnVal;}int MPI_Request_free( request )MPI_Request * request;{ int returnVal; int llrank;/* MPI_Request_free - prototyping replacement for MPI_Request_free Trace the beginning and ending of MPI_Request_free.*/ TRACE_PRINTF( "Starting MPI_Request_free..." ); returnVal = PMPI_Request_free( request ); TRACE_PRINTF( "Ending MPI_Request_free" ); return returnVal;}int MPI_Recv_init( buf, count, datatype, source, tag, comm, request )void * buf;int count;MPI_Datatype datatype;int source;int tag;MPI_Comm comm;MPI_Request * request;{ int returnVal; int llrank; char msg[100];/* MPI_Recv_init - prototyping replacement for MPI_Recv_init Trace the beginning and ending of MPI_Recv_init.*/ sprintf( msg, "Starting MPI_Recv_init with count = %d, source = %d, tag = %d ...", count, source, tag ); TRACE_PRINTF( msg ); returnVal = PMPI_Recv_init( buf, count, datatype, source, tag, comm, request ); TRACE_PRINTF( "Ending MPI_Recv_init" ); return returnVal;}int MPI_Send_init( buf, count, datatype, dest, tag, comm, request )void * buf;int count;MPI_Datatype datatype;int dest;int tag;MPI_Comm comm;MPI_Request * request;{ int returnVal; int llrank; char msg[100];/* MPI_Send_init - prototyping replacement for MPI_Send_init Trace the beginning and ending of MPI_Send_init.*/ sprintf( msg, "Starting MPI_Send_init with count = %d, dest = %d, tag = %d ...", count, dest, tag ); TRACE_PRINTF( msg ); returnVal = PMPI_Send_init( buf, count, datatype, dest, tag, comm, request ); TRACE_PRINTF( "Ending MPI_Send_init" ); return returnVal;}int MPI_Get_elements( status, datatype, elements )MPI_Status * status;MPI_Datatype datatype;int * elements;{ int returnVal; int llrank;/* MPI_Get_elements - prototyping replacement for MPI_Get_elements Trace the beginning and ending of MPI_Get_elements.*/ TRACE_PRINTF( "Starting MPI_Get_elements..." ); returnVal = PMPI_Get_elements( status, datatype, elements ); TRACE_PRINTF( "Ending MPI_Get_elements" ); return returnVal;}int MPI_Get_count( status, datatype, count )MPI_Status * status;MPI_Datatype datatype;int * count;{ int returnVal; int llrank;/* MPI_Get_count - prototyping replacement for MPI_Get_count Trace the beginning and ending of MPI_Get_count.*/ TRACE_PRINTF( "Starting MPI_Get_count..." ); returnVal = PMPI_Get_count( status, datatype, count ); TRACE_PRINTF( "Ending MPI_Get_count" ); return returnVal;}int MPI_Ibsend( buf, count, datatype, dest, tag, comm, request )void * buf;int count;MPI_Datatype datatype;int dest;int tag;MPI_Comm comm;MPI_Request * request;{ int returnVal; int llrank; char msg[100];/* MPI_Ibsend - prototyping replacement for MPI_Ibsend Trace the beginning and ending of MPI_Ibsend.*/ sprintf( msg, "Starting MPI_Ibsend with count - %d, dest = %d, tag = %d ...", count, dest, tag ); TRACE_PRINTF( msg ); returnVal = PMPI_Ibsend( buf, count, datatype, dest, tag, comm, request ); TRACE_PRINTF( "Ending MPI_Ibsend" ); return returnVal;}int MPI_Iprobe( source, tag, comm, flag, status )int source;int tag;MPI_Comm comm;int * flag;MPI_Status * status;{ int returnVal; int llrank;/* MPI_Iprobe - prototyping replacement for MPI_Iprobe Trace the beginning and ending of MPI_Iprobe.*/ TRACE_PRINTF( "Starting MPI_Iprobe..." ); returnVal = PMPI_Iprobe( source, tag, comm, flag, status ); TRACE_PRINTF( "Ending MPI_Iprobe" ); return returnVal;}int MPI_Irecv( buf, count, datatype, source, tag, comm, request )void * buf;int count;MPI_Datatype datatype;int source;int tag;MPI_Comm comm;MPI_Request * request;{ int returnVal; int llrank; char msg[100];/* MPI_Irecv - prototyping replacement for MPI_Irecv Trace the beginning and ending of MPI_Irecv.*/ sprintf( msg, "Starting MPI_Irecv with count = %d, source = %d, tag = %d ...", count, source, tag ); TRACE_PRINTF( msg ); returnVal = PMPI_Irecv( buf, count, datatype, source, tag, comm, request ); TRACE_PRINTF( "Ending MPI_Irecv" ); return returnVal;}int MPI_Irsend( buf, count, datatype, dest, tag, comm, request )void * buf;int count;MPI_Datatype datatype;int dest;int tag;MPI_Comm comm;MPI_Request * request;{ int returnVal; int llrank; char msg[100];/* MPI_Irsend - prototyping replacement for MPI_Irsend Trace the beginning and ending of MPI_Irsend.*/ sprintf( msg, "Starting MPI_Irsend with count = %d, dest = %d, tag = %d ...", count, dest, tag ); TRACE_PRINTF( msg ); returnVal = PMPI_Irsend( buf, count, datatype, dest, tag, comm, request ); TRACE_PRINTF( "Ending MPI_Irsend" ); return returnVal;}int MPI_Isend( buf, count, datatype, dest, tag, comm, request )void * buf;int count;MPI_Datatype datatype;int dest;int tag;MPI_Comm comm;MPI_Request * request;{ int returnVal; int llrank; char msg[100];/* MPI_Isend - prototyping replacement for MPI_Isend Trace the beginning and ending of MPI_Isend.*/ sprintf( msg, "Starting MPI_Isend with count = %d, dest = %d, tag = %d ...", count, dest, tag ); TRACE_PRINTF( msg ); returnVal = PMPI_Isend( buf, count, datatype, dest, tag, comm, request ); TRACE_PRINTF( "Ending MPI_Isend" ); return returnVal;}int MPI_Issend( buf, count, datatype, dest, tag, comm, request )void * buf;int count;MPI_Datatype datatype;int dest;int tag;MPI_Comm comm;MPI_Request * request;{ int returnVal; int llrank; char msg[100];/* MPI_Issend - prototyping replacement for MPI_Issend Trace the beginning and ending of MPI_Issend.*/ sprintf( msg, "Starting MPI_Issend with count = %d, dest = %d, tag = %d ...", count, dest, tag ); TRACE_PRINTF( msg ); returnVal = PMPI_Issend( buf, count, datatype, dest, tag, comm, request ); TRACE_PRINTF( "Ending MPI_Issend" ); return returnVal;}int MPI_Pack( inbuf, incount, type, outbuf, outcount, position, comm )void * inbuf;int incount;MPI_Datatype type;void * outbuf;int outcount;int * position;MPI_Comm comm;{ int returnVal; int llrank;/* MPI_Pack - prototyping replacement for MPI_Pack Trace the beginning and ending of MPI_Pack.*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -