Compiling another program with mpicc using a non default compiler
I am trying to compile a program with mpicc. To compile I use:
CC=/usr/bin/mpicc ./configure However mpicc's default C compiler is gcc 4.4.2 and I need to use 4.0.0 which I have installed in another directory. I do not (nor can get) root privileges so I cannot edit mpicc's default compiler. Is there an option I can set while configuring? Thanks |
If you are using mpich, you should be able to use -cc=name on the command line or the environment variable MPICH_CC to select a different compiler. If using OpenMPI, setting the environment variable OMPI_CC should select a different compiler. However, gcc-4.4.2 was probably the compiler MPI was built with and using a different compiler can cause problems.
|
Suggest : Build a new locale openmpi, mpicc, with your local gcc-4.0 :
Something like : cd openmpi(-1.4.3)/ && ./configure CC=gcc-4.0 CXX=g++-4.0 --prefix=/home/Ztif .. |
All times are GMT -5. The time now is 05:45 PM. |