[MITgcm-support] Any tutorials on the MITgcm adjoint model

Patrick Heimbach heimbach at MIT.EDU
Thu Jul 31 23:03:26 EDT 2014


Hi Xiangming,

more likely it’s a problem with the specific compiler flags that you are using, and where there may be a conflict because of use of F90/F95 code (we know that this and other verification experiments that use OpenAD-generated code work fine in parallel configurations using gfortran and mpi). Unfortunately, I haven’t used pgi yet with OpenAD.

A goal soon is to provide the correct compiler flags for parallel configs using ifort and MPI.

-Patrick



On Jul 31, 2014, at 10:55 PM, Xiangming Zeng <xzeng2 at ncsu.edu> wrote:

> Hi Patrick,
> 
> You are right. I tried a new version of gcc and gfortran, and it works. The report is as follow:
> 
> parsing options...  OK (COMMAND='./mitgcmuv_ad > output_oadm.txt')
> creating the comparison code (using CC=cc)...  OK
> skipping mpack build
> 
> default    10
> G D M    C  A  F
> e p a R  o  d  D
> n n k u  s  G  G
> 2 d e n  t  r  r
> 
> -------------------------------------------------------------------------------
> 
> Experiment:  OpenAD
> 
> genmake ... successful
> clean build-dir: make Clean ... successful
> make depend skipped!
> make ... successful
> clean run-dir ... successful
> linkdata from dirs: input_oad
> ldir=input_oad: data data.autodiff data.cost data.ctrl data.gmredi data.grdchk 
> data.mnc data.optim data.pkg eedata ncheckLev.conf prepare_run ; link files: bat
> hymetry.bin lev_s.bin lev_sss.bin lev_sst.bin lev_t.bin ncep_emp.bin ncep_qnet.b
> in trenberth_taux.bin trenberth_tauy.bin from dir: ../../tutorial_global_oce_lat
> lon/input
> runmodel in OpenAD/run ... successful
> => output from running in OpenAD/run :
> >  link mitgcmuv_ad from dir ../build
> > STOP NORMAL END
> There were 16 decimal places of similarity for "ADM CostFct"
> There were 16 decimal places of similarity for "ADM Ad Grad"
> There were 16 decimal places of similarity for "ADM FD Grad"
> 
> -------------------------------------------------------------------------------
> No results email was sent.
> Wed Jul 30 10:20:48 EDT 2014
> run: ./testreport -oad -of /he_data/he/xzeng2/MITgcm/tools/build_options/linux_a
> md64_gfortran -t OpenAD
> on : Linux login04 2.6.18-164.el5 #1 SMP Thu Sep 3 03:28:30 EDT 2009 x86_64 x86_
> 64 x86_64 GNU/Linux
> 
>   OPTFILE=/he_data/he/xzeng2/MITgcm/tools/build_options/linux_amd64_gfortran
> 
> Adjoint generated by OpenAD
> default    10
> G D M    C  A  F
> e p a R  o  d  D
> n n k u  s  G  G
> 2 d e n  t  r  r
> 
> Y Y Y Y 16>16<16 pass  OpenAD
> Start time:  Wed Jul 30 10:20:48 EDT 2014
> End time:    Wed Jul 30 12:52:40 EDT 2014
> ======== End of testreport execution ========
> 
> 
> 
> However, when I tried to use the pgi with mpi to compile, it fails again. It seems it's still the adjoint model problem, because I can compile the model without adjoint successfully. The error message is as follow. Any idea? Thanks a lot.
> 
> 
> 
> parsing options...  OK (COMMAND='./mitgcmuv_ad > output_oadm.txt')
> creating the comparison code (using CC=cc)...  OK
> skipping mpack build
> 
> default    10
> G D M    C  A  F
> e p a R  o  d  D
> n n k u  s  G  G
> 2 d e n  t  r  r
> 
> -------------------------------------------------------------------------------
> 
> Experiment:  OpenAD
> 
> genmake ... successful
> clean build-dir: make Clean ... successful
> make depend skipped!
> make ... make: [revolve.o] Error 127 (ignored)
> ln -s ../../../tools/OAD_support/iaddr.c .
> mpicc  -DWORDLENGTH=4 -DDEFAULT_R8 -DALLOW_USE_MPI -DHAVE_SYSTEM -DHAVE_FDATE -D
> HAVE_ETIME -DHAVE_CLOC -DHAVE_SETRLSTK -DHAVE_SIGREG -DHAVE_STAT -DHAVE_NETCDF -
> DHAVE_FLUSH  -I/usr/local/apps/mpich/x86_64/pgi105/mx127..7/include -I/he_data/h
> e/jbzambon/netcdf/netcdf-3.6.3/pgi105/mx/build/include -I/usr/local/apps/acml/ac
> ml4.3.0/pgi64/include -c iaddr.c
> ln -s ../../../tools/OAD_support/timeRatio.c .
> mpicc  -DWORDLENGTH=4 -DDEFAULT_R8 -DALLOW_USE_MPI -DHAVE_SYSTEM -DHAVE_FDATE -D
> HAVE_ETIME -DHAVE_CLOC -DHAVE_SETRLSTK -DHAVE_SIGREG -DHAVE_STAT -DHAVE_NETCDF -
> DHAVE_FLUSH  -I/usr/local/apps/mpich/x86_64/pgi105/mx127..7/include -I/he_data/h
> e/jbzambon/netcdf/netcdf-3.6.3/pgi105/mx/build/include -I/usr/local/apps/acml/ac
> ml4.3.0/pgi64/include -c timeRatio.c
> mpif90 -byteswapio -Mnodclchk  -tp amd64 -O0 -Munroll -Kieee -c OAD_intrinsics_o
> ad.f
> pgf90-Info-Switch -Munroll forces -O2
> PGF90-F-0004-Unable to open MODULE file oad_active.mod (OAD_intrinsics_oad.f: 4)
> PGF90/x86-64 Linux 10.5-0: compilation aborted
> make: *** [OAD_intrinsics_oad.o] Error 2
> failed
> 
> -------------------------------------------------------------------------------
> No results email was sent.
> Wed Jul 30 13:24:36 EDT 2014
> run: ./testreport -oad -of /he_data/he/xzeng2/MITgcm/tools/build_options/he_pgf9
> 0_mpi -t OpenAD
> on : Linux login04 2.6.18-164.el5 #1 SMP Thu Sep 3 03:28:30 EDT 2009 x86_64 x86_
> 64 x86_64 GNU/Linux
> 
>   OPTFILE=/he_data/he/xzeng2/MITgcm/tools/build_options/he_pgf90_mpi
> 
> Adjoint generated by OpenAD
> 
> default    10
> G D M    C  A  F
> e p a R  o  d  D
> n n k u  s  G  G
> 2 d e n  t  r  r
> 
> Y Y N N .. .. .. N/O   OpenAD
> 
> -- 
> Xiangming Zeng
> _______________________________________________
> MITgcm-support mailing list
> MITgcm-support at mitgcm.org
> http://mitgcm.org/mailman/listinfo/mitgcm-support


---
Patrick Heimbach | heimbach at mit.edu | http://www.mit.edu/~heimbach
MIT | EAPS 54-1420 | 77 Massachusetts Ave | Cambridge MA 02139 USA
FON +1-617-253-5259 | FAX +1-617-253-4464 | SKYPE patrick.heimbach

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mitgcm.org/pipermail/mitgcm-support/attachments/20140731/2eac1523/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 1588 bytes
Desc: not available
URL: <http://mitgcm.org/pipermail/mitgcm-support/attachments/20140731/2eac1523/attachment-0001.p7s>


More information about the MITgcm-support mailing list