2008-12-10 02:49:02 +03:00
|
|
|
/* -*- C -*-
|
|
|
|
*
|
|
|
|
* $HEADER$
|
|
|
|
*
|
|
|
|
* The most basic of applications
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
#include "orte/runtime/runtime.h"
|
|
|
|
#include "orte/mca/grpcomm/grpcomm.h"
|
|
|
|
|
|
|
|
int main(int argc, char* argv[])
|
|
|
|
{
|
2012-05-02 23:00:05 +04:00
|
|
|
orte_grpcomm_collective_t *coll;
|
|
|
|
|
2009-12-04 07:31:06 +03:00
|
|
|
if (ORTE_SUCCESS != orte_init(&argc, &argv, ORTE_PROC_NON_MPI)) {
|
2008-12-10 02:49:02 +03:00
|
|
|
fprintf(stderr, "Failed orte_init\n");
|
|
|
|
exit(1);
|
|
|
|
}
|
|
|
|
|
2012-05-02 23:00:05 +04:00
|
|
|
coll = OBJ_NEW(orte_grpcomm_collective_t);
|
|
|
|
coll->id = orte_process_info.peer_modex;
|
|
|
|
orte_grpcomm.barrier(coll);
|
|
|
|
|
|
|
|
coll->id = orte_process_info.peer_fini_barrier;
|
|
|
|
orte_grpcomm.barrier(coll);
|
|
|
|
OBJ_RELEASE(coll);
|
2008-12-10 02:49:02 +03:00
|
|
|
|
|
|
|
if (ORTE_SUCCESS != orte_finalize()) {
|
|
|
|
fprintf(stderr, "Failed orte_finalize\n");
|
|
|
|
exit(1);
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|