Aron Ahmadia <[email protected]> writes:

> On Wed, Mar 11, 2015 at 11:54 PM, Jed Brown <[email protected]> wrote:
>
>>
>> So where are you going to find -lstdc++ and/or -lgfortran so that you
>> can link without guessing?
>
>
> mpicc -link_info

Assuming you meant mpicxx:

$ mpicxx -link_info                  # Open MPI has sane behavior
/usr/bin/ld: cannot find -link_info
collect2: error: ld returned 1 exit status
$ /opt/mpich/bin/mpicxx -link_info   # MPICH cannot link the printing library 
libink_info.so
g++ -I/opt/mpich/include -L/opt/mpich/lib -lmpicxx -Wl,-rpath 
-Wl,/opt/mpich/lib -Wl,--enable-new-dtags -lmpi

> mpif90 -link_info

$ /opt/mpich/bin/mpif90 -link_info
gfortran -I/opt/mpich/include -I/opt/mpich/include -L/opt/mpich/lib -lmpifort 
-Wl,-rpath -Wl,/opt/mpich/lib -Wl,--enable-new-dtags -lmpi

> You do have to know how to query the compiler script.  I thought you guys
> were already doing this...

I'll repeat my question: where are you going to find -lstdc++ and/or
-lgfortran so that you can link without guessing?

Attachment: signature.asc
Description: PGP signature

Reply via email to