Closed wxyhappy0201 closed 4 years ago
What is the complete output of: gcc -v gfortran -v mpifort -v mpicc -v which gcc which gfortran which mpifort which mpicc which mpicxx
1、gcc -v 2、gfortran -v 3、mpifort -v 4、mpicc -v 5、
You are not showing the final output (namely the version) of mpifort -v, but from what I can see you have gcc 7.x, but gfortran 5.x. The mismatch between versions is the source of the error. I guess you did something in the past to have different versions for gcc and gfortran, as this is not the standard when installing a fresh UB 18.04. It is easy to get gfortran-7 (it is perhaps already installed) and switch between versions of gfortran. However, you need to have openmpi compiled with that same gfortran version and this can be tricky and affect other apps. The immediate options that I can see:
./configure --with-mpi-dir=$mpiDir --with-debugging=0 --download-hypre --download-parmetis --download-metis --download-ptscotch --with-precision=double --with-shared-libraries=1 --with-scalar-type=real --with-fc=0 --with-fortran-bindings=0 --with-cc=$mpiCC --with-cxx=$mpiCXX CXX_LINKER_FLAGS=-Wl,--no-as-needed CFLAGS="-g -O2 -fPIC -fstack-protector-strong -Wformat -Werror=format-security" CXXFLAGS="-g -O2 -fPIC -fstack-protector-strong -Wformat -Werror=format-security" CPPFLAGS="-Wdate-time -D_FORTIFY_SOURCE=2" LDFLAGS="-Wl,-Bsymbolic-functions -Wl,-z,relro" MAKEFLAGS=w
I got it ,Thank you for your help!
Hi! I have been trying to compile Rheotool onto my OpenFOAM v.7 on ubuntu 18.04. I get an error when doing ./InstallPetsc, and my openFoam version is v.7 and there are only one version of openFoam on my ubuntu 18.04 also my gcc -v is 64 bit and gfortran is also 64 bit . here are the error messages: TESTING: checkFortranNameMangling from config.compilers Unknown Fortran name mangling: Are you sure the C and Fortran compilers are compatible? Perhaps one is 64 bit and one is 32 bit?