On Mon, Apr 19, 2010 at 9:11 AM, Jeff Squyres
<jsquyres@cisco.com> wrote:
On Apr 16, 2010, at 12:05 PM, Baowei Liu wrote:
> Thanks for your reply. Sorry I didn't make it clear..... When I run config.guess of gcc, it gives me the x86_64 system. But when I run "uname -a", it says it's i386. I think that's the reason OMPI complains about "more than one -arch option (not allowed, use cc(1) instead)".
What do you mean? I don't think you've mentioned that before...?
I thought it's in the make.out. But I just noticed the make error messages wouldn't show in the make.out file. I gave the information here:
as: more than one -arch option (not allowed, use cc(1) instead)
make[2]: *** [coll_hierarch.lo] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all-recursive] Error 1
> The new gcc can create executibals. I use it to compile my own c++ programs. And I don't need special flags. I need a higher version of gcc than the default one just because I cannot build a package (QE:Quantum Espresso) with the default gcc -- QE uses OMPI. I can install OMPI with the default gcc. I tried this:
>
> 1. install OMPI with default gcc and OMPI works fine.
> 2. install the new gcc and install the QE package, successfully.
> 3. mpirun stops working with eorror" cannot initialize"
This is the first time you've mentioned this, too. :-)
Did you re-install Open MPI with the new gcc (and no -m flags, etc.)? If that doesn't work, please send all the information listed here:
http://www.open-mpi.org/community/help/
Sorry I didn't give you such details in my first email. I tried what you said--the tarball attached to this email includes the configure and make
output information:
./configure --prefix=/usr/local/openmpi | tee config.out
sudo make all > make.out
The same error appeared:
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../../../../../ompi/mca/coll/hierarch -I../../../../opal/include -I../../../../orte/include -I../../../../ompi/include -I../../../../opal/mca/paffinity/linux/plpa/src/libplpa -I../../../../.. -I../../../.. -I../../../../../opal/include -I../../../../../orte/include -I../../../../../ompi/include -D_REENTRANT -O3 -DNDEBUG -finline-functions -fno-strict-aliasing -fvisibility=hidden -MT coll_hierarch.lo -MD -MP -MF .deps/coll_hierarch.Tpo -c ../../../../../ompi/mca/coll/hierarch/coll_hierarch.c -fno-common -DPIC -o .libs/coll_hierarch.o
as: more than one -arch option (not allowed, use cc(1) instead)
make[2]: *** [coll_hierarch.lo] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all-recursive] Error 1
As I said, I tried to get rid of this error by setting "-arch" option when configure, like:
./configure --prefix=/usr/local/openmpi CFLAGS="-arch x86_64" CXXFLAGS="-arch x86_64" FCFLAGS="-m64 -arch x86_64" FFLAGS="-m64 -arch x86_64"
But it complains this:
*** C compiler and preprocessor
checking for style of include used by make... GNU
checking for gcc... gcc
checking for C compiler default output file name...
configure: error: C compiler cannot create executables
Thanks again for your help!
--