- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When I attempt to compile and link my Intel Fortran + Intel MPI + NAG library code, the process fails at the link step with several dozen error messages of the form:
ld: ${WORKDIR}/main.f90:143: undefined reference to `_PDBX_readMemory'
ld: ${WORKDIR}/main.f90:143: undefined reference to `__PDBX_isGuardedCall'
ld: ${WORKDIR}/main.f90:143: undefined reference to `_PDBX_writeMemory'
Any idea how to fix this?
I am using the Intel HPC Toolkit with Ubuntu:
Ubuntu VERSION="20.04.6 LTS (Focal Fossa)"
ifort version: 2021.11.1 20231117
Here is the command to compile:
mpiifort -o test.exe ${FLAGS} ${LIBS} tools.o main.o ${LINK}
FLAGS = -fpp -cxxlib -align all -allow nofpp_comments -assume realloc_lhs \
-g -debug extended -gdwarf-2 -check bounds -diag-disable=10448 \
-debug parallel
LIBS = -I/opt/intel/oneapi/mkl/2024.0/include \
-I/NAG/nll6i293bl/lp64/include \
-I/NAG/nll6i293bl/lp64/nag_interface_blocks
NAG_LINK = /NAG/nll6i293bl/lp64/lib/libnag_mkl.a -Wl, \
--start-group /NAG/nll6i293bl/mkl/lib/intel64/libmkl_intel_lp64.a \
/NAG/nll6i293bl/mkl/lib/intel64/libmkl_intel_thread.a \
/NAG/nll6i293bl/mkl/lib/intel64/libmkl_core.a -Wl,--end-group \
-L/NAG/nll6i293bl/rtl/lib/intel64 \
-liomp5 -lpthread -lm -ldl -lstdc++ -shared-intel
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
you specify ${LINK} in your compilation command but only NAG_LINK is defined. What do you specify for $LINK?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry that was a typo:
LINK = ${NAG_LINK}
mpiifort -o test.exe ${FLAGS} ${LIBS} tools.o main.o ${LINK}
FLAGS = -fpp -cxxlib -align all -allow nofpp_comments -assume realloc_lhs \
-g -debug extended -gdwarf-2 -check bounds -diag-disable=10448 \
-debug parallel
LIBS = -I/opt/intel/oneapi/mkl/2024.0/include \
-I/NAG/nll6i293bl/lp64/include \
-I/NAG/nll6i293bl/lp64/nag_interface_blocks
LINK = /NAG/nll6i293bl/lp64/lib/libnag_mkl.a -Wl, \
--start-group /NAG/nll6i293bl/mkl/lib/intel64/libmkl_intel_lp64.a \
/NAG/nll6i293bl/mkl/lib/intel64/libmkl_intel_thread.a \
/NAG/nll6i293bl/mkl/lib/intel64/libmkl_core.a -Wl,--end-group \
-L/NAG/nll6i293bl/rtl/lib/intel64 \
-liomp5 -lpthread -lm -ldl -lstdc++ -shared-intel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
this seems to be a compiler problem. In the meantime, you can either remove -debug parallel or use ifx but without -gdwarf=2. Let me move to the Fortran forum and escalate to the developers.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I removed the option: -debug parallel.
Without that option, the code compiles and links and I am able to run and debug my code.
I haven't tried the second suggestion yet but will do so.
Thank you.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page