root/orte/test/system/psm_keygen.c

/* [<][>][^][v][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. main

   1 /* -*- C -*-
   2  *
   3  * $HEADER$
   4  *
   5  * Generate a key for PSM transports
   6  */
   7 
   8 #include <stdio.h>
   9 #include "orte/constants.h"
  10 #include "orte/runtime/runtime.h"
  11 
  12 #include "orte/util/pre_condition_transports.h"
  13 
  14 int main(int argc, char* argv[])
  15 {
  16     orte_job_t *jdata;
  17     orte_app_context_t *app;
  18     int i;
  19 
  20     if (ORTE_SUCCESS != orte_init(&argc, &argv, ORTE_PROC_NON_MPI)) {
  21         fprintf(stderr, "Failed orte_init\n");
  22         exit(1);
  23     }
  24 
  25     jdata = OBJ_NEW(orte_job_t);
  26     app = OBJ_NEW(orte_app_context_t);
  27     opal_pointer_array_set_item(jdata->apps, 0, app);
  28     jdata->num_apps = 1;
  29 
  30     if (ORTE_SUCCESS != orte_pre_condition_transports(jdata)) {
  31         fprintf(stderr, "Failed to generate PSM key\n");
  32         exit(1);
  33     }
  34 
  35     for (i=0; NULL != app->env[i]; i++) {
  36         if (0 == strncmp(OPAL_MCA_PREFIX"orte_precondition_transports", app->env[i],
  37                          strlen(OPAL_MCA_PREFIX"orte_precondition_transports"))) {
  38             fprintf(stderr, "%s\n", app->env[i]);
  39             break;
  40         }
  41     }
  42 
  43     OBJ_RELEASE(jdata);
  44 
  45     if (ORTE_SUCCESS != orte_finalize()) {
  46         fprintf(stderr, "Failed orte_finalize\n");
  47         exit(1);
  48     }
  49     return 0;
  50 }

/* [<][>][^][v][top][bottom][index][help] */