hi all,
i have been trying to add a small OFFLOAD section to a program in CESM.
however i get the following error on compilation.
mpiifort -c -I. -I/storage/home/aketh/cesm/cases/B_mic/exe/intel/mpich/nodebug/nothreads/include -I/storage/home/aketh/cesm/cases/B_mic/exe/intel/mpich/nodebug/nothreads/MCT/noesmf/a1l1r1i1o1g1w1/csm_share -I/storage/softwares/installedsoftware/netcdf_4.4.0/include -I/storage/softwares/installedsoftware/netcdf_4.4.0/lib -I/opt/intel/impi/4.1.3.048/intel64/include -I/storage/home/aketh/cesm/cases/B_mic/exe/intel/mpich/nodebug/nothreads/include -I/storage/home/aketh/cesm/models/csm_share/shr -I. -I/home/aketh/cesm/cases/B_mic/SourceMods/src.cam -I/storage/home/aketh/cesm/models/atm/cam/src/chemistry/pp_none -I/storage/home/aketh/cesm/models/atm/cam/src/chemistry/mozart -I/storage/home/aketh/cesm/models/atm/cam/src/chemistry/bulk_aero -I/storage/home/aketh/cesm/models/atm/cam/src/chemistry/utils -I/storage/home/aketh/cesm/models/atm/cam/src/physics/cam -I/storage/home/aketh/cesm/models/atm/cam/src/dynamics/fv -I/storage/home/aketh/cesm/models/atm/cam/src/utils/pilgrim -I/storage/home/aketh/cesm/models/atm/cam/src/cpl_mct -I/storage/home/aketh/cesm/models/atm/cam/src/cpl_share -I/storage/home/aketh/cesm/models/atm/cam/src/control -I/storage/home/aketh/cesm/models/atm/cam/src/utils -I/storage/home/aketh/cesm/cases/B_mic/exe/lib/include -fp-model source -convert big_endian -assume byterecl -ftz -traceback -assume realloc_lhs -O2 -DCO2A -DMAXPATCH_PFT=numpft+1 -DLSMLAT=1 -DLSMLON=1 -DPLON=72 -DPLAT=46 -DPLEV=26 -DPCNST=3 -DPCOLS=16 -DPSUBCOLS=1 -DPTRM=1 -DPTRN=1 -DPTRK=1 -DSTAGGERED -DSPMD -Dlinux -DNDEBUG -DMCT_INTERFACE -DHAVE_MPI -DFORTRANUNDERSCORE -DNO_R16 -Dlinux -DCPRINTEL -free /storage/home/aketh/cesm/models/atm/cam/src/cpl_mct/atm_comp_mct.F90
/storage/home/aketh/cesm/models/atm/cam/src/cpl_mct/atm_comp_mct.F90(1259): error #8547: The OFFLOAD directive must be followed by one of the OpenMP PARALLEL directives, a CALL statement, or an assignment statement where the right-hand side is only a function invocation.
!dir$ offload target(mic)
------^
/storage/home/aketh/cesm/models/atm/cam/src/cpl_mct/atm_comp_mct.F90(1261): error #8581: An OFFLOAD BEGIN directive block starts in one F95 block and ends in another.
!dir$ end offload
i have added the source code here as an attachment for reference.