- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You are just missing the BEGIN keyword. The syntax of the OFFLOAD BEGIN/END directives for your code would be:
!dir$ offload begin target(mic)
write(*,*) "CAM atmosphere model initialization"
!dir$ end offload
If you need more details, refer OFFLOAD BEGIN and END OFFLOAD in the User's Guide.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
thank you that worked now the error seems to be in linking the MIC.
/home/aketh/cesm/cases/B_mic/exe/lib//libatm.a(atm_comp_mct.o): In function `atm_comp_mct_mp_atm_write_srfrest_mct_':
/storage/home/aketh/cesm/models/atm/cam/src/cpl_mct/atm_comp_mct.F90:(.text+0x3de4): undefined reference to `__offload_target_acquire'
/storage/home/aketh/cesm/models/atm/cam/src/cpl_mct/atm_comp_mct.F90:(.text+0x3e14): undefined reference to `__offload_offload1'
any help.
this error is thrown by this command.
mpiifort -o /home/aketh/cesm/cases/B_mic/exe/cesm.exe ccsm_comp_mod.o ccsm_driver.o mrg_mod.o seq_avdata_mod.o seq_diag_mct.o seq_domain_mct.o seq_flux_mct.o seq_frac_mct.o seq_hist_mod.o seq_map_esmf.o seq_map_mod.o seq_mctext_mod.o seq_rest_mod.o -L/home/aketh/cesm/cases/B_mic/exe/lib/ -latm -L/home/aketh/cesm/cases/B_mic/exe/lib/ -lice -L/home/aketh/cesm/cases/B_mic/exe/lib/ -llnd -L/home/aketh/cesm/cases/B_mic/exe/lib/ -locn -L/home/aketh/cesm/cases/B_mic/exe/lib/ -lrof -L/home/aketh/cesm/cases/B_mic/exe/lib/ -lglc -L/home/aketh/cesm/cases/B_mic/exe/lib/ -lwav -L/home/aketh/cesm/cases/B_mic/exe/intel/mpich/nodebug/nothreads/MCT/noesmf/a1l1r1i1o1g1w1/csm_share -lcsm_share -L/home/aketh/cesm/cases/B_mic/exe/intel/mpich/nodebug/nothreads/lib -lpio -lgptl -lmct -lmpeu -L/storage/softwares/installedsoftware/netcdf_4.4.0/lib -lnetcdff -lnetcdf -lhdf5_hl -lhdf5 -lz -lm

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page