Starting a configuration for OpenAD 19-Aug-2005, heimbach@mit.edu, utke@mcs.anl.gov, cnh@mit.edu ############################################################ This experiment is derived from global_ocean.90x40x15, but excludes packages gmredi, kpp. STEP 1: ###### To bypass incomplete canonicalizer, convert COMMON blocks to MODULES. Successfully completed. The built process needed to be modified, and some routines needed changes. Most changes were commited to default routines, the remaining changes are kept in code/ for now. To build: -------- o short version: --------------- make makefile ; make depend ; make cb2m ; make makefile ; make small_f ; make allmods ; make o long version: -------------- # (chdir to built/; assume we are in built/) # # generate makefile using ifort and modified genmake2 in ../code/ ../code/genmake2 -of ../../../tools/build_options/linux_ia32_ifort -mods ../code # # make dependencies make depend # # invoke script to convert COMMON block headers to MODULE headers # converts FILE.h to FILE_mod.h which uses newi module FILE_mod.F90 make cb2m # # re-generate makefile which takes into account newly created files # FILE_mod.h, FILE_mod.F90 make makefile # # make .f, .f90 make small_f # # first compile all module files .f90 make allmods # # compile everything else make To clean: -------- # Since soft links get overwritten, for now do: make CLEAN ; rm *.F *.F90 *.h to run: ------ # paremeter files are in input/ ln -s ../input/* . # initial and forcing fields are elsewhere; # get these from verif. exp. global_ocean.90x40x15/input/*.bin ln -s ../../global_ocean.90x40x15/input/*.bin . ./mitgcmuv >! output.txt STEP 2: ###### Generate code for AD-related routines. Similar to step 1, but look in code_ad/ instead of code/ To build: -------- o short version: --------------- ../code_ad/genmake2 -of ../../../tools/build_options/linux_ia32_ifort -adof ../../../tools/adjoint_options/adjoint_f95 -mods ../code_ad make adall STEP 3: ###### Compare reference outputs. ------------------ SINGLE-LAYER SETUP: _openad, _taf ------------------ # uncompress outputs in results_... directories: gunzip ../results_shallow_*/output.txt.gz # extract gradients from TAF-generated adjoint: grep grad-res ../results_shallow_taf/output.txt # extract gradients from OpenAD-generated adjoint: grep ' salt/theta ' ../results_shallow_openad/output.txt The two positions tested via gradient checks (results_shallow_taf) are (i,j,k) = (43,2,1) and (44,2,1) Find corresponding locations in ' salt/theta ' output (which outputs whole theta, salt gradient) ------------------ 15-LAYER-SETUP : _openad2, _taf2 ------------------ first working setup of 05-Aug-2006 ran for 12 timesteps on itrda.acesgrid.org under /net/ds-06/scratch-0/utke/cvs/MITgcm/verification/OpenAD/run_ph_baroclin/ uses Atlantic heat transport cost function; * OpenAD output is in results_shallow_openad2/ grep ' salt/theta ' ../results_shallow_openad2/output.txt * TAF output is in results_shallow_taf2/ grep grad-res ../results_shallow_taf2/output.txt The positions tested via gradient checks (results_shallow_taf2) are (i,j,k) = (78,26,1) ------------------ 15-LAYER-SETUP WITH GMREDI: _openad3, _taf3 ------------------ not yet run.