私のマシンにはMPICH 3.0.4がインストールされています (Ubuntu 12.04)。Qthreadsと呼ばれるライブラリをインストールしようとしていますが、これは以前に使用して正常にインストールしたものです (MPICH2 パッケージがインストールされている場合を除く)。構成は正常に機能します。
./configure --prefix=/usr/local/qthreads --enable-multinode --with-multinode-runtime=mpi --with-portals4=/usr/local/portals4 --with-hwloc=/usr/local/hwloc
:
...
...
...
System Characteristics:
Target Style: unix
Multi-node: yes, mpi
Topology API: hwloc
Qtimer type: clock_gettime
Aligned_t size: 8 (aligned on 8 byte boundaries)
Default Stack size: 4kB
Safety/Debugging:
Sanity assert()s: no
Check alignment: no
Profiling: none
Debugging Output: no
Guard Pages: no
Speed:
Scheduler: sherwood (multiworker shepherds)
Sinc Style: donecount
Barrier Style: feb
Dictionary Style: simple
Lazy Thread IDs: yes
Pools/caches: memory, spawns
RCRTool: no
Increments/CAS/FEBs: Compiler Builtin (both), lock-based hash
を実行しようとするとmake
、次のエラーが表示されます。
...
...
...
CCLD libqthread.la
/usr/bin/ld: /usr/local/lib/libmpich.a(barrier.o): relocation R_X86_64_32 against `MPIR_ThreadInfo' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libmpich.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[2]: *** [libqthread.la] Error 1
make[2]: Leaving directory `/home/alex/Downloads/qthread-1.9/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/alex/Downloads/qthread-1.9/src'
make: *** [all-recursive] Error 1
私は周りを見回しましたが、明らかな(そして可能な唯一の)解決策は、コンパイラーが言うことを行うことです:recompile with -fPIC
. ただし、Qthreads の Makefile は長くて複雑なので、調べて編集するのをためらっています。で再コンパイルする簡単な方法はあり-fPIC
ますか?
お知らせ下さい。ご意見をお待ちしております。