Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |  

This web mail archive is frozen.

This page is part of a frozen web archive of this mailing list.

You can still navigate around this archive, but know that no new mails have been added to it since July of 2016.

Click here to be taken to the new web archives of this list; it includes all the mails that are in this frozen archive plus all new mails that have been sent to the list since it was migrated to the new archives.

From: Nathan DeBardeleben (ndebard_at_[hidden])
Date: 2006-07-05 11:28:42

I used to use this code to get the number of nodes in a cluster /
machine / whatever:
> int
> get_num_nodes(void)
> {
> int rc;
> size_t cnt;
> orte_gpr_value_t **values;
> rc = orte_gpr.get(ORTE_GPR_KEYS_OR|ORTE_GPR_TOKENS_OR,
> ORTE_NODE_SEGMENT, NULL, NULL, &cnt, &values);
> if(rc != ORTE_SUCCESS) {
> return 0;
> }
> return cnt;
> }
This now returns '0' on my MAC when it used to return 1. Is this not an
acceptable way of doing this? Is there a cleaner / better way these days?

-- Nathan
Nathan DeBardeleben, Ph.D.
Los Alamos National Laboratory
Parallel Tools Team
High Performance Computing Environments
phone: 505-667-3428
email: ndebard_at_[hidden]