You are here

Can I use rosetta binaries built in one linux system to another linux system?

2 posts / 0 new
Last post
Can I use rosetta binaries built in one linux system to another linux system?
#1

Dear Friends,

 

I have successfully built "mpi" binaries on my ubuntu 18.04. I want to run rosetta on my centos6.9 (with "Openmpi") machine too; can I simply copy the binaries from my ubuntu to centos  and run rosetta using "mpi" there? thank you!

 

 

Category: 
Post Situation: 
Wed, 2019-09-18 06:49
Danielsebas

Generally you can use Linux binaries compiled on one machine on a different one, but there's some important caveats here.

The big one is system library compatibility. Versions of Rosetta compiled on recent Linux versions often will use newer features of the system libraries (GLIBC) which aren't availible on older versions of the operating system. This is the first issue you'll encounter with compiling on Ubuntu 18.04 and moving to Centos 6.9. I happen to know that Centos 6 uses older versions of the system libraries, and 18.04 uses a newer version, and so Centos 6.9 isn't going to understand the Ubuntu 18.04 one.  (Going the other way is fine in this respect. The Ubuntu 18.04 version of GLIBC can understand the Centos 6.9 usage.)

Similar isues arise from the C++ standard libraries (GLIBCXX), but in this case it has to do with the compiler used, rather than the operating system itself. If you compiled with a newer compilier on 18.04 and then moved things to 6.9, if there isn't the libraries for the  newer compiler in the LD_LIBRARY_PATH, then you won't be able to use them. This is easier to fix than the GLIBC issue, as you "simply" need to install a newer compiler on the older system and make sure the LD_LIBRARY_PATH is set up correctly. (Again, it's *generally* the case that compiling on an older compiler and then moving to a system with a newer compiler works, though this is less general than the GLIBC case.)

The MPI compilation adds an additional wrinkle. You would need to make sure that the type and version of the MPI libraries on the system you're compiling on are compatible with the MPI system being used on the system you're transfering to. You can set things up such that this works, but it's something to be careful of. (And depending on the different systems, setting things up appropriately may be a hassle.)

The other issue I can think of off-hand is that the standard (dynamic) compilation of Rosetta is sensitive to moving directories. Even on the same system, if you move the Rosetta install from one directory to another it can have problems finding the various shared object files it needs to work properly. (The compilation hard-codes some paths in the binaries such that it can find the necessary files.) You can work around this by keeping the absoulte paths to the Rosetta build directory the same between different machines, or there's also a work-around with adding the appropriate paths in the Rosetta build directory to the LD_LIBRARY_PATH environment variable.

Wed, 2019-09-18 10:36
rmoretti