[petsc-users] How petsc build openmpi using clang on Mavericks

Satish Balay balay at mcs.anl.gov
Thu Jan 9 21:35:04 CST 2014


On Thu, 9 Jan 2014, Shiyuan wrote:

> Hi,
>   I am on  OS Mavericks and using the gcc in Xcode 5.02. I configured petsc
>  using the following options and installed petsc successfully. Petsc also
> downloaded and installed openmpi successfully.
> 
> However, when I go to the
> $PETSC_DIR/$PETSC_ARCH/externalpackages/openmpi-1.6.4 and and run configure
> with the same options(found in openmpi-1.6.4/config.log), the configuration
> of openmpi failed due to the test for c compiler failed:
> 
> checking for gcc... gcc
> 
> checking whether the C compiler works... no
> 
> configure: error: in `/Users/shiyuangu/softwares/openmpi/1.6.4':
> 
> configure: error: C compiler cannot create executables

you'll have to check the details in config.log to see why this test fails.

> 
> When petsc configure openmpi, does petsc use clang too? If so, how does
> petsc build openmpi using clang? configure.log is attached.

PETSc is not doing anyting special for this machine. Its building openmpi using:

>>>
Executing: cd /Users/shiyuangu/softwares/petsc/dbg/externalpackages/openmpi-1.6.4 && ./configure --prefix=/Users/shiyuangu/softwares/petsc/dbg --with-rsh=ssh MAKE=/usr/bin/make CC="gcc" CFLAGS=" -fPIC -Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas  -O0 " --enable-shared CXX="g++" CXXFLAGS=" -Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas  -O0   -fPIC  " --disable-mpi-f77 --disable-mpi-f90 F77="" FC="" --disable-vt
<<<<<

On Mavericks/Xcode-5.02 /usr/bin/gcc is clang compiler - not GNU compiler.
[eventhoug the name 'gcc' is misleading]

>>>
Executing: gcc --version
stdout:
Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
<<<<

Satish


More information about the petsc-users mailing list