LoginSignup
0
0

More than 5 years have passed since last update.

GAMESS > setup > Error:undefined reference to `dlopen'

Last updated at Posted at 2017-08-28
動作環境
Xeon E5-2620 v4 (8コア) x 2
32GB RAM
CentOS 6.8 (64bit)
openmpi-1.8.x86_64 とその-devel
mpich.x86_64 3.1-5.el6とその-devel
gcc version 4.4.7 (とgfortran)
NCAR Command Language Version 6.3.0
WRF v3.7.1を使用。
Python 2.6.6 (r266:84292, Aug 18 2016, 15:13:37) 
Python 3.6.0 on virtualenv
GAMESS version:20 Apr 2017(R1)
Intel Math Kernel Library version 12

量子化学計算のGAMESS
http://www.msg.ameslab.gov/gamess/index.html

Intel Math Kernel Libraryを用いた計算設定をしている。

セットアップにおいて、lked実行時に以下のようなエラーが出る。

/opt/intel/mkl/lib/intel64/libmkl_core.a(mkl_memory_patched.o): In function `mm_cleanup_thread_cbk':
mkl_memory.c:(.text+0xa7ef): undefined reference to `dlopen'
mkl_memory.c:(.text+0xa810): undefined reference to `dlsym'
mkl_memory.c:(.text+0xa85e): undefined reference to `dlsym'
mkl_memory.c:(.text+0xa874): undefined reference to `dlsym'
mkl_memory.c:(.text+0xa88a): undefined reference to `dlsym'
mkl_memory.c:(.text+0xa97f): undefined reference to `dlerror'
mkl_memory.c:(.text+0xa9d2): undefined reference to `dlopen'
mkl_memory.c:(.text+0xaa86): undefined reference to `dlopen'
mkl_memory.c:(.text+0xaa9c): undefined reference to `dlerror'
mkl_memory.c:(.text+0xab60): undefined reference to `dlopen'
mkl_memory.c:(.text+0xab68): undefined reference to `dlerror'
mkl_memory.c:(.text+0xab7d): undefined reference to `dlsym'
mkl_memory.c:(.text+0xaba0): undefined reference to `dlopen'
mkl_memory.c:(.text+0xaba8): undefined reference to `dlerror'
mkl_memory.c:(.text+0xabb8): undefined reference to `dlsym'
mkl_memory.c:(.text+0xabd3): undefined reference to `dlerror'

https://software.intel.com/en-us/forums/intel-math-kernel-library/topic/621814
によると-ldlが必要とのこと。

lkedファイルの543行あたり(case mklのcase 12の場合)において以下がある。

          if ($GMS_FORTRAN == gfortran) set iflib=gf
          set MATHLIBS="-Wl,--start-group"
          set MATHLIBS="$MATHLIBS $mpath/libmkl_${iflib}_ilp64.a "
          set MATHLIBS="$MATHLIBS $mpath/libmkl_sequential.a "
          set MATHLIBS="$MATHLIBS $mpath/libmkl_core.a "
          set MATHLIBS="$MATHLIBS -Wl,--end-group"

下記のように-ldlを追加した。

          if ($GMS_FORTRAN == gfortran) set iflib=gf
          set MATHLIBS="-Wl,--start-group"
          set MATHLIBS="$MATHLIBS $mpath/libmkl_${iflib}_ilp64.a "
          set MATHLIBS="$MATHLIBS $mpath/libmkl_sequential.a "
          set MATHLIBS="$MATHLIBS $mpath/libmkl_core.a "
          set MATHLIBS="$MATHLIBS -Wl,--end-group"
          set MATHLIBS="$MATHLIBS -ldl" # added 2017/08/28

lkedを実行するとエラーがでなくなり、games.00.xが生成された。

$lked
...
Linker messages (if any) follow...

The linking of GAMESS to binary gamess.00.x was successful.
0.436u 0.156s 0:00.60 96.6% 0+0k 0+90752io 0pf+0w
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0