Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AOCC compiler cannot build HDF5 #3439

Closed
lcebaman opened this issue Aug 28, 2023 · 5 comments
Closed

AOCC compiler cannot build HDF5 #3439

lcebaman opened this issue Aug 28, 2023 · 5 comments
Assignees
Labels
Component - Build CMake, Autotools Priority - 3. Low 🔽 Code cleanup, small feature change requests, etc.
Milestone

Comments

@lcebaman
Copy link

Describe the bug
AOCC compiler is not able to build HDF5

Platform (please complete the following information)
-HDF5 develop
-AOCC 4.0
-OpenMPI 4.1.5

How was configured

export FC=mpif77
export F90=mpif90
export F77=mpif77
export CXX=mpic++
export LD=mpif90
export MPIF90=mpif90
export OMPI_CC=clang
export OMPI_FC=flang
export OMPI_CXX=clang++
./configure  --enable-parallel --enable-fortran --enable-shared --enable-static

Error

clang: error: no such file or directory: '../src/.libs/libhdf5.so'
make[1]: *** [Makefile:1979: cache] Error 1
make[1]: *** Waiting for unfinished jobs....
clang: error: no such file or directory: '../src/.libs/libhdf5.so'
clang: error: no such file or directory: '../src/.libs/libhdf5.so'
make[1]: *** [Makefile:1987: cache_image] Error 1
make[1]: *** [Makefile:1983: cache_api] Error 1
clang: error: no such file or directory: '../src/.libs/libhdf5.so'
make[1]: *** [Makefile:1995: cache_tagging] Error 1
clang: error: no such file or directory: '../src/.libs/libhdf5.so'
clang: error: no such file or directory: '../src/.libs/libhdf5.so'
make[1]: *** [Makefile:2239: lheap] Error 1
make[1]: *** [Makefile:2283: ohdr] Error 1
clang: error: no such file or directory: '../src/.libs/libhdf5.so'
make[1]: *** [Makefile:2319: stab] Error 1
@hyoklee hyoklee added the Component - Build CMake, Autotools label Aug 28, 2023
@hyoklee hyoklee added the Priority - 3. Low 🔽 Code cleanup, small feature change requests, etc. label Aug 28, 2023
@hyoklee
Copy link
Member

hyoklee commented Aug 29, 2023

Hi, @lcebaman !

Thank you for testing AOCC with HDF5.
I could confirm the build failure.

However, if you disable shared & Fortran & parallel, you can build and test HDF5 with the latest AOCC.
Here's an example GitHub Action result that passes:

https://github.com/hyoklee/actions/actions/runs/6014286859/job/16313640693

Here's my test Action workflow for the above result:
https://github.com/hyoklee/actions/blob/main/.github/workflows/aocc.yml

@lcebaman
Copy link
Author

lcebaman commented Aug 31, 2023

Hi @hyoklee

Just to confirm, you were able to build HDF5 with AOCC but with Fortran, parallel and shared options disabled.

@hyoklee
Copy link
Member

hyoklee commented Sep 1, 2023

@lcebaman Yes.

@derobins derobins added this to the 1.14.3 milestone Oct 9, 2023
@derobins
Copy link
Member

This is/was a libtool error. The libtool script that is generated at compile time was missing the "-Wl," prefix necessary for linker options, so "-Wl,-soname" gets parsed as -soname, which fails.

As of October 2023, with AOCC 4.1, c/flang works out of the box w/ shared unless you are using an MPI compiler wrapper. We have a hack for that (at least in the Autotools), which will appear shortly.

This issue will be closed when the PR is merged to develop.

derobins added a commit to derobins/hdf5 that referenced this issue Oct 14, 2023
* Adds a config/clang-fflags options file to support Flang
* Corrects missing "-Wl," from linker options in the libtool wrappers
  when using Flang, the MPI Fortran compiler wrappers, and building
  the shared library. This would often result in unrecognized options
  like -soname.
* Enable -nomp w/ Flang to avoid linking to the OpenMPI library.

CMake can build the parallel, shared library w/ Fortran using AOCC
and Flang, so no changes were needed for that build system.

Fixes GitHub issues HDFGroup#3439, HDFGroup#1588, HDFGroup#366, HDFGroup#280
lrknox pushed a commit that referenced this issue Oct 15, 2023
* Adds a config/clang-fflags options file to support Flang
* Corrects missing "-Wl," from linker options in the libtool wrappers
  when using Flang, the MPI Fortran compiler wrappers, and building
  the shared library. This would often result in unrecognized options
  like -soname.
* Enable -nomp w/ Flang to avoid linking to the OpenMPI library.

CMake can build the parallel, shared library w/ Fortran using AOCC
and Flang, so no changes were needed for that build system.

Fixes GitHub issues #3439, #1588, #366, #280
@derobins
Copy link
Member

Fixed w/ #3674

brtnfld pushed a commit to brtnfld/hdf5 that referenced this issue Oct 16, 2023
* Adds a config/clang-fflags options file to support Flang
* Corrects missing "-Wl," from linker options in the libtool wrappers
  when using Flang, the MPI Fortran compiler wrappers, and building
  the shared library. This would often result in unrecognized options
  like -soname.
* Enable -nomp w/ Flang to avoid linking to the OpenMPI library.

CMake can build the parallel, shared library w/ Fortran using AOCC
and Flang, so no changes were needed for that build system.

Fixes GitHub issues HDFGroup#3439, HDFGroup#1588, HDFGroup#366, HDFGroup#280
jhendersonHDF pushed a commit to jhendersonHDF/hdf5 that referenced this issue Oct 18, 2023
* Adds a config/clang-fflags options file to support Flang
* Corrects missing "-Wl," from linker options in the libtool wrappers
  when using Flang, the MPI Fortran compiler wrappers, and building
  the shared library. This would often result in unrecognized options
  like -soname.
* Enable -nomp w/ Flang to avoid linking to the OpenMPI library.

CMake can build the parallel, shared library w/ Fortran using AOCC
and Flang, so no changes were needed for that build system.

Fixes GitHub issues HDFGroup#3439, HDFGroup#1588, HDFGroup#366, HDFGroup#280
derobins added a commit that referenced this issue Oct 18, 2023
* Address nagfor exceptions stoppage. (#3658)

* added cmake ieee flag for nagfor

* generalized determining the nag compiler

* fixing some misc. NAG warnings

* Simplify. (#3659)


* Address @jhendersonHDF review

* Add expedited testing support to t_filters_parallel (#3665)

* Remove clang warnings (#3656)

* Fixes test failure for gfortran -O2 and -O3, -fdefault-real-16 (#3662)

* added cmake ieee flag for nagfor

* fixes gfortran -O2 and -O3, -fdefault-real-16

* fixed sync

* updated release notes

* Fix link error on clang17/gfortran13/macOS-13 (#3666) (#3671)

* Correct fortran CMake generator expressions (#3670)

* Add AOCC GitHub Action (#3504) (#3657)

* Fix uninitialized subfiling test variable (#3675)

Picked up by gcc 10 on skybridge. Probably spurious, but no harm in
initializing it to a "bad" value.

* Add support for AOCC & Flang w/ the Autotools (#3674)

* Adds a config/clang-fflags options file to support Flang
* Corrects missing "-Wl," from linker options in the libtool wrappers
  when using Flang, the MPI Fortran compiler wrappers, and building
  the shared library. This would often result in unrecognized options
  like -soname.
* Enable -nomp w/ Flang to avoid linking to the OpenMPI library.

CMake can build the parallel, shared library w/ Fortran using AOCC
and Flang, so no changes were needed for that build system.

Fixes GitHub issues #3439, #1588, #366, #280

* Fix a strncpy call to use dest size not src (#3677)

A strncpy call in a path construction call used the size of the src
buffer instead of the dest buffer as the limit n.

This was switched to use the dest size and properly terminate the
string if truncation occurs.

* Remove CANBE_UNUSED() from subfiling VFD (#3678)

This macro was an attempt to quiet warnings about release mode unused
variables that only appear in asserts. It resolves to a void cast, which
doesn't quiet warnings when an assignment has already taken place.

* Suppress MPI_Waitall warnings w/ MPICH (#3680)

MPICH defines MPI_STATUSES_IGNORE (a pointer) to 1, which raises warnings
w/ gcc. This is a known issue that the MPICH devs are not going to fix.

See here:
    pmodels/mpich#5687

This fix suppresses those issues w/ gcc

* Fix a possible NULL pointer dereference in tests (#3676)


The dtypes test could dereference a NULL pointer if a strdup call
failed.

* Fix printf warnings in t_mpi (#3679)

* Fix printf warnings in t_mpi

The type of MPI_Offset varies with implementation. In MPICH, it's long,
which raises warnings when we attempt to use long long format
specifiers. Casting to long long fixes the warnings.

* Fix invalid memory access in S3 comms (#3681)

In the ros3 VFD, passing an empty string parameter to an internal
API call could result in accessing the -1th element of a string.
This would cause failures on big-endian systems like s390x.

This parameter is now checked before writing to the string.

Fixes GitHub #1168

* Add Doxygen for H5Pset_fapl_sec2() (#3685)

*

* switch to using time function instead of date function (#3690)

* Initialize API context MPI types to MPI_BYTE (#3688)

* Add test info output to t_filters_parallel (#3696)

* Suppress format string warnings in subfiling test (#3699)

* Fix unused variable in tselect.c (#3701)

* Fix unused variable warning in H5F_sfile_assert_num (#3700)

* Restore floating-point suffixes in tests (#3698)

A prior commit removed too many F suffixes. This restores the suffixes
for float variables.

* Sync with changes from develop

---------

Co-authored-by: Scot Breitenfeld <brtnfld@hdfgroup.org>
Co-authored-by: H. Joe Lee <hyoklee@hdfgroup.org>
Co-authored-by: Allen Byrne <50328838+byrnHDF@users.noreply.github.com>
Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component - Build CMake, Autotools Priority - 3. Low 🔽 Code cleanup, small feature change requests, etc.
Projects
None yet
Development

No branches or pull requests

4 participants