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

Port to Intel LLVM based compilers #509

Open
dkokron opened this issue Dec 20, 2022 · 0 comments
Open

Port to Intel LLVM based compilers #509

dkokron opened this issue Dec 20, 2022 · 0 comments

Comments

@dkokron
Copy link

dkokron commented Dec 20, 2022

I have been attempting to port hpc-stack to use the LLVM based compilers (ifx, icx and icpx) from the 2023.0.0. release of OneAPI. I ran into a host of problems, most of which I have been able to work around. I have worked with the developers of ESMF and MAPL to inform them of the issues. Here are my notes regrading the porting effort.

LLVM based Intel compilers

Change Classic compilers in stack_helpers.sh

HDF5
Look at "Other known issues" section of the following for how to avoid "ld: cannot find -loopopt=0" error
https://www.intel.com/content/www/us/en/developer/articles/release-notes/oneapi-fortran-compiler-release-notes.html

The workaround is to regenerate the configure file using a newer version (2.70+) of autoreconf

mv configure configure.orig
autoreconf -if

Then update to at least hdf5-1.10.7 ( I tested with hdf5-1.10.9) based on suggestion at grimbough/Rhdf5lib#36

ESMF
Add IntelLLVM section to libs/build_esmf.sh

  • intelLLVM )
  • export ESMF_COMPILER="intelLLVM"
  • export ESMF_F90COMPILEOPTS="-g -traceback -fp-model precise ${FCFLAGS}"
  • export ESMF_CXXCOMPILEOPTS="-g -traceback -fp-model precise ${CXXFLAGS}"
  • ;;

Update scripts/libs.ifort to avoid loopopt issue based on suggestion from Gerhard Thurich
-$1 -shared-intel -dryrun $ESMF_DIR/scripts/hello.f90 2>&1 | grep " -l" | grep -v "-lmpi" | grep -v "-lc" | grep -v "netcdf" | grep -v "hdf" | sed 's/\//g' | xargs
+$1 -shared-intel -dryrun $ESMF_DIR/scripts/hello.f90 2>&1 | grep " -l" | grep -v "-lmpi" | grep -v "-lc" | grep -v "-loopopt" | grep -v "netcdf" | grep -v "hdf" | sed 's/\//g' | xargs

Also create build_config/Linux.intelLLVM.default/ based on build_config/Linux.intel.default/

gftl-shared-v1.5.0
Create cmake/IntelLLVM.cmake based on cmake/Intel.cmake

yafyaml-v0.5.1
Create cmake/IntelLLVM.cmake based on cmake/Intel.cmake

esma_cmake-v3.4.3/
Create IntelLLVM.cmake

MAPL
Disable inclusion of -fiopenmp flag by changing
if (NOT CMAKE_Fortran_COMPILER_ID MATCHES "NAG")
to
if (NOT CMAKE_Fortran_COMPILER_ID MATCHES "^(NAG|IntelLLVM)$")
in pfio/CMakeLists.txt and profiler/CMakeLists.txt

Haven't figured out how to work around the following error. Matt Thompson said he would work with Tom Clune to resolve this.
/home/dkokron/Projects/NCEP/UFS/hpc-stack/pkg/mapl-2.22.0/gridcomps/Cap/MAPL_Cap.F90(358): error #5623: Internal compiler error: internal abort Please report this error along with the circumstances in which it occurred in a Software Problem Report. Note: File and line given may not be explicit cause of this error.
call MAPL_CapGridCompCreate(this%cap_gc, this%get_cap_rc_file(), &

FMS
Creat IntelLLVM section in the following to remove "-fp-model source" which isn't available
cmake/compiler_flags_Intel_C.cmake
cmake/compiler_flags_Intel_Fortran.cmake

CRTM
Add IntelLLVM section in libsrc/CMakeLists.txt to remove "-fp-model source" which isn't available

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant