[mvapich-discuss] Conflicting names for global variables
Adam T. Moody
moody20 at llnl.gov
Wed Dec 12 20:43:37 EST 2012
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
More information about the mvapich-discuss
mailing list