我正在尝试使用 Rmpi 编写程序,不幸的是,所需的符号未定义,并且使用 otool 和 nm 跟踪它似乎只是引导我到libmpich.3.3.dylib
. 不幸的是,符号MPI_Comm_dup
, 在这个动态库中是未定义的。
但是,我不是 OSX 动态库方面的专家,我想知道我的方法和结论是否正确。此外,我愿意接受任何解决此问题的建议。
谢谢,
Error : .onLoad failed in loadNamespace() for 'Rmpi', details:
call: dyn.load(file, DLLpath = DLLpath, ...)
error: unable to load shared object '/home/jonathan.lisic/R/x86_64-apple-darwin12.2.0-library/2.15/Rmpi/libs/x86_64/Rmpi.so':
dlopen(/home/jonathan.lisic/R/x86_64-apple-darwin12.2.0-library/2.15/Rmpi/libs/x86_64/Rmpi.so, 6): Symbol not found: _MPI_Comm_dup
Referenced from: /opt/local/lib/libmpich.3.3.dylib
Expected in: flat namespace
in /opt/local/lib/libmpich.3.3.dylib
Error: package/namespace load failed for Rmpi
jonathan.lisic@server:/opt/local$ otool -L /home/jonathan.lisic/R/x86_64-apple-darwin12.2.0-library/2.15/Rmpi/libs/x86_64/Rmpi.so
/home/jonathan.lisic/R/x86_64-apple-darwin12.2.0-library/2.15/Rmpi/libs/x86_64/Rmpi.so:
Rmpi.so (compatibility version 0.0.0, current version 0.0.0)
/opt/local/lib/libmpich.3.3.dylib (compatibility version 0.0.0, current version 3.0.0)
/opt/local/lib/libmpl.1.dylib (compatibility version 3.0.0, current version 3.0.0)
/opt/local/lib/libopa.1.dylib (compatibility version 2.0.0, current version 2.0.0)
/opt/local/lib/R/lib/x86_64/libR.dylib (compatibility version 2.15.0, current version 2.15.1)
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1669.0.0)
/opt/local/lib/gcc45/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 169.3.0)
jonathan.lisic@server:/opt/local/lib$ otool -L libmpich.dylib
libmpich.dylib:
/opt/local/lib/libmpich.3.3.dylib (compatibility version 0.0.0, current version 3.0.0)
/opt/local/lib/gcc43/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 169.3.0)
jonathan.lisic@server:/opt/local/lib$ otool -L libmpich.3.3.dylib
libmpich.3.3.dylib:
/opt/local/lib/libmpich.3.3.dylib (compatibility version 0.0.0, current version 3.0.0)
/opt/local/lib/gcc43/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 169.3.0)
jonathan.lisic@server:/opt/local/lib$ nm -u libmpich.3.3.dylib | egrep dup
_MPI_Comm_dup
_MPL_trstrdup
_dup2
_strdup