[SCore-users] MPI and PM at the same time
Atsushi HORI
hori at swimmy-soft.com
Thu Oct 17 09:44:53 JST 2002
Hi, again.
>So, I'm trying to get both MPI and PM routines from SCore to work together
>in the same program, but so far I failed. I've seen that most of
>PM-related routines need a "context" to work with; however, after calling
>MPI_Init (which calls score_initialize), there is already a context (and
>only one, cf. score_num_pmnet) that seems to have a NULL ->device.
This should not happen if the number of nodes is greater than one.
>Is it
>safe to use the same context for other (non-MPI) operations ?
No. It is quite dangerous !!
>If not, how
>do I get another context ? Do I need to open a device (PM_COMPOSITE) and
>get a context on it and if so how do I know that is the same device that
>is used by MPI ? (My original idea was to get score_pmnet[0]->device and
>obtain another context on it, but it's NULL...)
Define the number of network sets with the RESOURCE MACRO, like this.
SCORE_RSRC_NUM_NETS(N)
where N is the number of network sets you want to use. The default is
one. In your case, you have to have two network sets and say,
SCORE_RSRC_NUM_NETS(2);
somewhere in your code.
The associated nodes are the same in all allocated network sets.
----
Atsushi HORI
Swimmy Software, Inc.
More information about the SCore-users
mailing list