smash-MPI

A runtime library for injecting faults and delays into Open MPI.
git clone git@git.mpah.dev/smash-MPI.git
Log | Files | Refs | README | LICENSE

callout.h (691B)


      1 #ifndef CALLOUT_H
      2 #define CALLOUT_H
      3 
      4 #define NCALL 256
      5 
      6 #include <mpi.h>
      7 #include <semaphore.h>
      8 
      9 struct mpi_send_args {
     10 	void *buf;
     11 	MPI_Comm comm;
     12 	MPI_Datatype datatype;
     13 	int count, dest, tag;
     14 };
     15 
     16 struct callo {
     17 	long long c_time;                 /* incremental time */
     18 	int c_arg;                        /* argument to routine */
     19 	int (*c_func)();                  /* routine */
     20 	sem_t c_lock;			  /* lock to preserve locking semantic */
     21 	struct mpi_send_args c_send_args; /* args for MPI_Send */
     22 };
     23 
     24 void smash_print_callout(void);
     25 
     26 sem_t *smash_timeout(int (*func)(), int arg, int time,
     27                      struct mpi_send_args *args);
     28 
     29 void smash_clock(void);
     30 
     31 #endif /* CALLOUT_H */