[Trilinos-Users] [EXTERNAL] Re: PGI: Fortran/C++ incompatibility

Nico Schlömer nico.schloemer at gmail.com
Fri Mar 30 09:32:48 MDT 2012


FYI, I just found that, for PGI, instead of adding an object file that
contains the necessary symbols, you can also add them manually on the
link line:

$ pgCC -Wl,--defsym,main=MAIN_ test.o

works for me.

--Nico


On Fri, Mar 30, 2012 at 4:46 PM, Salinger, Andrew <agsalin at sandia.gov> wrote:
>
> Nico,
>
> I'm on a project the links a Fortran code to
> Trilinos with PGI compilers. I remember being
> stuck early on because neither compiler worked
> as a linker without some error. With C++ linker,
> there was an error about Fortran not having a
> main(), which with gcc compilers is fixed by
> -lgfortranbegin.  On this machine, I found a
> f90main.o file that I add to the link line
> (with pgCC compiler as the linker) and that
> worked.
>
> It is installed in the same pgi lib directory
> as libpgf90.a. I have no idea if this is
> standard, but you can look there.
>
> Maybe there is a cleaner solution, but this
> worked.
> Andy
>
> -----Original Message-----
> From: trilinos-users-bounces at software.sandia.gov [mailto:trilinos-users-bounces at software.sandia.gov] On Behalf Of Nico Schlömer
> Sent: Friday, March 30, 2012 6:09 AM
> To: Bartlett, Roscoe A.
> Cc: trilinos-users at software.sandia.gov
> Subject: [EXTERNAL] Re: [Trilinos-Users] PGI: Fortran/C++ incompatibility
>
> Nice!
> In the configure scripts linked there, I already see a
>
> -DTrilinos_SKIP_FORTRANCINTERFACE_VERIFY_TEST:BOOL=ON
>
> Let's try this...
>
>
>
>
> On Fri, Mar 30, 2012 at 1:17 PM, Bartlett, Roscoe A.
> <bartlettra at ornl.gov> wrote:
>> Nico,
>>
>> Looks like we still have a nightly pgi build. See:
>>
>> http://testing.sandia.gov/cdash/index.php?project=Trilinos&date=2012-0
>> 3-29&display=project
>>
>> -Ross
>>
>>
>> Sent from my Android phone.
>>
>>
>> -----Original Message-----
>> From: Nico Schlömer
>> [nico.schloemer at gmail.com<mailto:nico.schloemer at gmail.com>]
>> Sent: Friday, March 30, 2012 05:49 AM Eastern Standard Time
>> To: trilinos-users at software.sandia.gov
>> Subject: [Trilinos-Users] PGI: Fortran/C++ incompatibility
>>
>>
>> Hi all,
>>
>> has anyone ever had success in building Trilinos with PGI?
>> It seems that there's this Fortran/C++ incompatibility around for such
>> a long time that makes things like
>>
>> $ pgiftn -c hello-world.f
>> $ pgic++ hello-world.o
>>
>> fail. Turning off Fortran
>>
>>  -D Trilinos_ENABLE_Fortran:BOOL=OFF
>>
>> would possibly help, but I'm not sure of the implications of this.
>>
>> --Nico
>>
>> _______________________________________________
>> Trilinos-Users mailing list
>> Trilinos-Users at software.sandia.gov
>> http://software.sandia.gov/mailman/listinfo/trilinos-users
>>
>
>
> _______________________________________________
> Trilinos-Users mailing list
> Trilinos-Users at software.sandia.gov
> http://software.sandia.gov/mailman/listinfo/trilinos-users
>




More information about the Trilinos-Users mailing list