Software Archive
Read-only legacy content
17061 Discussions

unable to link offloaded MIC

aketh_t_
Beginner
579 Views

hi all,

I had added an offload section to a file named atm_comp_mct.F90.

it does compile well.

however later it is being used to link to a file named cesm.exe and it throws errors as undefined reference.

undefined reference to `__offload_target_acquire'
undefined reference to `__offload_offload'

here are the atm_comp_mct.F90 and the buildlog for cesm.exe

 

 

0 Kudos
3 Replies
Kevin_D_Intel
Employee
579 Views

Add -qoffload just before the -o option on the mpiifort command shown in your attached document.

Since the main program lacks explicit offload directives the offload run-time libs are not deemed necessary and thus are not included in the link. The -qoffload option will include the offload RTLs .

This option is not position sensitive so adding it where suggested just keeps it from getting lost in the complexity of the many object files, search paths, and libraries already on that command-line.

0 Kudos
aketh_t_
Beginner
579 Views

 

 

icc: command line warning #10006: ignoring unknown option '-qoffload'

:.text+0x1e): undefined reference to `__offload_target_acquire'
:(.text+0x50): undefined reference to `__offload_offload1'

Sir unfortunately even the -qoffload didnt work. it seems like no such flag in compiling exists.

 

 

0 Kudos
Kevin_D_Intel
Employee
579 Views

Ok, you are using a compiler older than our latest Parallel Studio XE 2015 (15.0). You can check the version with: icc -V or ifort -V

For versions before 15.0, use this form: -offload

0 Kudos
Reply