[petsc-dev] Build petsc-3.2 with "mpicc -cc=icc"
Satish Balay
balay at mcs.anl.gov
Tue Sep 6 17:39:13 CDT 2011
spaces cause cmake build grief. Hence this doesn't work on windows
aswell [for --with-cc='win32fe cl' etc..]..
[this type of compiler swapping is unsupported by us anyway]
Satish
On Tue, 6 Sep 2011, Lisandro Dalcin wrote:
> This is just a report from a little experiment, and wanted to throw
> the results here:
>
> I'm trying to build with Intel compiler re-using my distro's (Fedora
> 15) MPICH2 1.4 built with GCC. My configure command line was:
>
> $ cat arch-intel-c/conf/reconfigure-arch-intel-c.py
> #!/usr/bin/python
> if __name__ == '__main__':
> import sys
> import os
> sys.path.insert(0, os.path.abspath('config'))
> import configure
> configure_options = [
> '--COPTFLAGS=-O3',
> '--CXXOPTFLAGS=-O3',
> '--FOPTFLAGS=-O3',
> '--with-c2html=0',
> '--with-cc=mpicc -cc=icc',
> '--with-cxx=mpicxx -cxx=icpc',
> '--with-debugging=0',
> '--with-fc=mpif90 -fc=ifort',
> '--with-shared-libraries=1',
> 'PETSC_ARCH=arch-intel-c',
> ]
> configure.petsc_configure(configure_options)
>
>
> However, for some reason cmake failed to indentify de compiler, the
> relevant block from configure.log is pasted below. I'm wondering if
> the FILEPATH thing is the cause of the failure...
>
>
> Invoking: ['/usr/bin/cmake', '/home/devel/petsc/3.2',
> '-DCMAKE_C_COMPILER:FILEPATH=mpicc -cc=icc', '-DCMAKE_C_FLAGS:STRING=
> -fPIC -wd1572 -Qoption,cpp,--extended_float_type -O3',
> '-DCMAKE_Fortran_COMPILER:FILEPATH=mpif90 -fc=ifort',
> '-DCMAKE_Fortran_FLAGS:STRING= -fPIC -O3']
> sh: ['/usr/bin/cmake', '/home/devel/petsc/3.2',
> '-DCMAKE_C_COMPILER:FILEPATH=mpicc -cc=icc', '-DCMAKE_C_FLAGS:STRING=
> -fPIC -wd1572 -Qoption,cpp,--extended_float_type -O3',
> '-DCMAKE_Fortran_COMPILER:FILEPATH=mpif90 -fc=ifort',
> '-DCMAKE_Fortran_FLAGS:STRING= -fPIC -O3']
> Executing: ['/usr/bin/cmake', '/home/devel/petsc/3.2',
> '-DCMAKE_C_COMPILER:FILEPATH=mpicc -cc=icc', '-DCMAKE_C_FLAGS:STRING=
> -fPIC -wd1572 -Qoption,cpp,--extended_float_type -O3',
> '-DCMAKE_Fortran_COMPILER:FILEPATH=mpif90 -fc=ifort',
> '-DCMAKE_Fortran_FLAGS:STRING= -fPIC -O3']
> sh: -- The C compiler identification is unknown
> -- Check for working C compiler: mpicc -cc=icc
> -- Check for working C compiler: mpicc -cc=icc -- broken
> -- Configuring incomplete, errors occurred!
> ===============================================================================
> CMake process failed with status 256. Proceeding..
> ===============================================================================
>
>
> Anyway, configure continued and I was able to use the legacy make
> build, with a lot of outputs like the one below:
>
> $ make
> ...
> libfast in: /home/devel/petsc/3.2/src/mat/impls/transpose
> icc: command line warning #10120: overriding '-O2' with '-O3'
> libfast in: /home/devel/petsc/3.2/src/mat/impls/transpose/ftn-auto
> icc: command line warning #10120: overriding '-O2' with '-O3'
> libfast in: /home/devel/petsc/3.2/src/mat/impls/python
> icc: command line warning #10120: overriding '-O2' with '-O3'
> ...
>
> Anyway, "make test" worked (however, it generated a bogus error
> because the compiler complained with the same line as above)
>
> My "ldd" output looks a bit messy, and despite using ICC and having
> MKL available, configure didn't pick MKL (perhaps this could be a nice
> feature?)
>
> $ ldd arch-intel-c/lib/libpetsc.so
> linux-vdso.so.1 => (0x00007fff411ff000)
> libX11.so.6 => /usr/lib64/libX11.so.6 (0x00007ff103dce000)
> liblapack.so.3 => /usr/lib64/atlas/liblapack.so.3 (0x00007ff1035a0000)
> libblas.so.3 => /usr/lib64/libblas.so.3 (0x00007ff10334a000)
> libdl.so.2 => /lib64/libdl.so.2 (0x00007ff103145000)
> libmpich.so.3 => /usr/lib64/mpich2/lib/libmpich.so.3 (0x00007ff102d60000)
> libopa.so.1 => /usr/lib64/mpich2/lib/libopa.so.1 (0x00007ff102b5f000)
> libmpl.so.1 => /usr/lib64/mpich2/lib/libmpl.so.1 (0x00007ff10295a000)
> librt.so.1 => /lib64/librt.so.1 (0x00007ff102752000)
> libpthread.so.0 => /lib64/libpthread.so.0 (0x00007ff102537000)
> libimf.so => /opt/intel/composerxe-2011.4.191/compiler/lib/intel64/libimf.so
> (0x00007ff102151000)
> libsvml.so => /opt/intel/composerxe-2011.4.191/compiler/lib/intel64/libsvml.so
> (0x00007ff101a9e000)
> libcilkrts.so.5 =>
> /opt/intel/composerxe-2011.4.191/compiler/lib/intel64/libcilkrts.so.5
> (0x00007ff101874000)
> libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00007ff10156c000)
> libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007ff101357000)
> libirc.so => /opt/intel/composerxe-2011.4.191/compiler/lib/intel64/libirc.so
> (0x00007ff101207000)
> libmpichf90.so.3 => /usr/lib64/mpich2/lib/libmpichf90.so.3 (0x00007ff101004000)
> libifport.so.5 =>
> /opt/intel/composerxe-2011.4.191/compiler/lib/intel64/libifport.so.5
> (0x00007ff100ecb000)
> libifcore.so.5 =>
> /opt/intel/composerxe-2011.4.191/compiler/lib/intel64/libifcore.so.5
> (0x00007ff100c6a000)
> libm.so.6 => /lib64/libm.so.6 (0x00007ff1009e5000)
> libintlc.so.5 =>
> /opt/intel/composerxe-2011.4.191/compiler/lib/intel64/libintlc.so.5
> (0x00007ff100895000)
> libc.so.6 => /lib64/libc.so.6 (0x00007ff1004fb000)
> libxcb.so.1 => /usr/lib64/libxcb.so.1 (0x00007ff1002df000)
> libgfortran.so.3 => /usr/lib64/libgfortran.so.3 (0x00007ff0fffc9000)
> libf77blas.so.3 => /usr/lib64/atlas/libf77blas.so.3 (0x00007ff0ffdac000)
> libcblas.so.3 => /usr/lib64/atlas/libcblas.so.3 (0x00007ff0ffb8b000)
> /lib64/ld-linux-x86-64.so.2 (0x0000003104400000)
> libXau.so.6 => /usr/lib64/libXau.so.6 (0x00007ff0ff988000)
> libquadmath.so.0 => /usr/lib64/libquadmath.so.0 (0x00007ff0ff752000)
> libatlas.so.3 => /usr/lib64/atlas/libatlas.so.3 (0x00007ff0fef6b000)
>
>
>
More information about the petsc-dev
mailing list