Closed EdmundBenedict closed 3 years ago
Hi, sorry for the late response. There seems to be an issue with compiling HDF5 within hopr when using MPI. However, if the HDF5 is compiled manually (i.e. outside of hopr), everything works fine. I hope we can identify the issue and fix it soon. But this only causes the MPI error messages.
However, I cannot reproduce the persisting error message of "can not be used when making a PIE object; recompile with -fPIC". Could you please provide some more details?
I hope we can then find the issue.
Hi, thank you for your response.
I cloned the repository a week ago first, and have redownloaded it several times since then, so the repository should be up to date. In the first few tries, I did not alter the Cmake configuration at all, so it had the form:
CMAKE_BUILD_TYPE Release
CMAKE_INSTALL_PREFIX /home/edders/hopr/hopr
HOPR_YPLUSESTIMATOR OFF
LIBS_BUILD_CGNS ON
LIBS_BUILD_CGNS_INT 32
LIBS_BUILD_CGNS_TAG v3.4.1
LIBS_BUILD_HDF5 ON
LIBS_USE_MKL OFF
LIBS_USE_MPI ON
Although I have also tried with debug options, and yes, when I set LIBS_BUILD_HDF5 = OFF the MPI errors disappear. The Cmake version I use is 3.10.2 and the compiler is gfortran-5.5.0
-- The C compiler identification is GNU 5.5.0 -- Check for working C compiler: /home/linuxbrew/.linuxbrew/bin/cc -- Check for working C compiler: /home/linuxbrew/.linuxbrew/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Looking for sys/types.h -- Looking for sys/types.h - found -- Looking for stdint.h -- Looking for stdint.h - found -- Looking for stddef.h -- Looking for stddef.h - found -- Check size of long -- Check size of long - done -- Check size of off_t -- Check size of offt - done -- The Fortran compiler identification is GNU 5.5.0 -- Check for working Fortran compiler: /home/linuxbrew/.linuxbrew/bin/gfortran -- Check for working Fortran compiler: /home/linuxbrew/.linuxbrew/bin/gfortran -- works -- Detecting Fortran compiler ABI info -- Detecting Fortran compiler ABI info - done -- Checking whether /home/linuxbrew/.linuxbrew/bin/gfortran supports Fortran 90 -- Checking whether /home/linuxbrew/.linuxbrew/bin/gfortran supports Fortran 90 -- yes -- Detecting Fortran/C Interface -- Detecting Fortran/C Interface - Found GLOBAL and MODULE mangling -- Fortran name mangling convention: LOWERCASE -- Testing Fortran Fortran2003 - OK -- Testing Fortran Fortran2008TS - OK -- Testing Fortran Fortran2008 - OK -- Testing Fortran Sizeof_int - OK -- Testing Fortran FortranConcat - Fail -- Performing Test CHECK_HAVE_STAT64_STRUCT -- Performing Test CHECK_HAVE_STAT64_STRUCT - Failed -- Configuring done -- Generating done -- Build files have been written to: /home/edders/hopr/hopr/share/GNU-MPI/CGNS/build/src/cgns-build
I apologise for the delay in my response, Edmund
Hi, sorry for my late response. I tried to compile hopr with your CMake settings and also with CMake 3.1.2 and the GNU 5 Compiler on Ubuntu 20.04 and with the standard 7.3 Compiler on Ubuntu 18.04. Unfortunately, I could not reproduce the error; all cases I've tried worked fine with LIBS_BUILD_HDF5=OFF. So there seems to be something strange going on. There are some ideas I have left:
-DCMAKE_INSTALL_PREFIX=INSERT_HERE_YOUR_WANTED_PATH/ -DCGNS_ENABLE_FORTRAN=ON -DCGNS_BUILD_SHARED=OFF -DCGNS_USE_SHARED=OFF -DCMAKE_BUILD_TYPE=Release -DCGNS_BUILD_CGNSTOOLS=OFF -DCGNS_ENABLE_HDF5=OFF -DCGNS_ENABLE_PARALLEL=OFF -DCGNS_ENABLE_TESTS=OFF -DCMAKE_SKIP_RPATH=ON
I hope something helps. Please keep us posted.
Thank you for all of your help! The old CMake configuration from commit 0aa58a9 runs fine, with no issues in compilation even with HOPR_BUILD_HDF5 and HOPR_BUILD_CGNS on, and all the tutorials seem to run fine with the resultant binary. About gcc, it is slightly strange: when I call "gcc --version" it outputs 5.5.0, but I have gcc-7 installed, although the compiler seems to link to gcc-7 in the CMake configuration file:
CMAKE_C_COMPILER /usr/bin/cc
CMAKE_C_COMPILER_AR /usr/bin/gcc-ar-7
CMAKE_C_COMPILER_RANLIB /usr/bin/gcc-ranlib-7
... CMAKE_Fortran_COMPILER /usr/bin/f95
CMAKE_Fortran_COMPILER_AR /usr/bin/gcc-ar-7
CMAKE_Fortran_COMPILER_RANLIB */usr/bin/gcc-ranlib-7
It uses gcc-5 when I call "make":
checking for config linux-gnu... found compiler '/usr/bin/mpicc' is GNU gcc-5.5.0 compiler '/usr/bin/mpif90' is GNU gfortran-5.5.0 compiler 'g++' is GNU g++-5.5.0 ... -- The C compiler identification is GNU 5.5.0 ... -- The Fortran compiler identification is GNU 5.5.0
Perhaps I need to change the priority of the gcc compilers. I will try to compile CGNS and let you know if there are any developments. Thanks again!
Hi, I am very sorry to bother you, but I have been having issues with compiling the HOPR code. It seems to get through the download and compilation of HDF5 and CGN fine, and gets through the HOPR compilation until it gets to the linking stage, then fails with the error:
I have tried setting LIBS_USE_MPI to false, and this does remove the MPI error messages, but the "can not be used when making a PIE object; recompile with -fPIC" error messages remain, even after adding the -fPIC flags. This is on a Ubuntu 18.04.5 LTS system, but I cannot figure out what I'm doing wrong Thank you very much