Software Archive
Read-only legacy content
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
17060 Discussions

Compiling CESM for intel MIC in offload mode

aketh_t_
Beginner
407 Views

Hi All,

I am trying to run CESM(community earth system model written in Fortran) with offload sections for Intel Xeon Phi. I am trying to do this for an OpenMP loop present in a section called baroclinic function. While doing this, I get the following error during compilation of the offload code. 

A procedure called by a procedure with the OFFLOAD:TARGET attribute must have the OFFLOAD:TARGET attribute.

I am also getting this error for Global variables. I tried adding the attributes "offload: mic :: <function name>" and "offload: mic :: <variable name>". This solves the problem. However, the hierarchical calls go down to almost 7-8 levels and doing this for every function and variable is too tedious. 

How to go about this? Is there any workaround?

Thanks,

Aketh

 

 

 

 

0 Kudos
1 Reply
Frances_R_Intel
Employee
407 Views

Adding "-qoffload-attribute-target=mic" to the compiler command line will cause all functions and variables to be compiled as it they had the been explicitly declared with the offload attribute.

0 Kudos
Reply