d81443cc5a
Often, orte/util/show_help.h is included, although no functionality is required -- instead, most often opal_output.h, or orte/mca/rml/rml_types.h Please see orte_show_help_replacement.sh commited next. - Local compilation (Linux/x86_64) w/ -Wimplicit-function-declaration actually showed two *missing* #include "orte/util/show_help.h" in orte/mca/odls/base/odls_base_default_fns.c and in orte/tools/orte-top/orte-top.c Manually added these. Let's have MTT the last word. This commit was SVN r20557.
37 строки
892 B
C
37 строки
892 B
C
/* -*- C -*-
|
|
*
|
|
* $HEADER$
|
|
*
|
|
* The most basic of MPI applications
|
|
*/
|
|
|
|
#include <stdio.h>
|
|
#include "mpi.h"
|
|
#include "opal/util/output.h"
|
|
|
|
|
|
int main(int argc, char* argv[])
|
|
{
|
|
int rank, size;
|
|
int stream, stream2;
|
|
|
|
MPI_Init(&argc, &argv);
|
|
MPI_Comm_rank(MPI_COMM_WORLD, &rank);
|
|
MPI_Comm_size(MPI_COMM_WORLD, &size);
|
|
|
|
stream = opal_output_open(NULL);
|
|
opal_output(stream, "(stream) Hello, World, I am %d of %d\n", rank, size);
|
|
printf("(printf) Hello, World, I am %d of %d\n", rank, size);
|
|
|
|
opal_output_set_verbosity(stream, 10);
|
|
opal_output(stream, "this is an opal_output on the verbose stream");
|
|
|
|
stream2 = opal_output_open(NULL);
|
|
opal_output(stream2, "opal_output stream2");
|
|
opal_output_set_verbosity(stream2, 10);
|
|
opal_output(stream2, "this is an opal_output on the same verbose stream2");
|
|
|
|
MPI_Finalize();
|
|
return 0;
|
|
}
|