[petsc-dev] Fortran libraries cannot be used with C++ compiler

Satish Balay balay at mcs.anl.gov
Tue Apr 1 11:39:44 CDT 2014


On Tue, 1 Apr 2014, Pierpaolo Minelli wrote:

> I am a fortran programmer so, i don’t know how to check this. 
> I have the latest suite of Intel Compiler. (Intel Cluster Studio XE 2013).
> Which type of check can i do to see if it is working c++ compiler?

The error is from intel MPI [not necessarily the C++ compiler]

> In the configure.log, it seems that some sources are compiled while this no, or i have seen wrong?

Its possible that intel compilers/mpi should be used in a perticular
way - otherwise things break.

However I see you are using:

Configure Options: --configModules=PETSc.Configure --optionsModule=PETSc.compilerOptions --PETSC_DIR=/raid0/users/cscppm59/Installers/petsc --PETSC_ARCH=petsc_dev --with-debugger=idbc --with-cc=mpiicc --with-cxx=mpiicpc --with-fc=mpiifort --CFLAGS="-openmp -parallel" --FFLAGS="-ftz -O3 -prec-div -xSSE2 -mcmodel medium -shared-intel -openmp -parallel -fpp" --with-large-file-io=1 --with-debugging=0 --with-mpiexec="mpirun -f ~/mpd.hosts -r ssh" --with-blas-lapack-dir=/opt/intel/mkl/lib/intel64/ --with-threadcomm --with-openmp --with-x=0 --download-superlu_dist --download-parmetis -download-hypre -download-ml --download-metis

Do you need all the options? Esp -with-threadcomm --with-openmp CFLAGS="-openmp -parallel"  etc? Or is it that you assumed
this is the way to get max performance off these MPI compilers?

Unless you really need these features - I'll suggest removing them.

also you can try the addtional options - and see if it makes a difference.

--with-clib-autodetect=0 --with-fortranlib-autodetect=0 --with-cxxlib-autodetect=0 LIBS="-Bstatic -lifcore -Bdynamic"

However - if you are developing code - and not doing performance runs
[say on a cluster] - its best to build with  gcc/gfortran and --download-mpich.

Satish


More information about the petsc-dev mailing list