[Users] Compilation failure with xlc compiler
Wolfgang Kastaun
kastaun at sissa.it
Sat Feb 19 06:34:10 CST 2011
On Fri, 2011-02-18 at 19:21 -0500, Erik Schnetter wrote:
> Wolfgang
>
> As Roland indicates, this is an issue with the Fortran compiler. The
> option -qextname modifies the Fortran name mangling to add an
> underscore to Fortran name, so that Fortran and C names differ. You
> then need to reconfigure (run the *-config stage), so that Cactus
> detects this change. You will then also need to delete all existing
> object files (make *-clean).
>
Using -qextname did the trick. I had tried it before, but without make
clean, just reconfigure.
Cheers,
Wolfgang.
> -erik
>
> On Fri, Feb 18, 2011 at 5:55 PM, Roland Haas
> <roland.haas at physics.gatech.edu> wrote:
> > Hello Wolfgang, Erik,
> >
> >> Thanks. I tried a few of those compiler switches without luck, so tried
> >> to find the root of the problem. Looking at the code in the build
> >> directory, i.e. the source file that actually gets compiled, I notice
> >> that the function lc_statmap_ini IS indeed redeclared. In the source
> >> (not build) directry, we have the lines in loopcontrol.c:
> >>
> >> 944 CCTK_FCALL
> >> 945 void
> >> 946 CCTK_FNAME (lc_statmap_init) (int * restrict const initialised,
> >> 947 lc_statmap_t * restrict const lm,
> >> 948 ONE_FORTSTRING_ARG)
> >
> > This won't help you fix the error (but might tell you why you encounter it),
> > but the Cactus user guide says that (section C1.9.4 "Calls between Different
> > Programming Languages"):
> > --8<--
> > void CCTK FCALL CCTK FNAME(<routine name>)(int *ierr, <argument list>)
> > <rewrite routine code, or call C routine itself>
> >
> > The convention used in Cactus, is that <routine name> be the same as any C
> > routine name, and that this is mixed-case. The macros change the case and
> > number of underscores of the routine name to match that expected by Fortran.
> > --8<--
> > so if your Fortran compiler uses no extra underscores in functions names
> > (which is what it seems gfortran seems to do) and makes all Fortran function
> > names lowercase (and Cactus detected this behaviour correctly), then
> > LoopControl is using something "different" than the convention when using
> > CCTK_FNAME (lc_statmap_init). Of course it could also be that CCTK_FNAME was
> > not correctly set up during the configuration stage.
> >
> > Yours,
> > Roland
> >
> > --
> > My email is as private as my paper mail. I therefore support encrypting
> > and signing email messages. Get my PGP key from http://keys.gnupg.net.
> >
> >
> > _______________________________________________
> > Users mailing list
> > Users at einsteintoolkit.org
> > http://lists.einsteintoolkit.org/mailman/listinfo/users
> >
> >
>
>
>
More information about the Users
mailing list