openmpi  3.1.6
About: Open MPI is a high performance Message Passing Interface (MPI) library project combining technologies and resources from several other projects (FT-MPI, LA-MPI, LAM/MPI, and PACX-MPI) in order to build the best MPI library available. 3.x series.
  Fossies Dox: openmpi-3.1.6.tar.bz2  ("unofficial" and yet experimental doxygen-generated source code documentation)  

show_help.c
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
3  * University Research and Technology
4  * Corporation. All rights reserved.
5  * Copyright (c) 2004-2006 The University of Tennessee and The University
6  * of Tennessee Research Foundation. All rights
7  * reserved.
8  * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
9  * University of Stuttgart. All rights reserved.
10  * Copyright (c) 2004-2005 The Regents of the University of California.
11  * All rights reserved.
12  * Copyright (c) 2008-2011 Cisco Systems, Inc. All rights reserved.
13  * Copyright (c) 2012-2013 Los Alamos National Security, LLC.
14  * All rights reserved.
15  * Copyright (c) 2016-2017 Intel, Inc. All rights reserved.
16  * Copyright (c) 2017 IBM Corporation. All rights reserved.
17  * $COPYRIGHT$
18  *
19  * Additional copyrights may follow
20  *
21  * $HEADER$
22  */
23 #include "orte_config.h"
24 #include "orte/types.h"
25 #include "orte/constants.h"
26 
27 #include <stdio.h>
28 #include <string.h>
29 #include <time.h>
30 
31 #include "opal/util/show_help.h"
32 #include "opal/util/output.h"
33 #include "opal/dss/dss.h"
34 #include "opal/mca/event/event.h"
35 #include "opal/mca/pmix/pmix.h"
36 
37 #include "orte/mca/errmgr/errmgr.h"
38 #include "orte/mca/rml/rml.h"
39 #include "orte/mca/rml/rml_types.h"
40 #include "orte/mca/routed/routed.h"
41 #include "orte/util/name_fns.h"
42 #include "orte/util/proc_info.h"
44 
45 #include "orte/util/show_help.h"
46 
48 static int orte_help_output;
49 
50 /*
51  * Local variable to know whether aggregated show_help is available or
52  * not
53  */
54 static bool ready = false;
55 
56 /*
57  * Same for systems with or without full ORTE support
58  */
60 {
61  /* This is a function only to give us forward flexibility in case
62  we need a more complicated check someday. */
63 
64  return ready;
65 }
66 
67 /* List items for holding (filename, topic) tuples */
68 typedef struct {
70  /* The filename */
71  char *tli_filename;
72  /* The topic */
73  char *tli_topic;
74  /* List of process names that have displayed this (filename, topic) */
76  /* Time this message was displayed */
78  /* Count of processes since last display (i.e., "new" processes
79  that have showed this message that have not yet been output) */
81  /* Do we want to display these? */
84 
90 
91 
92 /* List of (filename, topic) tuples that have already been displayed */
94 
95 /* How long to wait between displaying duplicate show_help notices */
96 static struct timeval show_help_interval = { 5, 0 };
97 
98 /* Timer for displaying duplicate help message notices */
100 static bool show_help_timer_set = false;
102 
104 
106 {
107  obj->tli_filename = NULL;
108  obj->tli_topic = NULL;
110  obj->tli_time_displayed = time(NULL);
112  obj->tli_display = true;
113 }
114 
116 {
117  opal_list_item_t *item, *next;
118 
119  if (NULL != obj->tli_filename) {
120  free(obj->tli_filename);
121  }
122  if (NULL != obj->tli_topic) {
123  free(obj->tli_topic);
124  }
125  for (item = opal_list_get_first(&(obj->tli_processes));
126  opal_list_get_end(&(obj->tli_processes)) != item;
127  item = next) {
128  next = opal_list_get_next(item);
129  opal_list_remove_item(&(obj->tli_processes), item);
130  OBJ_RELEASE(item);
131  }
132 }
133 
134 /* dealing with special characters in xml output */
135 static char* xml_format(unsigned char *input)
136 {
137  int i, j, k, len, outlen;
138  char *output, qprint[10];
139  char *endtag="</stderr>";
140  char *starttag="<stderr>";
141  int endtaglen, starttaglen;
142  bool endtagged = false;
143 
144  len = strlen((char*)input);
145  /* add some arbitrary size padding */
146  output = (char*)malloc((len+1024)*sizeof(char));
147  if (NULL == output) {
149  return (char*)input; /* default to no xml formatting */
150  }
151  memset(output, 0, len+1024);
152  outlen = len+1023;
153  endtaglen = strlen(endtag);
154  starttaglen = strlen(starttag);
155 
156  /* start at the beginning */
157  k=0;
158 
159  /* start with the tag */
160  for (j=0; j < starttaglen && k < outlen; j++) {
161  output[k++] = starttag[j];
162  }
163 
164  for (i=0; i < len; i++) {
165  if ('&' == input[i]) {
166  if (k+5 >= outlen) {
168  goto error;
169  }
170  snprintf(qprint, 10, "&amp;");
171  for (j=0; j < (int)strlen(qprint) && k < outlen; j++) {
172  output[k++] = qprint[j];
173  }
174  } else if ('<' == input[i]) {
175  if (k+4 >= outlen) {
177  goto error;
178  }
179  snprintf(qprint, 10, "&lt;");
180  for (j=0; j < (int)strlen(qprint) && k < outlen; j++) {
181  output[k++] = qprint[j];
182  }
183  } else if ('>' == input[i]) {
184  if (k+4 >= outlen) {
186  goto error;
187  }
188  snprintf(qprint, 10, "&gt;");
189  for (j=0; j < (int)strlen(qprint) && k < outlen; j++) {
190  output[k++] = qprint[j];
191  }
192  } else if (input[i] < 32 || input[i] > 127) {
193  /* this is a non-printable character, so escape it too */
194  if (k+7 >= outlen) {
196  goto error;
197  }
198  snprintf(qprint, 10, "&#%03d;", (int)input[i]);
199  for (j=0; j < (int)strlen(qprint) && k < outlen; j++) {
200  output[k++] = qprint[j];
201  }
202  /* if this was a \n, then we also need to break the line with the end tag */
203  if ('\n' == input[i] && (k+endtaglen+1) < outlen) {
204  /* we need to break the line with the end tag */
205  for (j=0; j < endtaglen && k < outlen-1; j++) {
206  output[k++] = endtag[j];
207  }
208  /* move the <cr> over */
209  output[k++] = '\n';
210  /* if this isn't the end of the input buffer, add a new start tag */
211  if (i < len-1 && (k+starttaglen) < outlen) {
212  for (j=0; j < starttaglen && k < outlen; j++) {
213  output[k++] = starttag[j];
214  endtagged = false;
215  }
216  } else {
217  endtagged = true;
218  }
219  }
220  } else {
221  output[k++] = input[i];
222  }
223  }
224 
225  if (!endtagged) {
226  /* need to add an endtag */
227  for (j=0; j < endtaglen && k < outlen-1; j++) {
228  output[k++] = endtag[j];
229  }
230  output[k++] = '\n';
231  }
232 
233  return output;
234 
235 error:
236  /* if we couldn't complete the processing for
237  * some reason, return the unprocessed input
238  * so at least the message gets out!
239  */
240  free(output);
241  return (char*)input;
242 }
243 
244 
245 /*
246  * Returns ORTE_SUCCESS if the strings match; ORTE_ERROR otherwise.
247  */
248 static int match(const char *a, const char *b)
249 {
250  int rc = ORTE_ERROR;
251  char *p1, *p2, *tmp1 = NULL, *tmp2 = NULL;
252  size_t min;
253 
254  /* Check straight string match first */
255  if (0 == strcmp(a, b)) return ORTE_SUCCESS;
256 
257  if (NULL != strchr(a, '*') || NULL != strchr(b, '*')) {
258  tmp1 = strdup(a);
259  if (NULL == tmp1) {
261  }
262  tmp2 = strdup(b);
263  if (NULL == tmp2) {
264  free(tmp1);
266  }
267  p1 = strchr(tmp1, '*');
268  p2 = strchr(tmp2, '*');
269 
270  if (NULL != p1) {
271  *p1 = '\0';
272  }
273  if (NULL != p2) {
274  *p2 = '\0';
275  }
276  min = strlen(tmp1);
277  if (strlen(tmp2) < min) {
278  min = strlen(tmp2);
279  }
280  if (0 == min || 0 == strncmp(tmp1, tmp2, min)) {
281  rc = ORTE_SUCCESS;
282  }
283  free(tmp1);
284  free(tmp2);
285  return rc;
286  }
287 
288  /* No match */
289  return ORTE_ERROR;
290 }
291 
292 /*
293  * Check to see if a given (filename, topic) tuple has been displayed
294  * already. Return ORTE_SUCCESS if so, or ORTE_ERR_NOT_FOUND if not.
295  *
296  * Always return a tuple_list_item_t representing this (filename,
297  * topic) entry in the list of "already been displayed tuples" (if it
298  * wasn't in the list already, this function will create a new entry
299  * in the list and return it).
300  *
301  * Note that a list is not an overly-efficient mechanism for this kind
302  * of data. The assupmtion is that there will only be a small numebr
303  * of (filename, topic) tuples displayed so the storage required will
304  * be fairly small, and linear searches will be fast enough.
305  */
306 static int get_tli(const char *filename, const char *topic,
307  tuple_list_item_t **tli)
308 {
309  opal_list_item_t *item;
310 
311  /* Search the list for a duplicate. */
312  for (item = opal_list_get_first(&abd_tuples);
313  opal_list_get_end(&abd_tuples) != item;
314  item = opal_list_get_next(item)) {
315  (*tli) = (tuple_list_item_t*) item;
316  if (ORTE_SUCCESS == match((*tli)->tli_filename, filename) &&
317  ORTE_SUCCESS == match((*tli)->tli_topic, topic)) {
318  return ORTE_SUCCESS;
319  }
320  }
321 
322  /* Nope, we didn't find it -- make a new one */
323  *tli = OBJ_NEW(tuple_list_item_t);
324  if (NULL == *tli) {
326  }
327  (*tli)->tli_filename = strdup(filename);
328  (*tli)->tli_topic = strdup(topic);
329  opal_list_append(&abd_tuples, &((*tli)->super));
330  return ORTE_ERR_NOT_FOUND;
331 }
332 
333 
334 static void show_accumulated_duplicates(int fd, short event, void *context)
335 {
336  opal_list_item_t *item;
337  time_t now = time(NULL);
338  tuple_list_item_t *tli;
339  char *tmp, *output;
340 
341  /* Loop through all the messages we've displayed and see if any
342  processes have sent duplicates that have not yet been displayed
343  yet */
344  for (item = opal_list_get_first(&abd_tuples);
345  opal_list_get_end(&abd_tuples) != item;
346  item = opal_list_get_next(item)) {
347  tli = (tuple_list_item_t*) item;
348  if (tli->tli_display &&
349  tli->tli_count_since_last_display > 0) {
350  static bool first = true;
351  if (orte_xml_output) {
352  asprintf(&tmp, "%d more process%s sent help message %s / %s",
354  (tli->tli_count_since_last_display > 1) ? "es have" : " has",
355  tli->tli_filename, tli->tli_topic);
356  output = xml_format((unsigned char*)tmp);
357  free(tmp);
358  fprintf(orte_xml_fp, "%s", output);
359  free(output);
360  } else {
361  opal_output(0, "%d more process%s sent help message %s / %s",
363  (tli->tli_count_since_last_display > 1) ? "es have" : " has",
364  tli->tli_filename, tli->tli_topic);
365  }
367 
368  if (first) {
369  if (orte_xml_output) {
370  fprintf(orte_xml_fp, "<stderr>Set MCA parameter \"orte_base_help_aggregate\" to 0 to see all help / error messages</stderr>\n");
371  fflush(orte_xml_fp);
372  } else {
373  opal_output(0, "Set MCA parameter \"orte_base_help_aggregate\" to 0 to see all help / error messages");
374  }
375  first = false;
376  }
377  }
378  }
379 
381  show_help_timer_set = false;
382 }
383 
384 static int show_help(const char *filename, const char *topic,
385  const char *output, orte_process_name_t *sender)
386 {
387  int rc;
388  tuple_list_item_t *tli = NULL;
389  orte_namelist_t *pnli;
390  time_t now = time(NULL);
391 
392  /* If we're aggregating, check for duplicates. Otherwise, don't
393  track duplicates at all and always display the message. */
395  rc = get_tli(filename, topic, &tli);
396  } else {
397  rc = ORTE_ERR_NOT_FOUND;
398  }
399 
400  /* If there's no output string (i.e., this is a control message
401  asking us to suppress), then skip to the end. */
402  if (NULL == output) {
403  tli->tli_display = false;
404  goto after_output;
405  }
406 
407  /* Was it already displayed? */
408  if (ORTE_SUCCESS == rc) {
409  /* Yes. But do we want to print anything? That's complicated.
410 
411  We always show the first message of a given (filename,
412  topic) tuple as soon as it arrives. But we don't want to
413  show duplicate notices often, because we could get overrun
414  with them. So we want to gather them up and say "We got N
415  duplicates" every once in a while.
416 
417  And keep in mind that at termination, we'll unconditionally
418  show all accumulated duplicate notices.
419 
420  A simple scheme is as follows:
421  - when the first of a (filename, topic) tuple arrives
422  - print the message
423  - if a timer is not set, set T=now
424  - when a duplicate (filename, topic) tuple arrives
425  - if now>(T+5) and timer is not set (due to
426  non-pre-emptiveness of our libevent, a timer *could* be
427  set!)
428  - print all accumulated duplicates
429  - reset T=now
430  - else if a timer was not set, set the timer for T+5
431  - else if a timer was set, do nothing (just wait)
432  - set T=now when the timer expires
433  */
437  } else if (!show_help_timer_set) {
441  show_help_timer_set = true;
442  }
443  }
444  /* Not already displayed */
445  else if (ORTE_ERR_NOT_FOUND == rc) {
446  if (orte_xml_output) {
447  char *tmp;
448  tmp = xml_format((unsigned char*)output);
449  fprintf(orte_xml_fp, "%s", tmp);
450  fflush(orte_xml_fp);
451  free(tmp);
452  } else {
454  }
455  if (!show_help_timer_set) {
457  }
458  }
459  /* Some other error occurred */
460  else {
461  ORTE_ERROR_LOG(rc);
462  return rc;
463  }
464 
465  after_output:
466  /* If we're aggregating, add this process name to the list */
468  pnli = OBJ_NEW(orte_namelist_t);
469  if (NULL == pnli) {
471  ORTE_ERROR_LOG(rc);
472  return rc;
473  }
474  pnli->name = *sender;
475  opal_list_append(&(tli->tli_processes), &(pnli->super));
476  }
477  return ORTE_SUCCESS;
478 }
479 
480 
481 /* Note that this function is called from ess/hnp, so don't make it
482  static */
483 void orte_show_help_recv(int status, orte_process_name_t* sender,
484  opal_buffer_t *buffer, orte_rml_tag_t tag,
485  void* cbdata)
486 {
487  char *output=NULL;
488  char *filename=NULL, *topic=NULL;
489  int32_t n;
490  int8_t have_output;
491  int rc;
492 
494  "%s got show_help from %s",
496  ORTE_NAME_PRINT(sender)));
497 
498  /* unpack the filename of the show_help text file */
499  n = 1;
500  if (ORTE_SUCCESS != (rc = opal_dss.unpack(buffer, &filename, &n, OPAL_STRING))) {
501  ORTE_ERROR_LOG(rc);
502  goto cleanup;
503  }
504  /* unpack the topic tag */
505  n = 1;
506  if (ORTE_SUCCESS != (rc = opal_dss.unpack(buffer, &topic, &n, OPAL_STRING))) {
507  ORTE_ERROR_LOG(rc);
508  goto cleanup;
509  }
510  /* unpack the flag */
511  n = 1;
512  if (ORTE_SUCCESS != (rc = opal_dss.unpack(buffer, &have_output, &n, OPAL_INT8))) {
513  ORTE_ERROR_LOG(rc);
514  goto cleanup;
515  }
516 
517  /* If we have an output string, unpack it */
518  if (have_output) {
519  n = 1;
520  if (ORTE_SUCCESS != (rc = opal_dss.unpack(buffer, &output, &n, OPAL_STRING))) {
521  ORTE_ERROR_LOG(rc);
522  goto cleanup;
523  }
524  }
525 
526  /* Send it to show_help */
527  rc = show_help(filename, topic, output, sender);
528 
529 cleanup:
530  if (NULL != output) {
531  free(output);
532  }
533  if (NULL != filename) {
534  free(filename);
535  }
536  if (NULL != topic) {
537  free(topic);
538  }
539  }
540 
542 {
544 
545  OPAL_OUTPUT_VERBOSE((5, orte_debug_output, "orte_show_help init"));
546 
547  /* Show help duplicate detection */
548  if (ready) {
549  return ORTE_SUCCESS;
550  }
551 
553 
554  /* create an output stream for us */
556  lds.lds_want_stderr = true;
558  OBJ_DESTRUCT(&lds);
559 
562  ready = true;
563 
564  return ORTE_SUCCESS;
565 }
566 
568 {
569  if (!ready) {
570  return;
571  }
572  ready = false;
573 
575 
577  save_help = NULL;
578 
579  /* Shutdown show_help, showing final messages */
580  if (ORTE_PROC_IS_HNP) {
583  if (show_help_timer_set) {
585  }
586 
587  /* cancel the recv */
589  return;
590  }
591 }
592 
593 int orte_show_help(const char *filename, const char *topic,
594  bool want_error_header, ...)
595 {
596  int rc = ORTE_SUCCESS;
597  va_list arglist;
598  char *output;
599 
600  if (orte_execute_quiet) {
601  return ORTE_SUCCESS;
602  }
603 
604  va_start(arglist, want_error_header);
605  output = opal_show_help_vstring(filename, topic, want_error_header,
606  arglist);
607  va_end(arglist);
608 
609  /* If nothing came back, there's nothing to do */
610  if (NULL == output) {
611  return ORTE_SUCCESS;
612  }
613 
614  rc = orte_show_help_norender(filename, topic, want_error_header, output);
615  free(output);
616  return rc;
617 }
618 
619 static void cbfunc(int status, void *cbdata)
620 {
621  volatile bool *active = (volatile bool*)cbdata;
622  *active = false;
623 }
624 
625 int orte_show_help_norender(const char *filename, const char *topic,
626  bool want_error_header, const char *output)
627 {
628  int rc = ORTE_SUCCESS;
629  int8_t have_output = 1;
630  opal_buffer_t *buf;
631  bool am_inside = false;
633  opal_value_t *kv;
634  volatile bool active;
635  struct timespec tp;
636 
637  if (!ready) {
638  /* if we are finalizing, then we have no way to process
639  * this through the orte_show_help system - just drop it to
640  * stderr; that's at least better than not showing it.
641  *
642  * If we are not finalizing, then this is probably a show_help
643  * stemming from either a cmd-line request to display the usage
644  * message, or a show_help related to a user error. In either case,
645  * we can't do anything but just print to stderr.
646  */
647  fprintf(stderr, "%s", output);
648  goto CLEANUP;
649  }
650 
651  /* if we are the HNP, or the RML has not yet been setup,
652  * or ROUTED has not been setup,
653  * or we weren't given an HNP, or we are running in standalone
654  * mode, then all we can do is process this locally
655  */
659  goto CLEANUP;
660  } else if (ORTE_PROC_IS_DAEMON) {
661  if (NULL == orte_rml.send_buffer_nb ||
665  goto CLEANUP;
666  }
667  }
668 
669  /* otherwise, we relay the output message to
670  * the HNP for processing
671  */
672 
673  /* JMS Note that we *may* have a recursion situation here where
674  the RML could call show_help. Need to think about this
675  properly, but put a safeguard in here for sure for the time
676  being. */
677  if (am_inside) {
679  } else {
680  am_inside = true;
681 
682  /* build the message to the HNP */
683  buf = OBJ_NEW(opal_buffer_t);
684  /* pack the filename of the show_help text file */
685  opal_dss.pack(buf, &filename, 1, OPAL_STRING);
686  /* pack the topic tag */
687  opal_dss.pack(buf, &topic, 1, OPAL_STRING);
688  /* pack the flag that we have a string */
689  opal_dss.pack(buf, &have_output, 1, OPAL_INT8);
690  /* pack the resulting string */
691  opal_dss.pack(buf, &output, 1, OPAL_STRING);
692 
693  /* if we are a daemon, then send it via RML to the HNP */
694  if (ORTE_PROC_IS_DAEMON) {
695  /* send it to the HNP */
697  ORTE_PROC_MY_HNP, buf,
700  OBJ_RELEASE(buf);
701  /* okay, that didn't work, output locally */
703  } else {
704  rc = ORTE_SUCCESS;
705  }
706  } else {
707  /* if we are not a daemon (i.e., we are an app) and if PMIx
708  * support for "log" is available, then use that channel */
709  if (NULL != opal_pmix.log) {
711  kv = OBJ_NEW(opal_value_t),
712  kv->key = strdup(OPAL_PMIX_LOG_MSG);
713  kv->type = OPAL_BYTE_OBJECT;
714  opal_dss.unload(buf, (void**)&kv->data.bo.bytes, &kv->data.bo.size);
715  opal_list_append(&info, &kv->super);
716  active = true;
717  tp.tv_sec = 0;
718  tp.tv_nsec = 1000000;
719  opal_pmix.log(&info, cbfunc, (void*)&active);
720  while (active) {
721  nanosleep(&tp, NULL);
722  }
723  OBJ_RELEASE(buf);
724  kv->data.bo.bytes = NULL;
726  rc = ORTE_SUCCESS;
727  goto CLEANUP;
728  } else {
730  }
731  }
732  am_inside = false;
733  }
734 
735 CLEANUP:
736  return rc;
737 }
738 
739 int orte_show_help_suppress(const char *filename, const char *topic)
740 {
741  int rc = ORTE_SUCCESS;
742  int8_t have_output = 0;
743 
744  if (orte_execute_quiet) {
745  return ORTE_SUCCESS;
746  }
747 
748  if (!ready) {
749  /* If we are finalizing, then we have no way to process this
750  through the orte_show_help system - just drop it. */
751  return ORTE_SUCCESS;
752  }
753 
754  /* If we are the HNP, or the RML has not yet been setup, or ROUTED
755  has not been setup, or we weren't given an HNP, then all we can
756  do is process this locally. */
757  if (ORTE_PROC_IS_HNP ||
761  rc = show_help(filename, topic, NULL, ORTE_PROC_MY_NAME);
762  }
763 
764  /* otherwise, we relay the output message to
765  * the HNP for processing
766  */
767  else {
768  opal_buffer_t *buf;
769  static bool am_inside = false;
770 
771  /* JMS Note that we *may* have a recursion situation here where
772  the RML could call show_help. Need to think about this
773  properly, but put a safeguard in here for sure for the time
774  being. */
775  if (am_inside) {
776  rc = show_help(filename, topic, NULL, ORTE_PROC_MY_NAME);
777  } else {
778  am_inside = true;
779 
780  /* build the message to the HNP */
781  buf = OBJ_NEW(opal_buffer_t);
782  /* pack the filename of the show_help text file */
783  opal_dss.pack(buf, &filename, 1, OPAL_STRING);
784  /* pack the topic tag */
785  opal_dss.pack(buf, &topic, 1, OPAL_STRING);
786  /* pack the flag that we DO NOT have a string */
787  opal_dss.pack(buf, &have_output, 1, OPAL_INT8);
788  /* send it to the HNP */
790  ORTE_PROC_MY_HNP, buf,
793  ORTE_ERROR_LOG(rc);
794  OBJ_RELEASE(buf);
795  /* okay, that didn't work, just process locally error, just ignore return */
797  }
798  am_inside = false;
799  }
800  }
801 
802  return ORTE_SUCCESS;
803 }
opal_show_help_vstring
char * opal_show_help_vstring(const char *filename, const char *topic, bool want_error_header, va_list arglist)
This function does the same thing as opal_show_help_string(), but accepts a va_list form of varargs.
Definition: show_help.c:295
opal_value_t::bo
opal_byte_object_t bo
Definition: dss_types.h:157
tuple_list_item_t
Definition: show_help.c:68
orte_mgmt_conduit
int orte_mgmt_conduit
Definition: orte_globals.c:77
opal_event_evtimer_set
#define opal_event_evtimer_set(b, x, cb, arg)
Definition: external.h:101
show_help.h
ORTE_ERR_OUT_OF_RESOURCE
@ ORTE_ERR_OUT_OF_RESOURCE
Definition: constants.h:40
name_fns.h
opal_buffer_t
Structure for holding a buffer to be used with the RML or OOB subsystems.
Definition: dss_types.h:267
orte_show_help_init
int orte_show_help_init(void)
Initializes the output stream system and opens a default "verbose" stream.
Definition: show_help.c:541
OBJ_CONSTRUCT
#define OBJ_CONSTRUCT(object, type)
Construct (initialize) objects that are not dynamically allocated.
Definition: opal_object.h:356
ORTE_NAME_PRINT
#define ORTE_NAME_PRINT(n)
Definition: name_fns.h:54
opal_list_get_next
#define opal_list_get_next(item)
Get the next item in a list.
Definition: opal_list.h:132
info
static output_desc_t info[64]
Definition: output.c:114
tuple_list_item_t::tli_time_displayed
time_t tli_time_displayed
Definition: show_help.c:77
opal_dss_t::pack
opal_dss_pack_fn_t pack
Definition: dss.h:492
tuple_list_item_constructor
static void tuple_list_item_constructor(tuple_list_item_t *obj)
Definition: show_help.c:105
opal_value_t
Definition: dss_types.h:137
show_help.h
proc_info.h
abd_tuples
static opal_list_t abd_tuples
Definition: show_help.c:93
opal_output_stream_t::lds_want_stderr
bool lds_want_stderr
Whether to send stream output to stderr or not.
Definition: output.h:208
orte_globals.h
ORTE_ERROR_LOG
#define ORTE_ERROR_LOG(n)
Definition: errmgr.h:75
opal_show_help
opal_show_help_fn_t opal_show_help
Definition: show_help.c:55
orte_show_help_suppress
int orte_show_help_suppress(const char *filename, const char *topic)
Pretend that this message has already been shown.
Definition: show_help.c:739
ORTE_NAME_WILDCARD
#define ORTE_NAME_WILDCARD
Definition: orte_globals.h:90
orte_show_help_is_available
bool orte_show_help_is_available(void)
Allow other parts of the code base to know if the ORTE show_help system is available or not (does not...
Definition: show_help.c:59
opal_list_get_first
static opal_list_item_t * opal_list_get_first(opal_list_t *list)
Return the first item on the list (does not remove it).
Definition: opal_list.h:324
ORTE_RML_TAG_SHOW_HELP
#define ORTE_RML_TAG_SHOW_HELP
Definition: rml_types.h:111
show_help
static int show_help(const char *filename, const char *topic, const char *output, orte_process_name_t *sender)
Definition: show_help.c:384
opal_byte_object_t::size
int32_t size
Definition: dss_types.h:61
OPAL_OUTPUT_VERBOSE
#define OPAL_OUTPUT_VERBOSE(a)
Macro for use in sending debugging output to the output streams.
Definition: output.h:541
tuple_list_item_t::tli_processes
opal_list_t tli_processes
Definition: show_help.c:75
OBJ_DESTRUCT
#define OBJ_DESTRUCT(object)
Destruct (finalize) an object that is not dynamically allocated.
Definition: opal_object.h:388
first
static bool first
Definition: ess_hnp_module.c:955
cbfunc
static void cbfunc(int status, void *cbdata)
Definition: show_help.c:619
cleanup
static void cleanup(int sd, short args, void *cbdata)
Definition: rml_base_frame.c:85
constants.h
errmgr.h
routed.h
tuple_list_item_t::tli_count_since_last_display
int tli_count_since_last_display
Definition: show_help.c:80
event
Definition: event_struct.h:87
opal_value_t::key
char * key
Definition: dss_types.h:139
opal_value_t::data
union opal_value_t::@0 data
opal_value_t::type
opal_data_type_t type
Definition: dss_types.h:140
orte_event_base
opal_event_base_t * orte_event_base
Definition: orte_init.c:115
orte_show_help_finalize
void orte_show_help_finalize(void)
Shut down the output stream system.
Definition: show_help.c:567
orte_namelist_t::name
orte_process_name_t name
Name of a process.
Definition: name_fns.h:114
save_help
static opal_show_help_fn_t save_help
Definition: show_help.c:103
opal_pmix
opal_pmix_base_module_t opal_pmix
Definition: pmix_base_frame.c:35
orte_routed
orte_routed_API_t orte_routed
Definition: routed_base_frame.c:43
show_help_timer_set
static bool show_help_timer_set
Definition: show_help.c:100
ready
static bool ready
Definition: show_help.c:54
orte_xml_fp
FILE * orte_xml_fp
Definition: orte_globals.c:205
opal_output_close
void opal_output_close(int output_id)
Close an output stream.
Definition: output.c:327
tuple_list_item_t::tli_display
bool tli_display
Definition: show_help.c:82
orte_config.h
output.h
opal_list_get_end
static opal_list_item_t * opal_list_get_end(opal_list_t *list)
Return the end of the list; an invalid list entry suitable for comparison only.
Definition: opal_list.h:403
rml.h
ORTE_PROC_IS_HNP
#define ORTE_PROC_IS_HNP
Definition: proc_info.h:65
opal_output_open
int opal_output_open(opal_output_stream_t *lds)
Opens an output stream.
Definition: output.c:222
orte_process_info
orte_proc_info_t orte_process_info
Global process info descriptor.
Definition: proc_info.c:55
tuple_list_item_t::super
opal_list_item_t super
Definition: show_help.c:69
tuple_list_item_destructor
static void tuple_list_item_destructor(tuple_list_item_t *obj)
Definition: show_help.c:115
opal_dss
OPAL_DECLSPEC opal_dss_t opal_dss
Definition: dss_open_close.c:53
xml_format
static char * xml_format(unsigned char *input)
Definition: show_help.c:135
orte_rml_base_API_t::send_buffer_nb
orte_rml_API_send_buffer_nb_fn_t send_buffer_nb
Send non-blocking buffer message.
Definition: rml.h:448
tuple_list_item_t::tli_filename
char * tli_filename
Definition: show_help.c:71
orte_proc_info_t::my_hnp_uri
char * my_hnp_uri
Contact info for my hnp.
Definition: proc_info.h:90
ORTE_PROC_IS_TOOL
#define ORTE_PROC_IS_TOOL
Definition: proc_info.h:66
opal_process_name_t
Definition: dss_types.h:46
snprintf
#define snprintf
Definition: pmix_config_bottom.h:428
asprintf
#define asprintf
Definition: pmix_config_bottom.h:424
OBJ_NEW
#define OBJ_NEW(type)
Definition: opal_object.h:272
opal_event_evtimer_del
#define opal_event_evtimer_del(x)
Definition: external.h:103
OPAL_INT8
#define OPAL_INT8
an 8-bit integer
Definition: dss_types.h:74
opal_dss_t::unpack
opal_dss_unpack_fn_t unpack
Definition: dss.h:493
opal_list_append
#define opal_list_append(l, i)
Append an item to the end of the list.
Definition: opal_list.h:539
opal_byte_object_t::bytes
uint8_t * bytes
Definition: dss_types.h:62
orte_routed_API_t::get_route
orte_routed_API_get_route_fn_t get_route
Definition: routed.h:251
opal_list_item_t
Definition: opal_list.h:103
min
#define min(a, b)
Definition: coll_portals4.h:359
event.h
orte_xml_output
bool orte_xml_output
Definition: orte_globals.c:204
orte_namelist_t
Definition: name_fns.h:112
output
static FILE * output
Definition: tm_verbose.c:4
opal_value_t::super
opal_list_item_t super
Definition: dss_types.h:138
OPAL_LIST_DESTRUCT
#define OPAL_LIST_DESTRUCT(list)
Cleanly destruct a list.
Definition: opal_list.h:173
orte_show_help_norender
int orte_show_help_norender(const char *filename, const char *topic, bool want_error_header, const char *output)
Exactly the same as orte_show_help, but pass in a rendered string, rather than a varargs list which m...
Definition: show_help.c:625
opal_output
void opal_output(int output_id, const char *format,...)
Definition: output.c:367
orte_help_want_aggregate
bool orte_help_want_aggregate
Definition: show_help.c:47
orte_execute_quiet
bool orte_execute_quiet
Definition: orte_globals.c:207
orte_rml_tag_t
uint32_t orte_rml_tag_t
Message matching tag.
Definition: rml_types.h:197
OPAL_STRING
#define OPAL_STRING
a NULL terminated string
Definition: dss_types.h:69
orte_show_help_recv
void orte_show_help_recv(int status, orte_process_name_t *sender, opal_buffer_t *buffer, orte_rml_tag_t tag, void *cbdata)
Definition: show_help.c:483
orte_standalone_operation
bool orte_standalone_operation
Definition: orte_globals.c:85
input
static char input[1024]
Definition: pstat_linux_module.c:77
ORTE_ERR_NOT_FOUND
@ ORTE_ERR_NOT_FOUND
Definition: constants.h:51
get_tli
static int get_tli(const char *filename, const char *topic, tuple_list_item_t **tli)
Definition: show_help.c:306
orte_rml_send_callback
void orte_rml_send_callback(int status, orte_process_name_t *peer, opal_buffer_t *buffer, orte_rml_tag_t tag, void *cbdata)
Definition: rml_base_frame.c:221
opal_show_help_fn_t
int(* opal_show_help_fn_t)(const char *filename, const char *topic, bool want_error_header,...)
Look up a text message in a text file and display it to the stderr using printf()-like substitutions ...
Definition: show_help.h:131
show_help_interval
static struct timeval show_help_interval
Definition: show_help.c:96
tuple_list_item_t::tli_topic
char * tli_topic
Definition: show_help.c:73
ORTE_SUCCESS
@ ORTE_SUCCESS
Definition: constants.h:37
orte_namelist_t::super
opal_list_item_t super
Allows this item to be placed on a list.
Definition: name_fns.h:113
OPAL_PMIX_LOG_MSG
#define OPAL_PMIX_LOG_MSG
Definition: pmix_types.h:305
pmix.h
ORTE_PROC_IS_DAEMON
#define ORTE_PROC_IS_DAEMON
Definition: proc_info.h:64
rml_types.h
show_help_time_last_displayed
static time_t show_help_time_last_displayed
Definition: show_help.c:99
ORTE_PROC_MY_NAME
#define ORTE_PROC_MY_NAME
instantiated in orte/runtime/orte_init.c
Definition: orte_globals.h:95
opal_event_evtimer_add
#define opal_event_evtimer_add(x, tv)
Definition: external.h:99
opal_list_t
Definition: opal_list.h:152
ORTE_ERROR
@ ORTE_ERROR
Definition: constants.h:39
opal_output_stream_t
Definition: output.h:110
p1
static unsigned long * p1
Definition: tm_mt.c:61
free
free(sm_data)
dss.h
opal_pmix_base_module_t::log
opal_pmix_base_log_fn_t log
Definition: pmix.h:903
OBJ_CLASS_INSTANCE
static OBJ_CLASS_INSTANCE(tuple_list_item_t, opal_list_item_t, tuple_list_item_constructor, tuple_list_item_destructor)
opal_dss_t::unload
opal_dss_unload_fn_t unload
Definition: dss.h:499
opal_list_remove_item
static opal_list_item_t * opal_list_remove_item(opal_list_t *list, opal_list_item_t *item)
Remove an item from a list.
Definition: opal_list.h:477
orte_show_help
int orte_show_help(const char *filename, const char *topic, bool want_error_header,...)
Show help.
Definition: show_help.c:593
orte_debug_output
int orte_debug_output
Definition: orte_globals.c:202
orte_help_output
static int orte_help_output
Definition: show_help.c:48
show_help_timer_event
static opal_event_t show_help_timer_event
Definition: show_help.c:101
n
default Unknown flag passed to ADIOI_HFS_Fcntl n
Definition: ad_hfs_fcntl.c:110
types.h
match
static int match(const char *a, const char *b)
Definition: show_help.c:248
ORTE_PROC_MY_HNP
#define ORTE_PROC_MY_HNP
Definition: orte_globals.h:101
show_accumulated_duplicates
static void show_accumulated_duplicates(int fd, short event, void *context)
Definition: show_help.c:334
OPAL_BYTE_OBJECT
#define OPAL_BYTE_OBJECT
byte object structure
Definition: dss_types.h:91
filename
static char * filename
Definition: sync.c:26
orte_rml_base_API_t::recv_cancel
orte_rml_API_recv_cancel_fn_t recv_cancel
Cancel posted non-blocking receive.
Definition: rml.h:457
OBJ_RELEASE
#define OBJ_RELEASE(object)
Release an object (by decrementing its reference count).
Definition: opal_object.h:338
NULL
#define NULL
Copyright (C) 2000-2004 by Etnus, LLC.
Definition: ompi_msgq_dll.c:136
orte_rml
orte_rml_base_API_t orte_rml
Interface for RML communication.
Definition: rml_base_frame.c:43
active
static volatile bool active
Definition: prun.c:100