add the array RC_RCCEID to determine the RCCE ID from a given core id
This commit is contained in:
parent
8551a9ea9a
commit
364609e8e0
2 changed files with 3 additions and 0 deletions
|
@ -102,6 +102,7 @@ extern int RCCE_BUFF_SIZE;
|
|||
#endif
|
||||
extern int RC_MY_COREID;
|
||||
extern int RC_COREID[RCCE_MAXNP];
|
||||
extern int RC_RCCEID[RCCE_MAXNP];
|
||||
extern int RC_REFCLOCKMHZ;
|
||||
extern int RCCE_IAM;
|
||||
extern int RCCE_debug_synch;
|
||||
|
|
|
@ -56,6 +56,7 @@ int RC_REFCLOCKMHZ; // baseline CPU frequency (MHz)
|
|||
int RC_MY_COREID; // physical ID of calling core
|
||||
int RC_COREID[RCCE_MAXNP]; // array of physical core IDs for all participating
|
||||
// cores, sorted by rank
|
||||
int RC_RCCEID[RCCE_MAXNP] = {[0 ... RCCE_MAXNP-1] = -1}; // array of RCCE IDs for all cores
|
||||
int RCCE_IAM=-1; // rank of calling core (invalid by default)
|
||||
RCCE_COMM RCCE_COMM_WORLD; // predefined global communicator
|
||||
int RCCE_BUFF_SIZE; // available MPB size
|
||||
|
@ -273,6 +274,7 @@ int RCCE_init(
|
|||
// determine rank of calling core
|
||||
for (ue=0; ue<RCCE_NP; ue++) {
|
||||
if (RC_COREID[ue] == RC_MY_COREID) RCCE_IAM = ue;
|
||||
RC_RCCEID[RC_COREID[ue]] = ue;
|
||||
}
|
||||
|
||||
#ifdef SHMADD
|
||||
|
|
Loading…
Add table
Reference in a new issue