Warning, /verification/global_oce_latlon/README is written in an unsupported language. File is not indexed.
view on githubraw file Latest commit 5bc99689 on 2023-08-01 13:40:46 UTC
e0b4ec0942 Patr*0001 Starting a configuration for OpenAD
0002 19-Aug-2005, heimbach@mit.edu, utke@mcs.anl.gov, cnh@mit.edu
0003 ############################################################
d6a28d3589 Jean*0004
72e6b3423c Mart*0005 This experiment is derived from global_ocean.90x40x15.
0006 Additionally it tests packages gmredi, kpp, and ggl90.
d6a28d3589 Jean*0007
2594214889 Jean*0008 --------------------------------------
0009 Part 1, using OpenAD Adjoint Compiler:
0010 -------
0011
e0b4ec0942 Patr*0012 The built process needed to be modified, and some routines
0013 needed changes. Most changes were commited to default routines,
72e6b3423c Mart*0014 the remaining changes are kept in code_oad/ for now.
d6a28d3589 Jean*0015
e0b4ec0942 Patr*0016 To build:
2594214889 Jean*0017 # (chdir to build/; assume we are in build/)
e0b4ec0942 Patr*0018
2594214889 Jean*0019 # Clean-up (if not starting from clean build dir):
0020 > make CLEAN
e0b4ec0942 Patr*0021 --------------
2594214889 Jean*0022 # generate makefile using gfortran and genmake2:
0023 > ../../../tools/genmake2 -oad -of ../../../tools/build_options/linux_amd64_gfortran -mods ../code_oad
0024
0025 # compile everything else
0026 > make adAll
0027
0028 # Note: might want to split the full single step above (make adAll) in several intermediate steps
0029 # such as:
0030 # a) invoke script to convert COMMON block headers to MODULE headers
e0b4ec0942 Patr*0031 # converts FILE.h to FILE_mod.h which uses newi module FILE_mod.F90
2594214889 Jean*0032 > make cb2m
e0b4ec0942 Patr*0033 #
2594214889 Jean*0034 # b) re-generate makefile which takes into account newly created files
e0b4ec0942 Patr*0035 # FILE_mod.h, FILE_mod.F90
2594214889 Jean*0036 > make makefile
e0b4ec0942 Patr*0037 #
2594214889 Jean*0038 # c) make .f, .f90
0039 > make small_f
e0b4ec0942 Patr*0040 #
2594214889 Jean*0041 # d) first compile all module files .f90
0042 > make allmods
e0b4ec0942 Patr*0043 #
2594214889 Jean*0044 # e) then finaly compile all f90 src files:
0045 > make adAll
e0b4ec0942 Patr*0046
0047 To clean:
0048 --------
0049 # Since soft links get overwritten, for now do:
2594214889 Jean*0050 > make CLEAN
e0b4ec0942 Patr*0051
2594214889 Jean*0052 To run:
0053 # chdir to run/; assume we are in run/, if not:
0054 > cd ../run
e0b4ec0942 Patr*0055 ------
2594214889 Jean*0056 # paremeter files are in input_oad/
0057 > ln -s ../input_oad/* .
0058 # link other forcing fields (binary files) from exp. tutorial_global_oce_latlon
0059 > ../input_oad/prepare_run
e0b4ec0942 Patr*0060
2594214889 Jean*0061 # run a short test:
0062 > ln -s ../build/mitgcmuv_ad
0063 > ./mitgcmuv_ad > output.txt
f383408a87 Jean*0064
2594214889 Jean*0065 -----------------------------------
0066 Part 2, using TAF Adjoint Compiler:
0067 -------
0068 similar to above but using set-up specific code from code_ad/ and input files from input_ad/
0c781de767 Patr*0069
0070 To build:
2594214889 Jean*0071 # assume we are in build/
0072
0073 # Clean-up (if not starting from clean build dir):
0074 > make CLEAN
0075 # generate makefile using gfortran and genmake2:
0076 > ../../../tools/genmake2 -of ../../../tools/build_options/linux_amd64_gfortran -mods ../code_ad
0077
0078 # generate dependencies:
0079 > make depend
0080
0081 # generate AD src code and compile
0082 > make adall
0083
0084 To run:
0085 # assume we are in run/, if not:
0086 > cd ../run
f383408a87 Jean*0087
2594214889 Jean*0088 # link parameter files:
0089 > ln -s ../input_ad/* .
0090 # link other forcing fields (binary files) from exp. tutorial_global_oce_latlon
0091 > ../input_ad/prepare_run
f383408a87 Jean*0092
2594214889 Jean*0093 # run a short test:
0094 > ln -s ../build/mitgcmuv_ad
0095 > ./mitgcmuv_ad > output.txt