sourceryinstitute / OpenCoarrays

A parallel application binary interface for Fortran 2018 compilers.
http://www.opencoarrays.org
BSD 3-Clause "New" or "Revised" License
245 stars 58 forks source link

Defect: Build failure on Fedora 32, using gcc 10.0.1 #704

Closed jerryd closed 4 years ago

jerryd commented 4 years ago

System information including:

To help us debug your issue please explain:

What you were trying to do (and why)

Trying to Build OpenCoarrays to test it. --- snip --- -- Configuring done -- Generating done -- Build files have been written to: /home/jerry/dev/buildcaf/OpenCoarrays/build [$ make Scanning dependencies of target caf_mpi_static [ 1%] Building C object src/mpi/CMakeFiles/caf_mpi_static.dir/mpi_caf.c.o gcc: error: unrecognized command-line option ‘-fexceptions -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GLIBCXX_ASSERTIONS’ make[2]: [src/mpi/CMakeFiles/caf_mpi_static.dir/build.make:83: src/mpi/CMakeFiles/caf_mpi_static.dir/mpi_caf.c.o] Error 1 make[1]: [CMakeFiles/Makefile2:828: src/mpi/CMakeFiles/caf_mpi_static.dir/all] Error 2 make: *** [Makefile:161: all] Error 2

What happened (include command output, screenshots, logs, etc.)

After invoking cmake ....: [jerry@quasar build]$ rm -rf ./* [jerry@quasar build]$ export FC=gfortran [jerry@quasar build]$ export CC=gcc [jerry@quasar build]$ cmake .. -DCMAKE_INSTALL_PREFIX=/home/jerry/dev/usr ---snip --- OpenCoarrays """""""""""" Build Type: Release Version: 2.8.0-10-g964360c


-- Build from git repository detected -- Running with CMake from: /usr/bin/cmake -- Current source dir (for OpenCoarrays): /home/jerry/dev/buildcaf/OpenCoarrays -- The C compiler identification is GNU 10.0.1 -- The Fortran compiler identification is GNU 10.0.1 -- Check for working C compiler: /usr/bin/gcc -- Check for working C compiler: /usr/bin/gcc - works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working Fortran compiler: /usr/bin/gfortran -- Check for working Fortran compiler: /usr/bin/gfortran - works -- Detecting Fortran compiler ABI info -- Detecting Fortran compiler ABI info - done -- Checking whether /usr/bin/gfortran supports Fortran 90 -- Checking whether /usr/bin/gfortran supports Fortran 90 - yes -- Building OpenCoarrays version: 2.8.0-10-g964360c -- Building for target architecture: x86_64 -- Performing Test Check_Simple_Coarray_Fortran_Source_Compiles -- Performing Test Check_Simple_Coarray_Fortran_Source_Compiles - Failed -- Found MPI_C: /usr/lib64/mpich/lib/libmpi.so (found version "3.1") -- Found MPI_Fortran: /usr/lib64/mpich/lib/libmpifort.so (found version "3.1") -- Found MPI: TRUE (found version "3.1")
-- MPI runtime and compile time environments appear to be consistent -- Performing Test MPI_C_COMPILES -- Performing Test MPI_C_COMPILES - Success -- Performing Test MPI_Fortran_MODULE_COMPILES -- Performing Test MPI_Fortran_MODULE_COMPILES - Success -- Performing Test MPI_Fortran_INCLUDE_COMPILES -- Performing Test MPI_Fortran_INCLUDE_COMPILES - Success -- Looking for alloca.h -- Looking for alloca.h - found -- Looking for signal.h -- Looking for signal.h - found -- Looking for SIGKILL -- Looking for SIGKILL - found -- Looking for include files mpi.h, mpi-ext.h -- Looking for include files mpi.h, mpi-ext.h - not found -- Looking for MPIX_ERR_PROC_FAILED -- Looking for MPIX_ERR_PROC_FAILED - found -- Looking for MPIX_ERR_REVOKED -- Looking for MPIX_ERR_REVOKED - found -- Looking for MPIX_Comm_failure_ack -- Looking for MPIX_Comm_failure_ack - found -- Looking for MPIX_Comm_failure_get_acked -- Looking for MPIX_Comm_failure_get_acked - found -- Looking for MPIX_Comm_shrink -- Looking for MPIX_Comm_shrink - found -- Looking for MPIX_Comm_agree -- Looking for MPIX_Comm_agree - found -- The MPI implementation appears to have the experimental features for ULFM that will allow you to build OpenCoarrays with failed images support. However, ULFM support did not make it into the MPI-4 standard, and it is known to trigger some bugs. Because of this we have disabled it by default. You may add the -DCAF_ENABLE_FAILED_IMAGES:BOOL=ON CMake flag or edit the value with ccmake or cmake-gui if you would like to experiment with failed images. -- Looking for include file mpi.h -- Looking for include file mpi.h - found -- Looking for I_MPI_VERSION -- Looking for I_MPI_VERSION - not found -- Performing Test HAVE_ERROR_STOP_IN_PURE -- Performing Test HAVE_ERROR_STOP_IN_PURE - Success -- Performing Test HAVE_VARIABLE_STOP_CODE -- Performing Test HAVE_VARIABLE_STOP_CODE - Success -- Configuring done -- Generating done -- Build files have been written to: /home/jerry/dev/buildcaf/OpenCoarrays/build

What you expected to happen

make in build directory should complete with no errors.

Step-by-step reproduction instructions to reproduce the error/bug

See above, followed instructions per install.md at github.

rouson commented 4 years ago

@jerryd thanks for reporting this. Could you post the date that shows when you run gfortran --version? Do you know if this issue is specific to Fedora? I'll try to reproduce the problem on Ubuntu using the latest master branch of the GCC repository. I see that you have MPICH 3.1 installed. Most of my experience is with MPICH 3.2, although I think 3.1 should work. Could you try installing MPICH 3.2? In case it helps, the OpenCoarrays installer can build MPICh for your with a command like ./install.sh -p mpich -j 6 -i <desired-instlallation-path>.

rouson commented 4 years ago

@jerryd I just noticed that GCC 10.1 released last week so I'll test with the 10.1 release instead of testing with the GCC master branch. I'll be testing on Lubuntu with MPICH 3.2. If the build succeeds for me and the tests pass, then I'll try MPICH 3.1 to see if I can reproduce this issue. If that doesn't reproduce it, then it could be Fedora-specific, in which case I probably can't be of assistance, but maybe someone else can.

rouson commented 4 years ago

@jerryd arrrgh... scratch that. Now I see that it hasn't actually released. There is a release candidate. I'll build the release candidate if it's easy to figure out the appropriate git tag. Otherwise, I'll build the master branch.

rouson commented 4 years ago

@jerryd my installation succeeded on Lubuntu 19.10 with the following commands:

./install.sh -p gcc -b master -j 2 -i /usr/local/Cellar/gnu/10.0.1 
export PATH=/usr/local/Cellar/gnu/10.0.1/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/Cellar/gnu/10.0.1/bin:$LD_LIBRARY_PATH
time ./install.sh -j 6 -r /usr/local/Cellar/

Please try the above for me. Feel free to change the installation paths. If the above doesn't work for you, then the issue is most likely related to the issue is most likely Fedora-specific. Note that the last step above will install MPICH 3.2 if it doesn't find an MPICH 3.2 or later in your PATH. After installing MPICH, it will install OpenCoarrays.

t-bltg commented 4 years ago

FYI, gcc 10.1.0 was released today, and caf 2.8.0 compiles & runs fine with mpich 3.3.2. Note that mpich was compiled with gcc-10 and FFLAGS=-fallow-argument-mismatch, see https://gcc.gnu.org/gcc-10/porting_to.html.

No regression either on https://github.com/uhhpctools/caf-testsuite.

Porting to GCC 10 - GNU Project - Free Software Foundation (FSF)
GitHub
uhhpctools/caf-testsuite
Test Suite for Fortran 2008 Coarrays. Contribute to uhhpctools/caf-testsuite development by creating an account on GitHub.
rouson commented 4 years ago

Thanks, @neok-m4700. Also, just FYI, the OpenCoarrays installer is able to build MPICH (./install.sh -p mpich) and it applies the FFLAGS=-fallow-argument-mismatch flag when it detects GCC versions >= 10 in the block of code at line 41 in prerequisites/build-functions/build_and_intall.sh.

@jerryd I'll close this. If you're still encountering difficulties, feel free to reopen it.

jerryd commented 4 years ago

This bug is very real. Let me explain. If someone follows the instructions here: https://github.com/sourceryinstitute/OpenCoarrays/blob/master/INSTALL.md the instructions fail. I have duplicated the failure on Fedora 31 on a completely different machine. The steps given are: mkdir opencoarrays-build cd opencoarrays-build export FC=/path/to/gfortran export CC=/path/to/gcc cmake /path/to/OpenCoarrays/source \ -DCMAKE_INSTALL_PREFIX=/path/to/desired/installation/location make make test # optional; verify build works make install

The result is identical to what I have decribed previously: $ make Scanning dependencies of target caf_mpi_static [ 1%] Building C object src/mpi/CMakeFiles/caf_mpi_static.dir/mpi_caf.c.o gcc: error: unrecognized command line option ‘-fexceptions -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GLIBCXX_ASSERTIONS’ make[2]: [src/mpi/CMakeFiles/caf_mpi_static.dir/build.make:83: src/mpi/CMakeFiles/caf_mpi_static.dir/mpi_caf.c.o] Error 1 make[1]: [CMakeFiles/Makefile2:826: src/mpi/CMakeFiles/caf_mpi_static.dir/all] Error 2 make: *** [Makefile:161: all] Error 2

gcc version is 9.3.1 gfortran version 9.3.1 cmake version 3.17.2

So either the instructions should be changed or the associated cmake configuration files fixed. (suggest this issue be reopened)

GitHub
sourceryinstitute/OpenCoarrays
A parallel application binary interface for Fortran 2018 compilers. - sourceryinstitute/OpenCoarrays
t-bltg commented 4 years ago

@jerryd Hi, can you please post the build output with -DCMAKE_VERBOSE_MAKEFILE=ON added to the cmake command ?

BTW, the options reported as unrecognized command line option in your bug report are very valid gcc options, try it yourself:

echo 'int main() {}' | gcc -xc - -fexceptions -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GLIBCXX_ASSERTIONS
./a.out
jerryd commented 4 years ago

Confirmed the fix for #706 also fixed my issues here. Thanks much!