20 MPI_Bcast(&e, 1, MPI_DOUBLE, 0, MPI_COMM_WORLD);
81 MPI_Comm_size(MPI_COMM_WORLD, &
NTask);
82 MPI_Comm_rank(MPI_COMM_WORLD, &
ThisTask);
84 char * content = NULL;
89 size = strlen(content);
96 MPI_Bcast(&size, 1, MPI_INT, 0, MPI_COMM_WORLD);
100 content =
ta_malloc(
"hcicontent",
char, size + 1);
102 MPI_Bcast(content, size+1, MPI_BYTE, 0, MPI_COMM_WORLD);
108 return *request != NULL;
166 message(0,
"HCI: Stopping due to TimeLimitCPU, dumping a CheckPoint.\n");
181 message(0,
"HCI: updating io parameters, this is not supported yet.\n");
188 message(0,
"HCI: human controlled stop with checkpoint at next PM.\n");
213 message(0,
"HCI: human triggered termination.\n");
225 message(0,
"HCI: Auto checkpoint due to AutoCheckPointTime.\n");
235 message(0,
"HCI: Nothing happened. \n");
248 update_IO_params(
const char * ioctlfname)
251 FILE * fd = fopen(ioctlfname,
"r");
258 while(-1 != getline(&line, &n, fd)) {
259 sscanf(line,
"BytesPerFile %lu", &
All.IO.BytesPerFile);
260 sscanf(line,
"NumWriters %d", &
All.IO.NumWriters);
266 MPI_Bcast(&
All.IO,
sizeof(
All.IO), MPI_BYTE, 0, MPI_COMM_WORLD);
267 message(0,
"New IO parameter recieved from %s:"
void message(int where, const char *fmt,...)
static void hci_update_query_timer(HCIManager *manager)
static double hci_now(HCIManager *manager)
static double hci_get_elapsed_time(HCIManager *manager)
static int hci_query_timeout(HCIManager *manager, char **request)
int hci_query_filesystem(HCIManager *manager, const char *filename, char **request)
void hci_init(HCIManager *manager, char *prefix, double WallClockTimeLimit, double AutoCheckPointTime, int FOFEnabled)
int hci_query(HCIManager *manager, HCIAction *action)
void hci_override_now(HCIManager *manager, double now)
static int hci_query_auto_checkpoint(HCIManager *manager, char **request)
void hci_action_init(HCIAction *action)
#define ta_malloc(name, type, nele)
static struct run_params All
char * fastpm_file_get_content(const char *filename)
char * fastpm_strdup_printf(const char *fmt,...)
double AutoCheckPointTime
double WallClockTimeLimit
double TimeLastCheckPoint
double LongestTimeBetweenQueries