Different configurations of the full setup, using cost = \sum_{i,j} theta(i,j)**2 They include: 1. Single-processor: a. with hand-written AD routines * output_nompi_handad_adm.txt (FAIL) * output_nompi_handad_tlm.txt (OK) b. without hand-written AD routines for exch2_rx2_cube * output_nompi_nohandad_adm.txt (OK) * output_nompi_nohandad_tlm.txt (OK) 2. MPI setup for 4 processors: a. with hand-written AD routines All header files (stuff in code_ad*) and input files (stuff in input_ad*) are kept in one directory. Depending on experiment, the relevant files are copied over from appropriate templates (see below). This helps ensuring that as little as possible changes between setups, and it it transparent exactly what has changed. Compile and run: ---------------- # Prepare experiments in exe_ad_t2 cd exe_ad_t2/ ln -s ../build_ad_t2/mitgcmuv_ad . ln -s ../build_ad_t2/mitgcmuv_ftl . ln -s ../input_ad_t2/* . ln -s ../input_fields/* . Exp. 1.a.: ---------- # prepare setup headers cd ../code_ad_t2/ # # ensure that you're using single-proc. topology # by re-copying relevant files (mostly redundant) cp topol_32x32/* . # # copy .flow, .list for case "hand-written" adjoint cp exch2_ad_diff.list_rl2_cube_hand_ad exch2_ad_diff.list cp exch2.flow_rl2_cube_hand_ad exch2.flow # # generate ADM and TLM and compile cd ../build_ad_t2 ../../../tools/genmake2 -mods ../code_ad_t2 make CLEAN make depend make adall make ftlall # # run ADM and TLM cd ../exe_ad_t2/ rm *.??ta ./mitgcmuv_ad >! output_nompi_handad_adm.txt ./mitgcmuv_ftl >! output_nompi_handad_tlm.txt Exp. 1.b.: ---------- # prepare setup headers cd ../code_ad_t2/ # # ensure that you're using single-proc. topology # by re-copying relevant files (mostly redundant) cp topol_32x32/* . # # copy .flow, .list for case "NON-hand-written" adjoint cp exch2_ad_diff.list_rl2_cube_nohand_ad exch2_ad_diff.list cp exch2.flow_rl2_cube_nohand_ad exch2.flow # # generate ADM and TLM and compile cd ../build_ad_t2 ../../../tools/genmake2 -mods ../code_ad_t2 make CLEAN make depend make adall make ftlall # # run ADM and TLM cd ../exe_ad_t2/ rm *.??ta ./mitgcmuv_ad >! output_nompi_nohandad_adm.txt ./mitgcmuv_ftl >! output_nompi_nohandad_tlm.txt Exp. 2.a.: ---------- # prepare setup headers cd ../code_ad_t2/ # # ensure that you're using multi-proc. topology with MPI(!!!) # by copying relevant files \cp -f topol_16x16/* . \cp -f SIZE.h_mpi SIZE.h # # copy .flow, .list for case "hand-written" adjoint cp exch2_ad_diff.list_rl2_cube_hand_ad exch2_ad_diff.list cp exch2.flow_rl2_cube_hand_ad exch2.flow # # generate ADM and TLM and compile cd ../build_ad_t2 ../../../tools/genmake2 -mpi -mods ../code_ad_t2 ###../../../tools/genmake2 -mpi -fc ifort -of ../../../tools/build_options/linux_amd64_ifort_generic_mpi -mods ../code_ad_t2 make CLEAN make depend make adall make ftlall # # run ADM and TLM cd ../exe_ad_t2/ rm *.??ta mpiexec -np 4 mitgcmuv_ad >! output_mpi_handad_adm.txt mpiexec -np 4 mitgcmuv_ftl >! output_mpi_handad_tlm.txt