On Oct 6, 2016, at 9:56 AM, Aditya <adityasarma...@gmail.com> wrote:
> 
> I'm a senior year Computer Science student working on Parallel Clustering 
> Algorithms at BITS Pilani, India. I have a few questions about using mpicc 
> and mpicxx with multiple versions of gcc / g++. 
> 
> I am using Ubuntu 12.04 equipped with gcc 4.6.4. The currently installed 
> mpicc is bound to gcc4.6.4. I want mpicc to be bound with gcc-5 that I have 
> installed in my pc. 
> 
> Is there a way to do the binding to gcc as a compiler flag or something of 
> that sort. 
> 
> PS: Please do reply if you have a solution. I am unable to run a hybrid code 
> on my pc because of this issue. 

Especially with C++, the Open MPI team strongly recommends you building Open 
MPI with the target versions of the compilers that you want to use.  Unexpected 
things can happen when you start mixing versions of compilers (particularly 
across major versions of a compiler).  To be clear: compilers are *supposed* to 
be compatible across multiple versions (i.e., compile a library with one 
version of the compiler, and then use that library with an application compiled 
by a different version of the compiler), but a) there's other issues, such as 
C++ ABI issues and other run-time bootstrapping that can complicate things, and 
b) bugs in forward and backward compatibility happen.

The short answer is in this FAQ item: 
https://www.open-mpi.org/faq/?category=mpi-apps#override-wrappers-after-v1.0.  
Substituting the gcc 5 compiler may work just fine.

But the *safer* answer is that you might want to re-build Open MPI with the 
specific target compiler.

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

_______________________________________________
users mailing list
users@lists.open-mpi.org
https://rfd.newmexicoconsortium.org/mailman/listinfo/users

Reply via email to