Using pgf90 with Intel MPI

Hi

I am testing out the possibility to change from ifort to pgf90 for a project using Intel MPI. Intel C(icc) and C++(icpc) compilers are used. Binding files have been compiled according to the readme from Intel.

The fortran object files are compiled without problem, but when they are to be included into the C++ files there’s a lot of undefined references. For example:

test.f90:1: undefined reference to pgf90_template2_i8' test.f90:1: undefined reference to pgf90_set_intrin_type_i8’
test.f90:1: undefined reference to pgf90_template2_i8' test.f90:1: undefined reference to pgf90_set_intrin_type_i8’
test.f90:17: undefined reference to _mp_bcs_nest' test.f90:17: undefined reference to pgf90io_src_info03a’
test.f90:17: undefined reference to pgf90io_print_init' test.f90:17: undefined reference to pgf90io_sc_ch_ldw’
test.f90:17: undefined reference to pgf90io_ldw_end' test.f90:17: undefined reference to _mp_ecs_nest’
test.f90:21: undefined reference to `pgf90_str_cpy1’

This is line 17: “print *,‘Fortran debug source’”
This is line 21: “temp_filename=’/test/test2”

I am very new to Fortran, and MPI for that matter so I am kinda lost.

Has anybody seen this before?

This is compiled using scons.

Hi hhward,

You need to link to the runtime libraries. I think in this case it would just be -lpgf90 to link against libpgf90. Depending on what calls are made you may need to link to some of the other runtime libraries we ship; use nm to find which libraries contain the needed symbols and add them to the link line.

Thanks aglobus!

Hi aglobus

I got it working using dynamic linking.

However, when I try to compile statically I get the same errors.

I have replaced i.e. -lpgic with /opt/pgi/linux86-64/18.10/lib/libpgc.a.

Do you have any idea why it fails?