#include <string.h>#include <stdio.h>#include "mpi.h"#include <stdlib.h>#include <sys/time.h>#include "test.h"Functions | |
| int | timing_reduce (int myid, int numprocs, struct mpe_events_s *mpe_events) |
| void | print_timing (int myid, struct mpe_events_s *mpe_events) |
| int | custom_MPE_Log_event (int event, int data, char *string, struct mpe_events_s *mpe_events) |
| int | init_mpe_events (struct mpe_events_s *mpe_events) |
| int custom_MPE_Log_event | ( | int | event, | |
| int | data, | |||
| char * | string, | |||
| struct mpe_events_s * | mpe_events | |||
| ) |
A set of events are defined by another function. Using the event numbers, the correct timing procedure is done here. Start or stop timers and add to profiling information.
| event | Event number to process. | |
| data | If MPE is used, this int is logged. | |
| string | If MPE is used, this string is logged. | |
| mpe_events_p | Pointer to timing structure. |
| int init_mpe_events | ( | struct mpe_events_s * | mpe_events | ) |
If MPE is used, this function defines the event numbers with the MPE_Log_get_event_number() function. Otherwise, the event numbers are predefined.
| mpe_events_p | Pointer to timing structure. |
| void print_timing | ( | int | myid, | |
| struct mpe_events_s * | mpe_events | |||
| ) |
Print the timing information for the mpe_events structure. This is generally used for debugging.
| myid | MPI myid. | |
| mpe_events_p | Pointer to timing structure. |
| int timing_reduce | ( | int | myid, | |
| int | numprocs, | |||
| struct mpe_events_s * | mpe_events | |||
| ) |
All MPE information and timing information is stored in the mpe_events structure. The timings are reduced to the master and are printed by the master.
| myid | MPI myid. | |
| numprocs | Number of processes used. | |
| mpe_events_p | Pointer to timing structure. |
1.4.7