compiling

compiling

Imagen de grann

The following works fine without the static option:

var1 = /opt/intel/mkl/lib/32/libguide.so
var2 = /opt/intel/mkl/lib/32/libmkl_def.a
var3 = /opt/intel/mkl/lib/32/libmkl_lapack.a
var4 = /opt/intel/mkl/lib/32/libmkl_p4.a
var5 = /opt/intel/compiler70/ia32/lib/libimf.a
var6 = /opt/intel/compiler70/ia32/lib/libPEPCF90.a

FLAGS = -r8 -i8 -g -132 -save

rtmb_v7.3.1_linux: $(OBJS)
/opt/intel/compiler70/ia32/bin/ifc $(OBJS) ${var1} ${var2} ${var3} ${var4} ${var5} ${var6} $(FLAGS) -L/opt/intel/compiler70/ia32/lib -L/opt/intel/mkl/lib/32 -o $(TARGET)

The executable produced compiles and run fine.

If I make the flags

FLAGS = -r8 -i8 -g -132 -save -static

I get:

/lib/libpthread.so.0(.data+0x29f8): multiple definition of `__libc_internal_tsd_set@@GLIBC_PRIVATE'
ld: /lib/libpthread.so.0: indirect symbol `__libc_internal_tsd_set' to `__libc_internal_tsd_set@@GLIBC_PRIVATE' is a loop
/lib/libpthread.so.0: could not read symbols: Invalid operation
make: *** [rtmb_v7.3.1_linux] Error 1

Anyone know why?

ALSO
I don't know why I should have to individually list the libraries like I have. But if I use:

FLAGS = -r8 -i8 -g -132 -save

rtmb_v7.3.1_linux: $(OBJS)
/opt/intel/compiler70/ia32/bin/ifc $(OBJS) $(FLAGS) -L/opt/intel/compiler70/ia32/lib -L/opt/intel/mkl/lib/32 -o $(TARGET)

I get errors. Including -lPEPCF90 in the compile line get ride of some errors but I still have the errors:

/home/grann/rtm/src/rtmb1_v7.3.1_linux.f:3774: undefined reference to `zgetrf_'
/home/grann/rtm/src/rtmb1_v7.3.1_linux.f:4187: undefined reference to `zgetrs_'

What do I do to get a static executable? Can anyone tell me what is going on?

publicaciones de 4 / 0 nuevos
Último envío
Para obtener más información sobre las optimizaciones del compilador, consulte el aviso sobre la optimización.
Imagen de Tim Prince

As I understood it, mkl no longer supports static linking, but:

I don't know either why you list all those libraries by name, including supplying possibly conflicting libraries.

-openmp -Vaxlib would cause the compiler to choose the libraries required for those options.

Are you trying to avoid using p4 mkl for the subroutines you call directly, while using p4 code for those you call only via lapack calls? I don't think that's supported either.

I suspect red hat 8 wasn't around long enough for it to gain full support, but it's a good shot. If your build works fine for you when you don't depart so far from supported options, that may be all you can ask.

Imagen de grann

The only reason for doing it the obscure way was because of an unknowledgeable person trying weird things to get it to work. Mysteriously, it did.

But now, doing it the right way, I'm having problems. I did this:

FLAGS = -r8 -i8 -g -132 -save -Vaxlib

rtmb_v7.3.1_linux: $(OBJS)
/opt/intel/compiler70/ia32/bin/ifc $(OBJS) $(FLAGS)
-L/opt/intel/mkl/lib/32 -L/opt/intel/compiler70/ia32/lib
-o $(TARGET)

AND I GET:

/home/grann/rtm/src/rtmb1_v7.3.1_linux.f:3774: undefined reference to `zgetrf_'
/home/grann/rtm/src/rtmb1_v7.3.1_linux.f:4187: undefined reference to `zgetrs_'

I DID THIS ON RH7.3, RH8 and RH9 - ALL WITH EXACTLY THIS RESULT.

ALSO, IF WE CAN'T STATICALLY LINK TO THE INTEL MATH LIBRARY THIS WILL CAUSE US ALL KINDS OF PROBLEMS AS WE TRY TO MOVE OUR ENGINEERING TOOLS TO LINUX ACROSS A COMPANY DISPERSED AT SITES IN SEVERAL STATES. TOO MANY VERSIONS OF LINUX, INTEL MATH LIBRARIES AND GCC.

Imagen de grann

I forgot to say that I am using RH8 (glibc-2.2.93-5).

Inicie sesión para dejar un comentario.