Domanda

I am having some trouble compiling Fortran code on a brand-new Cygwin installation, which I can trace back to undefined references to functions in the Intel svml (Short Vector Math Library) library.

Specifically, I am getting errors of the form

import_gamess.o:import_gamess.f90:(.text+0xb58b): 
undefined reference to `vmldPow2'

and the function vmldPow2 is part of the svml library, as shown here, which I pass as an option to gfortran in my makefile as

F90 = gfortran -m64 -msse2 -O3 -march=native -mtune=native -fopenmp \
  -ffast-math -fassociative-math -freciprocal-math -ffinite-math-only \
  -fno-signed-zeros -fno-trapping-math -msahf -mmovbe -mrecip \
  -mveclibabi=svml -ftree-vectorize -fexternal-blas 
  -fblas-matmul-limit=50  -static 

(I am also using the libraries lapack and lblas.)

The file compiled fine on my laptop, running Cygwin 1.7.17 on Windows 7. (This was installed circa 2013-04-18; the gfortran version there is 4.5.3.) I am now trying to replicate the installation on a new desktop, also running Windows 7, and have installed Cygwin 1.7.25. I am getting the above errors on both 32-bit and 64-bit installs (running with gfortran 4.7.3 and 4.8.1, respectively), as well as a new install of 64-bit Cygwin on my desktop. I am also not getting errors on a Linux boot on the same desktop, which I can't get to at the moment.

It is clear to me that there is either (a) a broken link to svml, or (b) missing parts of that library, on the newer Cygwin installs. I have searched extensively, to the best of my ability, for ways to reinstate that library, but it appears to be an intrinsic part of the GNU compiler. Did the GNU compiler, in fact, drop support for this library? If not, then I surmise that I need to repair either the library or the files that link to it. In that case, where is this library available? Which files should I repair and how?

I recognize, though, that there is a distinct possibility that I'm barking up the wrong tree and would be happy to be set straight on this if that's the case. Where should I be looking?

È stato utile?

Soluzione

The site corresponding to your link for gfortran 4.8.1 reads for -mveclibabi:

To use this option, both -ftree-vectorize and -funsafe-math-optimizations 
have to be enabled, and an SVML or ACML ABI-compatible library must be 
specified at link time. 

The same holds true for versions 4.7.1 and 4.7.2.

My guess is that you need to have the Intel MKL installed (and the environment set up) and link against it. Additionally, you need to specify -funsafe-math-optimizations.

Or, you could drop -mveclibabi=svml and use the gfortran vectorizing intrinsics.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top