1 Reply Latest reply on Mar 11, 2013 8:52 AM by chipf

    Problem in accessing the ACML library using Intel Fortran Compiler

    lsloneil

      I'm compiling my C++ code that is using ACML and I'm accessing ACML on a linux machine with Intel Fortran compiler. My makefile is like this:

       

      INCL    =   -I/usr/lib/gcc/x86_64-redhat-linux/4.4.6/include -I/share/apps/acml/ifort64_mp_int64/include\

                  -I/share/apps/intel/composer_xe_2013.2.146/compiler/include/intel64

      LIB     =   -L/usr/lib/gcc/x86_64-redhat-linux/4.4.6  -L/share/apps/acml/ifort64_mp_int64/lib -L/share/apps/intel/composer_xe_2013.2.146/compiler/lib/intel64

      CFLAGS = -O3 -ffast-math -fopenmp -funroll-loops -fstrict-aliasing -D__LOWMEM -D__ACML  -lacml_mp

      CC      = /usr/bin/gcc

      LIBS =  -lstdc++ -lm

       

      The final program was complied using

      $(CC)   $(CFLAGS) $(PB_OBJS) $(LIB) $(LIBS) -o runpb $(LINK)

       

      And for each object (PB_OBJS) the final program depends on, it was also compiled with

      $(CC) $(CFLAGS) $(INCL) -c

       

      The compilation process goes smoothly. However, when I try to run the program 'runpb', the error message shows:

       

      error while loading shared libraries: libacml_mp.so: cannot open shared object file: No such file or directory

       

      Apparently the library file 'libacml_mp.so' is already in the path (red) I specified in the LIB macro, and I've also added /share/apps/acml/ifort64_mp_int64/lib to my LD_LIBRARY_PATH. So I don't quite understand why there can be such kind of problem. Could any one help me with this issue? Thanks a lot.

        • Re: Problem in accessing the ACML library using Intel Fortran Compiler
          chipf

          Everything looks right as far as I can tell.

           

          Use the ldd command on your executable.  It should tell you where it is finding all the libraries needed, but will likely tell you that it can't find libacml_mp.so.

           

          How are you setting LD_LIBRARY_PATH?   Verify that the acml lib directory really is in LD_LIBRARY_PATH when the executable is run.

           

          As a last resort (or maybe it should be the first step), try running the ACML examples.  There are some C++ examples that use a similar build process.