再openmpi官网找到解决方法,好像是和pbs的冲突
最简单的解决办法是 把/usr/local/lib/pbslib.a删掉或者改成其他名字,说白了就是废掉pbs,这样就可以编译成功openmpi鸟。
There are two possible solutions in Open MPI 1.0.x:
- Recompile your PBS implementation with "
-fPIC
" (or whatever the relevant flag is for your compiler to generate position-independent code) and re-install. This will allow Open MPI to generate dynamic plugins with the PBS/Torque libraries properly.PRO:Open MPI enjoys the benefits of shared libraries and dynamic plugins.
CON:Dynamic plugins can use more memory at run-time (e.g., operating systems tend to align each plugin on a page, rather than densely packing them all into a single library).
CON: This is not possible for binary-only vendor distributions (such as PBS Pro).
- Configure Open MPI to build a static library that includes all of its components. Specifically, all of Open MPI's components will be included in its libraries -- none will be discovered and opened at run-time. This does not affect user MPI code at all (i.e., the location of Open MPI's plugins is transparent to MPI applications). Use the following options to Open MPI's
configure
script:shell$ ./configure --disable-shared --enable-static ...
Note that this option only changes the location of Open MPI's default set of plugins (i.e., they are included in
libmpi
and friends rather than being standalone dynamic shared objects that are found/opened at run-time). This option does notchange the fact that Open MPI will still try to open other dynamic plugins at run-time.PRO:This works with binary-only vendor distributions (e.g., PBS Pro).
CON: User applications are statically linked to Open MPI; if Open MPI -- or any of its default set of components -- is updated, users will need to re-link their MPI applications.
Both methods work equally well, but there are tradeoffs; each site will likely need to make its own determination of which to use.
报错信息:没细看,
relocation R_X86_64_32S against `a local symbol' can not be used when making a shared object; recompile with -fPIC
|