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

building with oneAPI fails #23

Open
manodeep opened this issue Jan 17, 2025 · 0 comments
Open

building with oneAPI fails #23

manodeep opened this issue Jan 17, 2025 · 0 comments

Comments

@manodeep
Copy link

With the latest oneAPI compiler (and leaving netcdf and openmpi as is), I get the following error when I try to compile the oasis3-mct package. Same error also occurs upstream, but is not caught and the compile continues past this error. This happens because there is an extra -loopopt=0/1 option that is not correctly parsed and interpreted as a linking flag. The linker then looks for a non-existent file and borks.

Intel says this is an autoconf issue (see release notes for 2025 oneAPI) and can be fixed by using autoconf>=2.70 and using autoupdate. I have tried that but that does not fix the issue.

access-nri/oasis3-mct (from config.log in the build directory):

configure:4580: mpicc -o conftest -O2   conftest.c   -L/apps/openmpi/4.0.2/lib -lmpi_usempif08 -lmpi_usempi_ignore_tkr -lmpi_mpifh -lmpi -loopopt=1 -L/apps/openmpi/4.0.2/lib/Intel -L/apps/openmpi/4.0.2/lib/profilers -L/apps/netcdf/4.7.4/lib/Intel -L/apps/netcdf/4.7.4/lib -L/apps/intel-tools/intel-compiler-llvm/2024.2.1/lib -L/apps/intel-tools/.packages/2024.2.1/compiler/2024.2/lib -L/apps/intel-tools/.packages/2024.2.1/compiler/2024.2/lib/clang/19/lib/x86_64-unknown-linux-gnu -L/half-root/usr/bin/../lib/gcc/x86_64-redhat-linux/8/ -L/half-root/usr/bin/../lib/gcc/ -L/half-root/usr/bin/../lib/gcc/x86_64-redhat-linux/8/../../../../lib64 -L/half-root/usr/bin/../lib/gcc/x86_64-redhat-linux/8/../../../../lib64/ -L/lib/../lib64 -L/lib/../lib64/ -L/usr/lib/../lib64 -L/usr/lib/../lib64/ -L/apps/openmpi/4.0.2/lib/Intel/ -L/apps/openmpi/4.0.2/lib/ -L/apps/netcdf/4.7.4/lib/Intel/ -L/apps/netcdf/4.7.4/lib/ -L/apps/intel-tools/intel-compiler-llvm/2024.2.1/lib/ -L/half-root/usr/bin/../lib/gcc/x86_64-redhat-linux/8/../../../ -L/lib64 -L/lib/ -L/usr/lib64 -L/usr/lib -lifport -lifcoremt -limf -lsvml -lm -lipgo -lirc -lpthread -lirc_s -ldl >&5
/bin/ld: cannot find -loopopt=1
icx: error: linker command failed with exit code 1 (use -v to see invocation)
configure:4580: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "MCT"
| #define PACKAGE_TARNAME "mct"
| #define PACKAGE_VERSION "2.8"
| #define PACKAGE_STRING "MCT 2.8"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_MPI 1
| /* end confdefs.h.  */
| #define FC_DUMMY_MAIN _main
| #ifdef FC_DUMMY_MAIN
| #ifndef FC_DUMMY_MAIN_EQ_F77
| #  ifdef __cplusplus
|      extern "C"
| #  endif
|    int FC_DUMMY_MAIN() { return 1; }
| #endif
| #endif
| int
| main ()
| {
| 
|   ;
|   return 0;
| }
configure:4596: result: unknown
configure:4613: error: in `/home/593/ms2335/codes/access-nri/oasis3-mct/compile_oa3-mct/build/lib/mctdir':
configure:4616: error: linking to Fortran libraries from C fails
See `config.log' for more details.

COSIMA/oasis3-mct: Same error in config.log but the build continues as demonstrated by the output from make:

checking how to get verbose linking output from mpifort... -v
checking for Fortran libraries of mpifort...  -lmpi_usempif08 -lmpi_usempi_ignore_tkr -lmpi_mpifh -lmpi -loopopt=1 -L/apps/openmpi/5.0.5/lib/Intel -L/apps/openmpi/5.0.5/lib -L/apps/openmpi/5.0.5/lib/profilers -L/apps/netcdf/4.9.2/lib/Intel -L/apps/netcdf/4.9.2/lib -L/apps/intel-tools/intel-compiler-llvm/2024.2.1/lib -L/apps/intel-tools/.packages/2024.2.1/compiler/2024.2/lib -L/apps/intel-tools/.packages/2024.2.1/compiler/2024.2/lib/clang/19/lib/x86_64-unknown-linux-gnu -L/half-root/usr/bin/../lib/gcc/x86_64-redhat-linux/8/ -L/half-root/usr/bin/../lib/gcc/ -L/half-root/usr/bin/../lib/gcc/x86_64-redhat-linux/8/../../../../lib64 -L/half-root/usr/bin/../lib/gcc/x86_64-redhat-linux/8/../../../../lib64/ -L/lib/../lib64 -L/lib/../lib64/ -L/usr/lib/../lib64 -L/usr/lib/../lib64/ -L/apps/openmpi/5.0.5/lib/Intel/ -L/apps/openmpi/5.0.5/lib/ -L/apps/netcdf/4.9.2/lib/Intel/ -L/apps/netcdf/4.9.2/lib/ -L/apps/intel-tools/intel-compiler-llvm/2024.2.1/lib/ -L/half-root/usr/bin/../lib/gcc/x86_64-redhat-linux/8/../../../ -L/lib64 -L/lib/ -L/usr/lib64 -L/usr/lib -lifport -lifcoremt -limf -lsvml -lm -lipgo -lirc -lpthread -lirc_s -ldl
checking for dummy main to link with Fortran libraries... unknown
configure: error: in `/home/593/ms2335/codes/climate_models/COSIMA/oasis3-mct/Linux/build/lib/mctdir':
configure: error: linking to Fortran libraries from C fails
See `config.log' for more details.
make[3]: Entering directory '/home/593/ms2335/codes/climate_models/COSIMA/oasis3-mct/Linux/build/lib/mctdir'
make[4]: Entering directory '/home/593/ms2335/codes/climate_models/COSIMA/oasis3-mct/Linux/build/lib/mctdir/mpeu'
make[4]: Nothing to be done for 'all'.
make[4]: Leaving directory '/home/593/ms2335/codes/climate_models/COSIMA/oasis3-mct/Linux/build/lib/mctdir/mpeu'
make[4]: Entering directory '/home/593/ms2335/codes/climate_models/COSIMA/oasis3-mct/Linux/build/lib/mctdir/mct'
make[4]: Nothing to be done for 'all'.
make[4]: Leaving directory '/home/593/ms2335/codes/climate_models/COSIMA/oasis3-mct/Linux/build/lib/mctdir/mct'
make[3]: Leaving directory '/home/593/ms2335/codes/climate_models/COSIMA/oasis3-mct/Linux/build/lib/mctdir'
make[2]: Leaving directory '/home/593/ms2335/codes/climate_models/COSIMA/oasis3-mct/util/make_dir'
/usr/bin/make -f TopMakefileOasis3 makelibs
make[2]: Entering directory '/home/593/ms2335/codes/climate_models/COSIMA/oasis3-mct/util/make_dir'
make[2]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
=> Compiling library scrip
(cd /home/593/ms2335/codes/climate_models/COSIMA/oasis3-mct/Linux/build/lib/scrip; cp -f /home/593/ms2335/codes/climate_models/COSIMA/oasis3-mct/lib/scrip/src/Makefile .;\
         ( echo 'include /home/593/ms2335/codes/climate_models/COSIMA/oasis3-mct/util/make_dir/make.inc' > infile; cat Makefile >> infile ; cp -f infile Makefile ) ; /usr/bin/make all > >(tee -a /home/593/ms2335/codes/climate_models/COSIMA/oasis3-mct/util/make_dir/COMP.log) 2> >(tee -a /home/593/ms2335/codes/climate_models/COSIMA/oasis3-mct/util/make_dir/COMP.err >&2) )
make[3]: Entering directory '/home/593/ms2335/codes/climate_models/COSIMA/oasis3-mct/Linux/build/lib/scrip'

...
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