lyle_s: Thank you... you were right about the double .o being stated. However, I am still facing the only linking issue that is keeping me from actually building this example:
Code:
[ejspeiro@node01 examples]$ make c_example
mpif90 -o c_example -O2 -L../lib/libdmumps.a -L../lib/libmumps_common.a -L../lib/libdmumps.a -L../PORD/lib/ -lpord -L/home/ejspeiro/libraries/MUMPS_4.10.0/lib -lcmumps -ldmumps -lmumps_common -lpord -lsmumps -lzmumps -L/home/ejspeiro/libraries/scalapack-2.0.2/libscalapack.a -L/home/ejspeiro/libraries/BLACS/LIB/blacs_MPI-LINUX-0.a -L/home/ejspeiro/libraries/BLACS/LIB/blacsF77init_MPI-LINUX-0.a -L/home/ejspeiro/libraries/BLACS/LIB/blacs_MPI-LINUX-0.a -L/home/ejspeiro/libraries/BLAS -lblas -lpthread c_example.o -L../lib/libdmumps.a -L../lib/libmumps_common.a -L../lib/libdmumps.a
c_example.o: In function `main':
c_example.c:(.text+0xc2): undefined reference to `dmumps_c'
c_example.c:(.text+0x153): undefined reference to `dmumps_c'
c_example.c:(.text+0x163): undefined reference to `dmumps_c'
collect2: ld returned 1 exit status
make: *** [c_example] Error 1
My problem is that, the function that the linker is claiming to be missing (
dmumps_c), is actually contained within the archives I am including in my linking command... how am I sure... well they should be within
../lib/libdmumps.a:
Code:
[ejspeiro@node01 lib]$ nm libdmumps.a | grep dmumps_c.o
dmumps_c.o:
[ejspeiro@node01 lib]$
HOWEVER, if I move the position of the .o I am trying to build, I get a different linking error...
Code:
[ejspeiro@node01 examples]$ make c_example
mpif90 -o c_example c_example.o -O2 -L../lib/libdmumps.a -L../lib/libmumps_common.a -L../lib/libdmumps.a -L../PORD/lib/ -lpord -L/home/ejspeiro/libraries/MUMPS_4.10.0/lib -lcmumps -ldmumps -lmumps_common -lpord -lsmumps -lzmumps -L/home/ejspeiro/libraries/scalapack-2.0.2/libscalapack.a -L/home/ejspeiro/libraries/BLACS/LIB/blacs_MPI-LINUX-0.a -L/home/ejspeiro/libraries/BLACS/LIB/blacsF77init_MPI-LINUX-0.a -L/home/ejspeiro/libraries/BLACS/LIB/blacs_MPI-LINUX-0.a -L/home/ejspeiro/libraries/BLAS -lblas -lpthread -L../lib/libdmumps.a -L../lib/libmumps_common.a -L../lib/libdmumps.a
/home/ejspeiro/libraries/MUMPS_4.10.0/lib/libdmumps.a(dmumps_c.o): In function `dmumps_c':
mumps_c.c:(.text+0x8bf): undefined reference to `DMUMPS_F77'
collect2: ld returned 1 exit status
make: *** [c_example] Error 1
[ejspeiro@node01 examples]$
Notice how now, I get the original error (minus the double definition of the main function), by having moved the
c_example.o from almost the end of the statement to the very end.
Again, my claim is that I DO NOT know how to link correctly
Any hints?
Thanks again!