On Fri, Apr 16, 2010 at 6:28 AM, Jeff Squyres <jsquy...@cisco.com> wrote:

> On Apr 15, 2010, at 10:09 PM, Baowei Liu wrote:
>
> > Thanks a lot for your reply, Jeff!  I think I figure out why I got this
> trouble but am still looking for a way to work around it. The Mac I have has
> a 64-bit processor but its kernel is 32-bit. When I installed gnu-gcc, it
> identified the architecture as x86_64--I cannot install it if I force it to
> be i386. But the OMPI treat the arch as i386. If I try to force it to be
> x86_64, I got the problem I mentioned before....
>
> I'm not sure I understand the issue -- are you saying that gcc can't create
> executables?  I.e., does this not work:
>
> -----
> % cat > hello.c <<EOF
> #include <stdio.h>
> int main(int argc, char* argv[]) {
>    printf("Hello world\n");
>    return 0;
> }
> EOF
> % gcc hello.c -o hello
> % ./hello
> Hello world
> %
> -----
>
> If that works, then you should just be able to do a default configure/make
> of Open MPI.  If it doesn't work -- e.g., if the "hello" executable that is
> produced is not runnable on your machine, then you probably need to supply
> some additional flags to gcc.  Once you figure out what those flags are,
> pass the same flags to Open MPI's configure.
>
> I'd be pretty surprised if the default gcc build doesn't work for you
> (e.g., the "hello world" example, above), though.
>
> --
> Jeff Squyres
> jsquy...@cisco.com
> For corporate legal information go to:
> http://www.cisco.com/web/about/doing_business/legal/cri/
>
>
> _______________________________________________
> users mailing list
> us...@open-mpi.org
> http://www.open-mpi.org/mailman/listinfo.cgi/users
>

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)".

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"

Reply via email to