[mvapich-discuss] Conflicting names for global variables

Krishna Kandalla kandalla at cse.ohio-state.edu
Mon Jan 7 15:36:55 EST 2013


Hi Adam,
       Thanks for checking. This fix has already been applied to our
internal development version. We have also fixed a bunch of other such
variables. We are planning to make the next MVAPICH2 release towards the
first/second week of Feb.

Thanks,
Krishna

On Mon, Jan 7, 2013 at 3:14 PM, Adam T. Moody <moody20 at llnl.gov> wrote:

> Hi Krishna,
> Any word on getting this fix into MVAPICH2-1.9?
>
> Also, do you know when this version will be released?  We're starting to
> package up our next TOSS release.  I'm not sure on the deadline, but I
> think it will be late Jan to mid Feb.  Just wondering whether the MVAPICH2
> update will be available by then.
> -Adam
>
>
>
> Krishna Kandalla wrote:
>
>  Hi Adam,
>>        Thanks for letting us know. This array can be declared as
>> 'static', as you suggested. Could you please let us know if the
>> following simple patch works for you?
>>
>> Thanks,
>> Krishna
>>
>> Index: src/mpi/coll/ch3_shmem_coll.c
>> ==============================**==============================**=======
>> --- src/mpi/coll/ch3_shmem_coll.c       (revision 5972)
>> +++ src/mpi/coll/ch3_shmem_coll.c       (working copy)
>> @@ -73,7 +73,7 @@
>> int mv2_shmem_coll_size = 0;
>> char *mv2_shmem_coll_file = NULL;
>>
>> -char hostname[SHMEM_COLL_HOSTNAME_**LEN];
>> +static char hostname[SHMEM_COLL_HOSTNAME_**LEN];
>> int my_rank;
>>
>>
>>
>>
>> On Wed, Dec 12, 2012 at 8:43 PM, Adam T. Moody <moody20 at llnl.gov> wrote:
>>
>>
>>> Hello MVAPICH Team,
>>> While working to port one application from MVAPICH to MVAPICH2, we
>>> immediately ran into a problem regarding common symbol names between the
>>> library and the application.  In particular, the "hostname" variable
>>> defined
>>> in ch3_shmem_coll.c conflicts with an application variable by the same
>>> name.
>>> The application linked ok, but then it seg faults at runtime.
>>>
>>> Since these variables are not meant to be exposed to applications, would
>>> you
>>> please modify the source to hide them?
>>>
>>> If those variables are only used internally within the same .c file, you
>>> can
>>> declare them as "static" so that they are not visible externally.
>>>
>>> For global variables that are needed outside of the .c file, you can add
>>> a
>>> prefix like "mv2_" to reduce the chance that the name will conflict with
>>> application variable names.
>>>
>>> Thanks,
>>> -Adam
>>> ______________________________**_________________
>>> mvapich-discuss mailing list
>>> mvapich-discuss at cse.ohio-**state.edu<mvapich-discuss at cse.ohio-state.edu>
>>> http://mail.cse.ohio-state.**edu/mailman/listinfo/mvapich-**discuss<http://mail.cse.ohio-state.edu/mailman/listinfo/mvapich-discuss>
>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.cse.ohio-state.edu/pipermail/mvapich-discuss/attachments/20130107/73213d49/attachment.html


More information about the mvapich-discuss mailing list