itaps-parallel Name mangling in MOAB
Onkar Sahni
osahni at scorec.rpi.edu
Thu Nov 13 13:55:25 CST 2008
Does this mean all libs./services/implementations (which will be FMDB and
iZoltan) have to be compiled with gcc 4.3 (if default is 4.3 and thats
what people would use in tutorial)?
It looks like as when I tried to compile using default gcc (which is now
updated to 4.3) then got some errors from mpi.h, see below:
/usr/local/include/mpicxx.h:46:4: error: #error 'Please use the same
version of GCC for compiling MPICH2 and user MPI programs'
Now I don't think I can skip MPICXX using -DMPICH_SKIP_MPICXX as iZoltan
has "using namespace MPI;"
Furthermore, as per my understanding gcc 4.3 needs explicit include for
some headers, for example:
free() - stdlib.h
printf() - stdio.h
strlen() - string.h
In summary, I am hardcoding CXX=g++-4.2 in
5_Mesh_Refinement/src/iMeshMA/Makefile_mesh_SC08 and do not know if this
will work when libs./services/implementation update their build (with gcc
4.3).
In general, I would actually prefer to freeze things as of now in terms of
builds, compilers and directory structures etc.
- Onkar
> Hi all,
> On the mesh machine, I've changed the symbolic links gcc, g++, and
> gfortran in /usr/bin to point to the 4.3 series gnu compilers. If you'd
> prefer to use the 4.2 series, just use gcc-4.2, etc.
>
> Ting, this should work for you now.
>
> - tim
>
> txie at scorec.rpi.edu wrote:
>> Hi Tim,
>>
>> Thanks. But this file seems too long for me to understand in a short
>> time.
>> May you create a link to gfortran in /usr/bin/, just as gcc and g++?
>> Thanks.
>>
>> Ting
>>
>>
>>
>>> In MOAB, we use an m4 macro to attempt to find compilers automatically;
>> see ~tautges/ITAPS/SVN/Examples/m4/compiler.m4 on the mesh machine. This
>> produces the F77 or FC variables, which can be over-ridden on the
>> configure line.
>>> - tim
>>>
>>> txie at scorec.rpi.edu wrote:
>>>> Tim,
>>>> I add one option FC=/usr/local/gcc-4.3/bin/gfortran in the configure,
>>>> and
>>>> it works now.
>>>> But may you tell me how to fix this minor problem, not by setting
>> option
>>>> in the configure? Since other people may have the same problem in the
>> tutorial, and then they will get undefined errors in compiling FMDB.
>> Thanks.
>>>> Regards,
>>>> Ting
>>>>> Tim,
>>>>> Thanks for your reply. We can test them later.
>>>>> I got another problem when I configured FMDB on mesh machine. It can
>>>>> not
>>>>> find Fortran compiler on mesh machine, and the IMESH_FCDefs.h file is
>> empty. here is the output from the configure. Did I miss anything in
>> configure file? I did not meet such problem on our SCOREC machine.
>> Thanks.
>>>>> appending configuration tag "F77" to libtool
>>>>> checking for gfortran... no
>>>>> checking for g95... no
>>>>> checking for xlf95... no
>>>>> checking for f95... no
>>>>> checking for fort... no
>>>>> checking for ifort... no
>>>>> checking for ifc... no
>>>>> checking for efc... no
>>>>> checking for pgf95... no
>>>>> checking for lf95... no
>>>>> checking for ftn... no
>>>>> checking for xlf90... no
>>>>> checking for f90... no
>>>>> checking for pgf90... no
>>>>> checking for pghpf... no
>>>>> checking for epcf90... no
>>>>> checking for g77... no
>>>>> checking for xlf... no
>>>>> checking for f77... no
>>>>> checking for frt... no
>>>>> checking for pgf77... no
>>>>> checking for cf77... no
>>>>> checking for fort77... no
>>>>> checking for fl32... no
>>>>> checking for af77... no
>>>>> checking whether we are using the GNU Fortran compiler... no
>>>>> Ting
>>>>>> Good question. I think the best way to test this would be to
>> configure/build both FMDB and MOAB and use 'nm' to check function
>> signatures in libiMesh.a. Even better would be to do that with
>> different compilers that mangle names differently, and make sure the
>> two
>>>>>> still agree, but that probably is too much work for now.
>>>>>> - tim
>>>>>> txie at scorec.rpi.edu wrote:
>>>>>>> Tim,
>>>>>>> Thanks for your explanations. They are very clear. I have modified
>>>>>>> FMDB
>>>>>>> like that. But I do not know how to test and use this, and also the
>> iMesh-Defs.inc file. May you let me know how to test them if you
>> have
>>>>>>> time? Thanks.
>>>>>>> Regards,
>>>>>>> Ting
>>>>>>>> You bet. If you have any trouble, just send me or Jason email. -
>>>>>>>> tim
>>>>>>>> txie at scorec.rpi.edu wrote:
>>>>>>>>> Tim,
>>>>>>>>> Thanks a lot.
>>>>>>>>> Ting
>>>>>>>>>> Hi all,
>>>>>>>>>> See
>>>>>>>>>> http://trac.mcs.anl.gov/projects/ITAPS/browser/MOAB/trunk/configure.in,
>> lines 31-33. If the script finds a fortran compiler, it runs
>> that
>>>>>>>>>> macro. That generates definitions for FC_FUNC and FC_FUNC_.
>>>>>>>>>> Then,
>>>>>>>>>> at
>>>>>>>>>> line 869 in configure.in, AC_CONFIG_HEADERS is called to produce
>> MBCN_FCDefs.h, which contains substituted definitions for FC_FUNC
>> and
>>>>>>>>>> FC_FUNC_. Those macros are used in iMesh_protos.h
>>>>>>>>>> (http://trac.mcs.anl.gov/projects/ITAPS/browser/MOAB/trunk/tools/iMesh/iMesh_protos.h)
>> to mangle the imesh function names.
>>>>>>>>>> If you're doing this in FMDB, it's probably easier to eliminate
>> going
>>>>>>>>>> through MBCN_FCDefs.h or equivalent and call AC_CONFIG_HEADERS
>> directly
>>>>>>>>>> on iMesh.h, though you'll have to make a iMesh.h.in file for
>>>>>>>>>> that to
>>>>>>>>>> work properly.
>>>>>>>>>> Any questions, let me know.
>>>>>>>>>> - tim
>>>>>>>>>> --
>>>>>>>>>> ================================================================
>> "You will keep in perfect peace him whose mind is
>>>>>>>>>> steadfast, because he trusts in you." Isaiah
>> 26:3
>>>>>>>>>> Tim Tautges Argonne National Laboratory
>>>>>>>>>> (tautges at mcs.anl.gov) (telecommuting from
>>>>>>>>>> UW-Madison)
>>>>>>>>>> phone: (608) 263-8485 1500 Engineering Dr.
>>>>>>>>>> fax: (608) 263-4499 Madison, WI 53706
>>>>>>>> --
>>>>>>>> ================================================================
>> "You will keep in perfect peace him whose mind is
>>>>>>>> steadfast, because he trusts in you." Isaiah 26:3
>>>>>>>> Tim Tautges Argonne National Laboratory
>>>>>>>> (tautges at mcs.anl.gov) (telecommuting from
>> UW-Madison)
>>>>>>>> phone: (608) 263-8485 1500 Engineering Dr.
>>>>>>>> fax: (608) 263-4499 Madison, WI 53706
>>>>>> --
>>>>>> ================================================================
>>>>>> "You
>> will keep in perfect peace him whose mind is
>>>>>> steadfast, because he trusts in you." Isaiah 26:3
>>>>>> Tim Tautges Argonne National Laboratory
>>>>>> (tautges at mcs.anl.gov) (telecommuting from UW-Madison)
>> phone: (608) 263-8485 1500 Engineering Dr.
>>>>>> fax: (608) 263-4499 Madison, WI 53706
>>> --
>>> ================================================================ "You
>> will keep in perfect peace him whose mind is
>>> steadfast, because he trusts in you." Isaiah 26:3
>>>
>>> Tim Tautges Argonne National Laboratory
>>> (tautges at mcs.anl.gov) (telecommuting from UW-Madison)
>> phone: (608) 263-8485 1500 Engineering Dr.
>>> fax: (608) 263-4499 Madison, WI 53706
>>>
>>>
>>
>>
>>
>>
>>
>>
>>
>
> --
> ================================================================
> "You will keep in perfect peace him whose mind is
> steadfast, because he trusts in you." Isaiah 26:3
>
> Tim Tautges Argonne National Laboratory
> (tautges at mcs.anl.gov) (telecommuting from UW-Madison)
> phone: (608) 263-8485 1500 Engineering Dr.
> fax: (608) 263-4499 Madison, WI 53706
>
>
More information about the itaps-parallel
mailing list