I guess I should have sent it out earlier. Thanks for taking a look at it, and let me know if you have any questions for future use.<div><br></div><div>Joe Ratterman<div><br><div><br><div class="gmail_quote">On Wed, Oct 6, 2010 at 7:25 AM, Dave Goodell <span dir="ltr"><<a href="mailto:goodell@mcs.anl.gov">goodell@mcs.anl.gov</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">I sent a longer response to Joe's mail last night, but it appears to have gotten clogged in the pipes somewhere...<br>
<br>
Basically, this patch appears to be a dup of a ticket (#1061?). I tried applying it but it causes a lot of problems in ch3 that aren't easy to solve. We should integrate this sort of functionality, but we might need to do it slightly differently. I just haven't had the time recently.<br>
<br>
We should not attempt to slip this in at this late stage for 1.3.<br>
<font color="#888888"><br>
-Dave<br>
</font><div><div></div><div class="h5"><br>
On Oct 6, 2010, at 7:44 AM, Pavan Balaji <<a href="mailto:balaji@mcs.anl.gov">balaji@mcs.anl.gov</a>> wrote:<br>
<br>
><br>
> Thanks Joe. This looks good, though we'll need to port it to CH3 as well.<br>
><br>
> mpich2-core: Should this go into 1.3? This is an ADI change (though fairly minor). But we are already at 1.3rc2, so I don't know if we want to make such a change at this point.<br>
><br>
> -- Pavan<br>
><br>
> On 10/05/2010 04:40 PM, Joe Ratterman wrote:<br>
>> From: Joe Ratterman<<a href="mailto:jratt@us.ibm.com">jratt@us.ibm.com</a>><br>
>><br>
>> Currently, all implementations of a communicator rank list must<br>
>> contain an actual list at least as long as the number of ranks in<br>
>> the communicator. This is because "comm_ptr->local_vcr[i]" is<br>
>> assumed to work.<br>
>><br>
>> To avoid the list, it is possible to change the MPID_VCR API.<br>
>> Basically, all places that were previously passed<br>
>> "comm_ptr->local_vcr[i]" now contain "comm_ptr->local_vcr, i". This<br>
>> means that the VCR table can be something other than a list, and<br>
>> that callers are requesting some processing on the "i"th value<br>
>> instead of actually passing the "i"th value into the function.<br>
>><br>
>> This patch makes the necessary changes to the core of MPICH2 1.3rc2,<br>
>> as well as changing an alternative version of the "dcmf" device.<br>
>><br>
>> Signed-off-by: Joe Ratterman<<a href="mailto:jratt@us.ibm.com">jratt@us.ibm.com</a>><br>
>> ---<br>
>> mpich2/src/include/mpiimpl.h | 4 ++--<br>
>> mpich2/src/mpi/comm/comm_create.c | 4 ++--<br>
>> mpich2/src/mpi/comm/comm_group.c | 2 +-<br>
>> mpich2/src/mpi/comm/comm_remote_group.c | 2 +-<br>
>> mpich2/src/mpi/comm/comm_split.c | 12 ++++++------<br>
>> mpich2/src/mpi/comm/commutil.c | 10 +++++-----<br>
>> mpich2/src/mpi/comm/intercomm_create.c | 10 +++++-----<br>
>> mpich2/src/mpi/comm/intercomm_merge.c | 8 ++++----<br>
>> mpich2/src/mpi/group/grouputil.c | 2 +-<br>
>> mpich2/src/mpid/dcmfd/include/mpidi_hooks.h | 3 ++-<br>
>> mpich2/src/mpid/dcmfd/include/mpidi_macros.h | 2 +-<br>
>> mpich2/src/mpid/dcmfd/src/mpid_init.c | 4 ++--<br>
>> mpich2/src/mpid/dcmfd/src/mpid_vc.c | 16 ++++++++--------<br>
>> 13 files changed, 40 insertions(+), 39 deletions(-)<br>
>><br>
>> diff --git a/mpich2/src/include/mpiimpl.h b/mpich2/src/include/mpiimpl.h<br>
>> index 013b4fe..6fd86fd 100644<br>
>> --- a/mpich2/src/include/mpiimpl.h<br>
>> +++ b/mpich2/src/include/mpiimpl.h<br>
>> @@ -3116,7 +3116,7 @@ int MPID_VCRT_Get_ptr(MPID_VCRT vcrt, MPID_VCR **vc_pptr);<br>
>> /*@<br>
>> MPID_VCR_Dup - Create a duplicate reference to a virtual connection<br>
>> @*/<br>
>> -int MPID_VCR_Dup(MPID_VCR orig_vcr, MPID_VCR * new_vcr);<br>
>> +int MPID_VCR_Dup(const MPID_VCR *orig_vcr, unsigned origin_index, MPID_VCR *new_vcr, unsigned new_index);<br>
>><br>
>> /*@<br>
>> MPID_VCR_Get_lpid - Get the local process id that corresponds to a<br>
>> @@ -3129,7 +3129,7 @@ int MPID_VCR_Dup(MPID_VCR orig_vcr, MPID_VCR * new_vcr);<br>
>> processes may use different ids to identify the same target process<br>
>> @*/<br>
>> /* We macro-ized this at the device. */<br>
>> -int MPID_VCR_Get_lpid(MPID_VCR vcr, int * lpid_ptr);<br>
>> +int MPID_VCR_Get_lpid(MPID_VCR *vcr, unsigned index, int * lpid_ptr);<br>
>><br>
>> /* ------------------------------------------------------------------------- */<br>
>> /* Define a macro to allow us to select between statically selected functions<br>
>> diff --git a/mpich2/src/mpi/comm/comm_create.c b/mpich2/src/mpi/comm/comm_create.c<br>
>> index 33bab93..0241f49 100644<br>
>> --- a/mpich2/src/mpi/comm/comm_create.c<br>
>> +++ b/mpich2/src/mpi/comm/comm_create.c<br>
>> @@ -154,7 +154,7 @@ PMPI_LOCAL int MPIR_Comm_create_calculate_mapping(MPID_Group *group_ptr,<br>
>> mapping[i] = -1;<br>
>> for (j=0; j<vcr_size; j++) {<br>
>> int comm_lpid;<br>
>> - MPID_VCR_Get_lpid( vcr[j],&comm_lpid );<br>
>> + MPID_VCR_Get_lpid( vcr, j,&comm_lpid );<br>
>> if (comm_lpid == group_ptr->lrank_to_lpid[i].lpid) {<br>
>> mapping[i] = j;<br>
>> break;<br>
>> @@ -207,7 +207,7 @@ PMPI_LOCAL int MPIR_Comm_create_create_and_map_vcrt(int n,<br>
>> MPIU_DBG_MSG_FMT(COMM,VERBOSE,<br>
>> (MPIU_DBG_FDEST, "dupping from mapping_vcr=%p rank=%d into new_rank=%d/%d in new_vcr=%p",<br>
>> mapping_vcr, mapping[i], i, n, vcr));<br>
>> - mpi_errno = MPID_VCR_Dup(mapping_vcr[mapping[i]],&vcr[i]);<br>
>> + mpi_errno = MPID_VCR_Dup(mapping_vcr, mapping[i], vcr, i);<br>
>> if (mpi_errno) MPIU_ERR_POP(mpi_errno);<br>
>> }<br>
>><br>
>> diff --git a/mpich2/src/mpi/comm/comm_group.c b/mpich2/src/mpi/comm/comm_group.c<br>
>> index 7835307..d0700ae 100644<br>
>> --- a/mpich2/src/mpi/comm/comm_group.c<br>
>> +++ b/mpich2/src/mpi/comm/comm_group.c<br>
>> @@ -49,7 +49,7 @@ int MPIR_Comm_group_impl(MPID_Comm *comm_ptr, MPID_Group **group_ptr)<br>
>> local_vcr = comm_ptr->vcr;<br>
>><br>
>> for (i=0; i<n; i++) {<br>
>> - (void) MPID_VCR_Get_lpid( local_vcr[i],&lpid );<br>
>> + (void) MPID_VCR_Get_lpid( local_vcr, i,&lpid );<br>
>> (*group_ptr)->lrank_to_lpid[i].lrank = i;<br>
>> (*group_ptr)->lrank_to_lpid[i].lpid = lpid;<br>
>> }<br>
>> diff --git a/mpich2/src/mpi/comm/comm_remote_group.c b/mpich2/src/mpi/comm/comm_remote_group.c<br>
>> index a331bd0..5792df7 100644<br>
>> --- a/mpich2/src/mpi/comm/comm_remote_group.c<br>
>> +++ b/mpich2/src/mpi/comm/comm_remote_group.c<br>
>> @@ -41,7 +41,7 @@ int MPIR_Comm_remote_group_impl(MPID_Comm *comm_ptr, MPID_Group **group_ptr)<br>
>><br>
>> for (i=0; i<n; i++) {<br>
>> (*group_ptr)->lrank_to_lpid[i].lrank = i;<br>
>> - (void) MPID_VCR_Get_lpid( comm_ptr->vcr[i],&lpid );<br>
>> + (void) MPID_VCR_Get_lpid( comm_ptr->vcr, i,&lpid );<br>
>> (*group_ptr)->lrank_to_lpid[i].lpid = lpid;<br>
>> }<br>
>> (*group_ptr)->size = n;<br>
>> diff --git a/mpich2/src/mpi/comm/comm_split.c b/mpich2/src/mpi/comm/comm_split.c<br>
>> index 964f241..603ee78 100644<br>
>> --- a/mpich2/src/mpi/comm/comm_split.c<br>
>> +++ b/mpich2/src/mpi/comm/comm_split.c<br>
>> @@ -236,8 +236,8 @@ int MPIR_Comm_split_impl(MPID_Comm *comm_ptr, int color, int key, MPID_Comm **ne<br>
>> MPID_VCRT_Get_ptr( (*newcomm_ptr)->local_vcrt,<br>
>> &(*newcomm_ptr)->local_vcr );<br>
>> for (i=0; i<new_size; i++) {<br>
>> - MPID_VCR_Dup( comm_ptr->local_vcr[keytable[i].color],<br>
>> - &(*newcomm_ptr)->local_vcr[i] );<br>
>> + MPID_VCR_Dup( comm_ptr->local_vcr, keytable[i].color,<br>
>> + (*newcomm_ptr)->local_vcr, i );<br>
>> if (keytable[i].color == comm_ptr->rank) {<br>
>> (*newcomm_ptr)->rank = i;<br>
>> }<br>
>> @@ -261,8 +261,8 @@ int MPIR_Comm_split_impl(MPID_Comm *comm_ptr, int color, int key, MPID_Comm **ne<br>
>> MPID_VCRT_Create( new_remote_size,&(*newcomm_ptr)->vcrt );<br>
>> MPID_VCRT_Get_ptr( (*newcomm_ptr)->vcrt,&(*newcomm_ptr)->vcr );<br>
>> for (i=0; i<new_remote_size; i++) {<br>
>> - MPID_VCR_Dup( comm_ptr->vcr[remotekeytable[i].color],<br>
>> - &(*newcomm_ptr)->vcr[i] );<br>
>> + MPID_VCR_Dup( comm_ptr->vcr, remotekeytable[i].color,<br>
>> + (*newcomm_ptr)->vcr, i );<br>
>> }<br>
>><br>
>> (*newcomm_ptr)->context_id = remote_context_id;<br>
>> @@ -278,8 +278,8 @@ int MPIR_Comm_split_impl(MPID_Comm *comm_ptr, int color, int key, MPID_Comm **ne<br>
>> MPID_VCRT_Create( new_size,&(*newcomm_ptr)->vcrt );<br>
>> MPID_VCRT_Get_ptr( (*newcomm_ptr)->vcrt,&(*newcomm_ptr)->vcr );<br>
>> for (i=0; i<new_size; i++) {<br>
>> - MPID_VCR_Dup( comm_ptr->vcr[keytable[i].color],<br>
>> - &(*newcomm_ptr)->vcr[i] );<br>
>> + MPID_VCR_Dup( comm_ptr->vcr, keytable[i].color,<br>
>> + (*newcomm_ptr)->vcr, i );<br>
>> if (keytable[i].color == comm_ptr->rank) {<br>
>> (*newcomm_ptr)->rank = i;<br>
>> }<br>
>> diff --git a/mpich2/src/mpi/comm/commutil.c b/mpich2/src/mpi/comm/commutil.c<br>
>> index 1eeaedc..fb7108d 100644<br>
>> --- a/mpich2/src/mpi/comm/commutil.c<br>
>> +++ b/mpich2/src/mpi/comm/commutil.c<br>
>> @@ -269,8 +269,8 @@ int MPIR_Comm_commit(MPID_Comm *comm)<br>
>> for (i = 0; i< num_local; ++i) {<br>
>> /* For rank i in the new communicator, find the corresponding<br>
>> rank in the input communicator */<br>
>> - MPID_VCR_Dup( comm->vcr[local_procs[i]],<br>
>> -&comm->node_comm->vcr[i] );<br>
>> + MPID_VCR_Dup( comm->vcr, local_procs[i],<br>
>> + comm->node_comm->vcr, i );<br>
>> }<br>
>><br>
>> MPID_Dev_comm_create_hook( comm->node_comm );<br>
>> @@ -297,8 +297,8 @@ int MPIR_Comm_commit(MPID_Comm *comm)<br>
>> for (i = 0; i< num_external; ++i) {<br>
>> /* For rank i in the new communicator, find the corresponding<br>
>> rank in the input communicator */<br>
>> - MPID_VCR_Dup( comm->vcr[external_procs[i]],<br>
>> -&comm->node_roots_comm->vcr[i] );<br>
>> + MPID_VCR_Dup( comm->vcr, external_procs[i],<br>
>> + comm->node_roots_comm->vcr, i );<br>
>> }<br>
>><br>
>> MPID_Dev_comm_create_hook( comm->node_roots_comm );<br>
>> @@ -1006,7 +1006,7 @@ int MPIR_Comm_copy( MPID_Comm *comm_ptr, int size, MPID_Comm **outcomm_ptr )<br>
>> for (i=0; i<size; i++) {<br>
>> /* For rank i in the new communicator, find the corresponding<br>
>> rank in the input communicator */<br>
>> - MPID_VCR_Dup( comm_ptr->vcr[i],&newcomm_ptr->vcr[i] );<br>
>> + MPID_VCR_Dup( comm_ptr->vcr, i, newcomm_ptr->vcr, i );<br>
>> }<br>
>> }<br>
>><br>
>> diff --git a/mpich2/src/mpi/comm/intercomm_create.c b/mpich2/src/mpi/comm/intercomm_create.c<br>
>> index e713830..0cb5c1e 100644<br>
>> --- a/mpich2/src/mpi/comm/intercomm_create.c<br>
>> +++ b/mpich2/src/mpi/comm/intercomm_create.c<br>
>> @@ -105,7 +105,7 @@ PMPI_LOCAL int MPID_GPID_GetAllInComm( MPID_Comm *comm_ptr, int local_size,<br>
>><br>
>> for (i=0; i<comm_ptr->local_size; i++) {<br>
>> *gpid++ = 0;<br>
>> - (void)MPID_VCR_Get_lpid( comm_ptr->vcr[i], gpid );<br>
>> + (void)MPID_VCR_Get_lpid( comm_ptr->vcr, i, gpid );<br>
>> gpid++;<br>
>> }<br>
>> *singlePG = 1;<br>
>> @@ -140,8 +140,8 @@ PMPI_LOCAL int MPID_VCR_CommFromLpids( MPID_Comm *newcomm_ptr,<br>
>> /* printf( "[%d] Remote rank %d has lpid %d\n",<br>
>> MPIR_Process.comm_world->rank, i, lpids[i] ); */<br>
>> if (lpids[i]< commworld_ptr->remote_size) {<br>
>> - MPID_VCR_Dup( commworld_ptr->vcr[lpids[i]],<br>
>> - &newcomm_ptr->vcr[i] );<br>
>> + MPID_VCR_Dup( commworld_ptr->vcr, lpids[i],<br>
>> + newcomm_ptr->vcr, i );<br>
>> }<br>
>> else {<br>
>> /* We must find the corresponding vcr for a given lpid */<br>
>> @@ -163,7 +163,7 @@ PMPI_LOCAL int MPID_LPID_GetAllInComm( MPID_Comm *comm_ptr, int local_size,<br>
>> /* FIXME: Should be using the local_size argument */<br>
>> MPIU_Assert( comm_ptr->local_size == local_size );<br>
>> for (i=0; i<comm_ptr->local_size; i++) {<br>
>> - (void)MPID_VCR_Get_lpid( comm_ptr->vcr[i],&local_lpids[i] );<br>
>> + (void)MPID_VCR_Get_lpid( comm_ptr->vcr, i,&local_lpids[i] );<br>
>> }<br>
>> return 0;<br>
>> }<br>
>> @@ -539,7 +539,7 @@ int MPI_Intercomm_create(MPI_Comm local_comm, int local_leader,<br>
>> MPID_VCRT_Create( comm_ptr->local_size,&newcomm_ptr->local_vcrt );<br>
>> MPID_VCRT_Get_ptr( newcomm_ptr->local_vcrt,&newcomm_ptr->local_vcr );<br>
>> for (i=0; i<comm_ptr->local_size; i++) {<br>
>> - MPID_VCR_Dup( comm_ptr->vcr[i],&newcomm_ptr->local_vcr[i] );<br>
>> + MPID_VCR_Dup( comm_ptr->vcr, i, newcomm_ptr->local_vcr, i );<br>
>> }<br>
>><br>
>> /* Inherit the error handler (if any) */<br>
>> diff --git a/mpich2/src/mpi/comm/intercomm_merge.c b/mpich2/src/mpi/comm/intercomm_merge.c<br>
>> index 8fae687..b672767 100644<br>
>> --- a/mpich2/src/mpi/comm/intercomm_merge.c<br>
>> +++ b/mpich2/src/mpi/comm/intercomm_merge.c<br>
>> @@ -227,11 +227,11 @@ int MPI_Intercomm_merge(MPI_Comm intercomm, int high, MPI_Comm *newintracomm)<br>
>> /* remote group first */<br>
>> j = 0;<br>
>> for (i=0; i<comm_ptr->remote_size; i++) {<br>
>> - MPID_VCR_Dup( comm_ptr->vcr[i],&newcomm_ptr->vcr[j++] );<br>
>> + MPID_VCR_Dup( comm_ptr->vcr, i, newcomm_ptr->vcr, j++ );<br>
>> }<br>
>> for (i=0; i<comm_ptr->local_size; i++) {<br>
>> if (i == comm_ptr->rank) newcomm_ptr->rank = j;<br>
>> - MPID_VCR_Dup( comm_ptr->local_vcr[i],&newcomm_ptr->vcr[j++] );<br>
>> + MPID_VCR_Dup( comm_ptr->local_vcr, i, newcomm_ptr->vcr, j++ );<br>
>> }<br>
>> }<br>
>> else {<br>
>> @@ -239,10 +239,10 @@ int MPI_Intercomm_merge(MPI_Comm intercomm, int high, MPI_Comm *newintracomm)<br>
>> j = 0;<br>
>> for (i=0; i<comm_ptr->local_size; i++) {<br>
>> if (i == comm_ptr->rank) newcomm_ptr->rank = j;<br>
>> - MPID_VCR_Dup( comm_ptr->local_vcr[i],&newcomm_ptr->vcr[j++] );<br>
>> + MPID_VCR_Dup( comm_ptr->local_vcr, i, newcomm_ptr->vcr, j++ );<br>
>> }<br>
>> for (i=0; i<comm_ptr->remote_size; i++) {<br>
>> - MPID_VCR_Dup( comm_ptr->vcr[i],&newcomm_ptr->vcr[j++] );<br>
>> + MPID_VCR_Dup( comm_ptr->vcr, i, newcomm_ptr->vcr, j++ );<br>
>> }<br>
>> }<br>
>><br>
>> diff --git a/mpich2/src/mpi/group/grouputil.c b/mpich2/src/mpi/group/grouputil.c<br>
>> index dda81b3..963bad4 100644<br>
>> --- a/mpich2/src/mpi/group/grouputil.c<br>
>> +++ b/mpich2/src/mpi/group/grouputil.c<br>
>> @@ -383,7 +383,7 @@ int MPIR_GroupCheckVCRSubset( MPID_Group *group_ptr, int vsize, MPID_VCR *vcr,<br>
>> vsize*sizeof(MPID_Group_pmap_t),mpi_errno, "" );<br>
>> /* Initialize the vmap */<br>
>> for (i=0; i<vsize; i++) {<br>
>> - MPID_VCR_Get_lpid( vcr[i],&vmap[i].lpid );<br>
>> + MPID_VCR_Get_lpid( vcr, i,&vmap[i].lpid );<br>
>> vmap[i].lrank = i;<br>
>> vmap[i].next_lpid = 0;<br>
>> vmap[i].flag = 0;<br>
>> diff --git a/mpich2/src/mpid/dcmfd/include/mpidi_hooks.h b/mpich2/src/mpid/dcmfd/include/mpidi_hooks.h<br>
>> index d7db400..9081a4a 100644<br>
>> --- a/mpich2/src/mpid/dcmfd/include/mpidi_hooks.h<br>
>> +++ b/mpich2/src/mpid/dcmfd/include/mpidi_hooks.h<br>
>> @@ -13,7 +13,8 @@<br>
>> #define __include_mpidi_hooks_h__<br>
>><br>
>><br>
>> -typedef dcmf_task_t MPID_VCR;<br>
>> +typedef void MPID_VCR;<br>
>> +typedef dcmf_task_t MPIDI_VCR;<br>
>> typedef struct MPIDI_VCRT * MPID_VCRT;<br>
>><br>
>> typedef size_t MPIDI_msg_sz_t;<br>
>> diff --git a/mpich2/src/mpid/dcmfd/include/mpidi_macros.h b/mpich2/src/mpid/dcmfd/include/mpidi_macros.h<br>
>> index 3acd105..73f1be9 100644<br>
>> --- a/mpich2/src/mpid/dcmfd/include/mpidi_macros.h<br>
>> +++ b/mpich2/src/mpid/dcmfd/include/mpidi_macros.h<br>
>> @@ -232,7 +232,7 @@ MPIDI_Context_local(MPID_Request * req)<br>
>><br>
>> #define MPID_VCR_GET_LPID(vcr, index) \<br>
>> ({ \<br>
>> - vcr[index]; \<br>
>> + ((MPIDI_VCR*)vcr)[index]; \<br>
>> })<br>
>> #define MPID_GPID_Get(comm_ptr, rank, gpid) \<br>
>> { \<br>
>> diff --git a/mpich2/src/mpid/dcmfd/src/mpid_init.c b/mpich2/src/mpid/dcmfd/src/mpid_init.c<br>
>> index 1a31681..4acdb13 100644<br>
>> --- a/mpich2/src/mpid/dcmfd/src/mpid_init.c<br>
>> +++ b/mpich2/src/mpid/dcmfd/src/mpid_init.c<br>
>> @@ -277,7 +277,7 @@ int MPID_Init(int * argc,<br>
>> rc = MPID_VCRT_Get_ptr(comm->vcrt,&comm->vcr);<br>
>> MPID_assert(rc == MPI_SUCCESS);<br>
>> for (i=0; i<size; i++)<br>
>> - comm->vcr[i] = i;<br>
>> + ((MPIDI_VCR*)comm->vcr)[i] = i;<br>
>><br>
>> /* basically a noop for now */<br>
>> MPIDI_Comm_create(comm);<br>
>> @@ -295,7 +295,7 @@ int MPID_Init(int * argc,<br>
>> MPID_assert(rc == MPI_SUCCESS);<br>
>> rc = MPID_VCRT_Get_ptr(comm->vcrt,&comm->vcr);<br>
>> MPID_assert(rc == MPI_SUCCESS);<br>
>> - comm->vcr[0] = rank;<br>
>> + ((MPIDI_VCR*)comm->vcr)[0] = rank;<br>
>><br>
>><br>
>> /* ------------------------------- */<br>
>> diff --git a/mpich2/src/mpid/dcmfd/src/mpid_vc.c b/mpich2/src/mpid/dcmfd/src/mpid_vc.c<br>
>> index a106fc0..2fb4769 100644<br>
>> --- a/mpich2/src/mpid/dcmfd/src/mpid_vc.c<br>
>> +++ b/mpich2/src/mpid/dcmfd/src/mpid_vc.c<br>
>> @@ -17,20 +17,20 @@ struct MPIDI_VCRT<br>
>> {<br>
>> MPIU_OBJECT_HEADER;<br>
>> unsigned size; /**< Number of entries in the table */<br>
>> - MPID_VCR vcr_table[0]; /**< Array of virtual connection references */<br>
>> + MPIDI_VCR vcr_table[0]; /**< Array of virtual connection references */<br>
>> };<br>
>><br>
>><br>
>> -int MPID_VCR_Dup(MPID_VCR orig_vcr, MPID_VCR * new_vcr)<br>
>> +int MPID_VCR_Dup(const MPID_VCR *orig_vcr, unsigned origin_index, MPID_VCR *new_vcr, unsigned new_index)<br>
>> {<br>
>> - *new_vcr = orig_vcr;<br>
>> - return MPI_SUCCESS;<br>
>> + ((MPIDI_VCR*)new_vcr)[new_index] = MPID_VCR_GET_LPID(orig_vcr, origin_index);<br>
>> + return MPI_SUCCESS;<br>
>> }<br>
>><br>
>> -int MPID_VCR_Get_lpid(MPID_VCR vcr, int * lpid_ptr)<br>
>> +int MPID_VCR_Get_lpid(MPID_VCR *vcr, unsigned index, int * lpid_ptr)<br>
>> {<br>
>> - *lpid_ptr = (int)vcr;<br>
>> - return MPI_SUCCESS;<br>
>> + *lpid_ptr = MPID_VCR_GET_LPID(vcr, index);<br>
>> + return MPI_SUCCESS;<br>
>> }<br>
>><br>
>> int MPID_VCRT_Create(int size, MPID_VCRT *vcrt_ptr)<br>
>> @@ -38,7 +38,7 @@ int MPID_VCRT_Create(int size, MPID_VCRT *vcrt_ptr)<br>
>> struct MPIDI_VCRT * vcrt;<br>
>> int result;<br>
>><br>
>> - vcrt = MPIU_Malloc(sizeof(struct MPIDI_VCRT) + size*sizeof(MPID_VCR));<br>
>> + vcrt = MPIU_Malloc(sizeof(struct MPIDI_VCRT) + size*sizeof(MPIDI_VCR));<br>
>> if (vcrt != NULL)<br>
>> {<br>
>> MPIU_Object_set_ref(vcrt, 1);<br>
><br>
> --<br>
> Pavan Balaji<br>
> <a href="http://www.mcs.anl.gov/~balaji" target="_blank">http://www.mcs.anl.gov/~balaji</a><br>
</div></div></blockquote></div><br></div></div></div>