00001 #ifndef FUPERMOD_CONF_H_
00002 #define FUPERMOD_CONF_H_
00003
00004 #include <mpi.h>
00005 #include <stdio.h>
00006
00007 #ifdef __cplusplus
00008 extern "C" {
00009 #endif
00010
00056 #define FUPERMOD_DEVICE_MAX_STRING 12
00057
00059 #define FUPERMOD_BIND_MAX_STRING 256
00060
00062 #define FUPERMOD_SUBOPTION_MAX_STRING 256
00063
00065 #define FUPERMOD_DEVICE_DEFAULT cpu
00066
00068 typedef struct fupermod_process_conf {
00070 char* hostname;
00072 int rank_intra;
00074 char* bind;
00076 char* device_type;
00078 char* subopts;
00079
00081 int argc;
00083 char** argv;
00084 } fupermod_process_conf;
00085
00086
00088 void fupermod_conf_free(fupermod_process_conf conf);
00089
00094 fupermod_process_conf fupermod_get_conf(MPI_Comm comm, char* filename);
00095
00101 fupermod_process_conf* fupermod_get_conf_all(char* filename, int* size);
00102
00108 fupermod_process_conf* fupermod_get_conf_all_sorted(MPI_Comm comm, char* filename, int* size);
00109
00118 void fupermod_print_conf(MPI_Comm comm, int root, FILE* file, char* default_device_type, char* subopts);
00119
00127 int fupermod_comm_intra(MPI_Comm comm, MPI_Comm* comm_intra);
00128
00136 int fupermod_comm_inter(MPI_Comm comm, MPI_Comm* comm_inter);
00137
00143 char** fupermod_gather_hostnames(int root, MPI_Comm comm);
00144
00149 char** fupermod_allgather_hostnames(MPI_Comm comm);
00150
00154 #ifdef __cplusplus
00155 }
00156 #endif
00157
00158 #endif
00159