Forum Jump

Select Group :
Select Forum :
Sorted By :
Sort Order :
From The :
 
Thread Tools  Search this thread 
karpen
November 2, 2009 8:58 AM PST
MPICH2 install problem
Hi, I am trying to install and compile MPICH2 v1.2 on my Mac running OS10.5.8, and am running into a problem involving different versions of ifort vs gcc. When I run the script that comes with MPICH2 to compile it with the Intel Fortran compiler, I get the following error message: configure: error: ****  Incompatible Fortran and C Object File Types!  ****
F77 Object File Type produced by "ifort  -O2" is : : Mach-O 64-bit object x86_64.
C  Object File Type produced by "gcc  -O2" is : : Mach-O object i386.

Apparently the built-in C++ compiler option is for 32-bit machines, but this is a 64-bit machine (Quad-Core Intel Xeon chips). Ifort recognizes this but Apple's gcc does not.

I have a license for Intel Fortran but not for the C++ compiler because I never write code in C++. Can this problem be solved by installing a different version of gcc than is automatically installed with the OS (and is that really a good idea), by somehow changing the gcc compiler options so it will recognize 64-bit applications (ditto), or it the only solution to buy Intel's C++ compiler? Thanks alot for your help!
Ronald W. Green (Intel)
Total Points:
11,727
Status Points:
11,227
Brown Belt
November 2, 2009 9:09 AM PST
Rate
 
|Best Answer
#1
Quoting - karpen
Hi, I am trying to install and compile MPICH2 v1.2 on my Mac running OS10.5.8, and am running into a problem involving different versions of ifort vs gcc. When I run the script that comes with MPICH2 to compile it with the Intel Fortran compiler, I get the following error message: configure: error: ****  Incompatible Fortran and C Object File Types!  ****
F77 Object File Type produced by "ifort  -O2" is : : Mach-O 64-bit object x86_64.
C  Object File Type produced by "gcc  -O2" is : : Mach-O object i386.

Apparently the built-in C++ compiler option is for 32-bit machines, but this is a 64-bit machine (Quad-Core Intel Xeon chips). Ifort recognizes this but Apple's gcc does not.

I have a license for Intel Fortran but not for the C++ compiler because I never write code in C++. Can this problem be solved by installing a different version of gcc than is automatically installed with the OS (and is that really a good idea), by somehow changing the gcc compiler options so it will recognize 64-bit applications (ditto), or it the only solution to buy Intel's C++ compiler? Thanks alot for your help!

the gcc and g++ compilers take -m64 and -m32 to choose 64bit or 32bit.  So use -m64 for CFLAGS and CXXFLAGS when you build mpich2 if you want it to create 64bit binaries.

ron



karpen
November 2, 2009 2:21 PM PST
Rate
 
#2 Reply to #1

the gcc and g++ compilers take -m64 and -m32 to choose 64bit or 32bit.  So use -m64 for CFLAGS and CXXFLAGS when you build mpich2 if you want it to create 64bit binaries.

ron

Thanks for the help Ron! If I had read the README thoroughly, I would have answered most of my own question. It is not obvious how to implement the above however, so for anyone else in this situation, here is what you have to do: add the options "CFLAGS=-m64 CXXFLAGS=-m64" to the ./configure command mentioned in the install instructions and the README file.




Intel Software Network Forums Statistics

8458 users have contributed to 31571 threads and 100533 posts to date.
In the past 24 hours, we have 17 new thread(s) 131 new posts(s), and 152 new user(s).

In the past 3 days, the most popular thread for everyone has been gemm(A,A,A) like possible? The most posts were made to gemm(A,A,A) like possible? The post with the most views is Quoting - rase if (k.eq.0

Please welcome our newest member soundmyth