Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28863 Discussions

Intel oneAPI HPC toolkit and NAG Fortran Library on Linux

LPN2024
Beginner
455 Views

Hello,

 

I have installed the oneapi HPC Toolkit and the NAG Fortran library (nll6i293bl) on a linux server.

I am trying to compile and link an example but am getting errors. The example is:

 

NAGLIB_FINCLUDE = -I${NAGDIR}/lp64/nag_interface_blocks

NAGLIB_FLINK = ${NAGDIR}/lp64/lib/libnag_mkl.a -Wl,--start-group \         ${NAGDIR}/mkl/lib/intel64/libmkl_intel_lp64.a \ ${NAGDIR}/mkl/lib/intel64/libmkl_intel_thread.a \ ${NAGDIR}/mkl/lib/intel64/libmkl_core.a -Wl,--end-group \

-L${NAGDIR}/rtl/lib/intel64 -liomp5 -lpthread -lm -ldl -lstdc++

ifort ${NAGLIB_FINCLUDE} a00adfe.f90 ${NAGLIB_FLINK}

 

There are a large number of errors that look something like 

 

ld: /opt/intel/oneapi/compiler/2024.0/bin/../lib/libifcoremt.a(for_diags_intel.o): in function `for__strlcpy': for_diags_intel.c:(.text+0x0): multiple definition of `for__strlcpy'; ${NAGDIR}/lp64/lib/libnag_mkl.a(for_diags_intel.o):for_diags_intel.c:(.text+0x2700): first defined here

 

The functions are defined twice and I am not sure how to change the link command to prevent this.

 

If you have any advice, I would very much appreciate it

 

 

 

0 Kudos
1 Reply
Barbara_P_Intel
Employee
364 Views

I suggest you ask the NAG support team.

 

0 Kudos
Reply