On Jun 29, 2011, at 11:31 AM, rohan nigam wrote:

> I am trying to statically build open mpi libraries from a server which has 
> intel and pgi compilers installed and copy the resulting binaries to be used 
> on another test server since I do not have intel and pgi compilers on these 
> test servers (only gcc). First of all, please tell me if this is possible.

I know that it is for intel.  I don't know if it is for pgi (meaning: I don't 
have enough experience with pgi to know).

> So far these are the three different options I have tried and ended up 
> getting the respective errors while running the mpicc or mpirun on the test 
> server:

It's not quite clear from your text -- it looks like you have a combination of 
"not able to build the OMPI tree" and "able to build/install the OMPI tree, but 
then failed when tryng to use it" errors.  Right?

> Option 1:  Using LDFLAGS=-Bstatic
> 
> ./configure CC=icc CXX=icpc F77=ifort FC=ifort LDFLAGS=-Bstatic 
> --without-memory-manager --without-libnuma --enable-static --disable-shared  
> --prefix=/opt/openmpi/openmpi-intel --enable-mpi-f77 --enable-mpi-f90 2>&1 | 
> tee configure-intel.log
> 
> Error on the test server:
>          ld: attempted static link of dynamic object 
> `/cm/shared/apps/torque/2.4.11/lib/libtorque.so'
> make[2]: *** [orte-clean] Error 1

This one is pretty clearly a "not able to build the OMPI tree" error, assumedly 
on the machine with the compilers.

This means that you don't have libtorque.a.  When you use -Bstatic (IIRC), you 
need *all* support libraries to have .a (i.e., static) versions.

Alternatively, you *might* be able to just to --enable-static --disable-shared. 
 This will make Open MPI be fully static, but not necessarily its support 
libraries.  That being said, that might not suit your needs, since the 
compilers will have some support libraries.  See below.

> Option 2: Using LDFLAGS= -static

I'm assuming that you were able to build/install, but then failed when trying 
to run on the 2nd server.

> Error on the test server: 
>                                                  
> root@ubuntu-server2:/opt/openmpi-intel/bin# ./mpicc
> Cannot open configuration file 
> /opt/openmpi/openmpi-intel/share/openmpi/mpicc-wrapper-data.txt

Does this file exist on your 2nd server?  When you copy/move/whatever the OMPI 
installation to the 2nd server, it is easiest to put it in exactly the same 
location as you installed it on the 1st server.

> Error parsing data file mpicc: Not found
> root@ubuntu-server2:/opt/openmpi-intel/bin# mpirun
>                                     mpirun: error while loading shared 
> libraries: libtorque.so.2: cannot open shared object file: No such file or 
> directory

Do you have the torque libraries installed on your compute nodes?

Open MPI uses them for launching / monitoring jobs (i.e., it uses native torque 
support, which means that you need to have libtorque.so installed on the 
back-end nodes, or you need to have libtorque.a available when you're building 
OMPI so that libtorque.so isn't necessary at run-time).

> Option 3: LDFLAGS=-static-intel (same as deprecated i-static option)
> Error on the test server
>                              mpirun: error while loading shared libraries: 
> libtorque.so.2:   cannot open shared object file: No such file or directory
>                                                  
> root@ubuntu-server2:/opt/openmpi-intel/bin# ./mpicc
> Cannot open configuration file 
> /opt/openmpi/openmpi-intel/share/openmpi/mpicc-wrapper-data.txt
> Error parsing data file mpicc: Not found

This looks like pretty much the same as option 2, but I think this is the 
option that you want (i.e., make the intel support libraries be static, let 
everything else be whatever it wants to be).

If you fix the libtorque.so issue that I mentioned in #2, then #3 might be the 
best option for you.

> How do I exclude torque shared libraries. Will that solve the problem?
> 
> FYI, both servers (test and the original server) are 64-bit AMD opterons and 
> the openmpi works perfectly fine on the original server on which they were 
> built on.
> 
> Any comments or suggestions will help.
> 
> Thanks,
> Rohan
> _______________________________________________
> users mailing list
> us...@open-mpi.org
> http://www.open-mpi.org/mailman/listinfo.cgi/users


-- 
Jeff Squyres
jsquy...@cisco.com
For corporate legal information go to:
http://www.cisco.com/web/about/doing_business/legal/cri/


Reply via email to