/[MITgcm]/MITgcm/pkg/cost/cost_final_store.F
ViewVC logotype

Annotation of /MITgcm/pkg/cost/cost_final_store.F

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (hide annotations) (download)
Wed Mar 5 23:39:53 2003 UTC (21 years, 3 months ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint51k_post, checkpoint57m_post, checkpoint52l_pre, hrcube4, hrcube5, checkpoint57g_pre, checkpoint50c_post, checkpoint57s_post, checkpoint58b_post, checkpoint57b_post, checkpoint52d_pre, checkpoint57g_post, checkpoint56b_post, checkpoint50c_pre, checkpoint57y_post, checkpoint52j_pre, checkpoint51o_pre, checkpoint54d_post, checkpoint54e_post, checkpoint51l_post, checkpoint57r_post, checkpoint57d_post, checkpoint57i_post, checkpoint50d_pre, checkpoint52k_post, checkpoint59, checkpoint58, checkpoint55, checkpoint54, checkpoint57, checkpoint56, checkpoint51, checkpoint50, checkpoint53, checkpoint52, checkpoint50d_post, checkpoint58f_post, checkpoint52f_post, checkpoint57n_post, checkpoint58d_post, checkpoint58a_post, checkpoint50b_pre, checkpoint57z_post, checkpoint54f_post, checkpoint51f_post, checkpoint58y_post, checkpoint51d_post, checkpoint51t_post, checkpoint58t_post, checkpoint51n_post, checkpoint55i_post, checkpoint58m_post, checkpoint57l_post, checkpoint52i_pre, hrcube_1, hrcube_2, hrcube_3, checkpoint51s_post, checkpoint57t_post, checkpoint55c_post, checkpoint51j_post, checkpoint52e_pre, checkpoint57v_post, checkpoint57f_post, checkpoint52e_post, checkpoint51n_pre, checkpoint53d_post, checkpoint57a_post, checkpoint57h_pre, checkpoint52b_pre, checkpoint54b_post, checkpoint58w_post, checkpoint57h_post, checkpoint51l_pre, checkpoint52m_post, checkpoint57y_pre, checkpoint55g_post, checkpoint51q_post, checkpoint51b_pre, checkpoint52b_post, checkpoint52c_post, checkpoint51h_pre, checkpoint58o_post, checkpoint57c_post, checkpoint50f_post, checkpoint50a_post, checkpoint50f_pre, checkpoint58p_post, checkpoint58q_post, checkpoint52f_pre, checkpoint55d_post, checkpoint58e_post, checkpoint54a_pre, checkpoint53c_post, checkpoint55d_pre, checkpoint57c_pre, checkpoint58r_post, checkpoint55j_post, branchpoint-genmake2, checkpoint54a_post, checkpoint55h_post, checkpoint58n_post, checkpoint51r_post, checkpoint51i_post, checkpoint57e_post, checkpoint55b_post, checkpoint51b_post, checkpoint51c_post, checkpoint53a_post, checkpoint59e, checkpoint59d, checkpoint59g, checkpoint59f, checkpoint59a, checkpoint55f_post, checkpoint59c, checkpoint59b, checkpoint59h, checkpoint52d_post, checkpoint53g_post, checkpoint57p_post, checkpint57u_post, checkpoint50g_post, checkpoint57q_post, eckpoint57e_pre, checkpoint58k_post, checkpoint52a_pre, checkpoint58v_post, checkpoint50h_post, checkpoint52i_post, checkpoint50e_pre, checkpoint50i_post, checkpoint51i_pre, checkpoint52h_pre, checkpoint56a_post, checkpoint58l_post, checkpoint53f_post, checkpoint57h_done, checkpoint52j_post, checkpoint50e_post, checkpoint57j_post, checkpoint57f_pre, checkpoint58g_post, branch-netcdf, checkpoint52l_post, checkpoint58x_post, checkpoint52n_post, checkpoint53b_pre, checkpoint58h_post, checkpoint56c_post, checkpoint58j_post, checkpoint51e_post, checkpoint57a_pre, checkpoint55a_post, checkpoint49, checkpoint57o_post, checkpoint51o_post, checkpoint57k_post, checkpoint51f_pre, checkpoint53b_post, checkpoint52a_post, checkpoint57w_post, checkpoint58i_post, checkpoint51g_post, ecco_c52_e35, checkpoint57x_post, checkpoint50b_post, checkpoint58c_post, checkpoint58u_post, checkpoint51m_post, checkpoint53d_pre, checkpoint58s_post, checkpoint55e_post, checkpoint54c_post, checkpoint51a_post, checkpoint51p_post, checkpoint51u_post
Branch point for: branch-genmake2, branch-nonh, tg2-branch, netcdf-sm0, checkpoint51n_branch
Changes since 1.1: +54 -0 lines
Modif.s for correct DIVA handling:
  Modif.s in
  - ecco_the_main_loop.F
  - ecco_the_model_main.F
  and added cost_final_restore.F cost_final_store.F
  o With these changes, it is possible to fully separate
    the first forward run to compute the cost function (mdthe_main_loop)
    and adjoint runs over individual DIVA intervals (adthe_main_loop)
    into separate model executions.
    This enables better tuning of DIVA to given queue sizes.
  o Loss of cost function value in consecutive DIVA runs is
    fixed by storing to 'costfinal' file.
  o Appropriate call of ctrl_unpack/_pack,grdchk_main at
    beginning/end of adjoint integration is accounted for.
  The current changes apply to TAF-1.4.26.
  TAF has one remaining bug, requiring one manual change
  (see MITgcm manual).

1 heimbach 1.2 C $Header: /u/gcmpack/MITgcm/pkg/cost/Attic/cost_final_store.F,v 1.1.2.1 2003/03/04 21:04:38 heimbach Exp $
2    
3     #include "COST_CPPOPTIONS.h"
4    
5    
6     subroutine cost_final_store ( mythid, lastdiva )
7    
8     c ==================================================================
9     c SUBROUTINE cost_final_store
10     c ==================================================================
11     c
12     c Store cost function value
13     c This is required in conjunction with DIVA
14     c heimbach@mit.edu 5-Mar-2003
15     c
16     c ==================================================================
17     c SUBROUTINE cost_final_store
18     c ==================================================================
19    
20     implicit none
21    
22     c == global variables ==
23    
24     #include "EEPARAMS.h"
25     #include "SIZE.h"
26    
27     #include "cost.h"
28    
29     c == routine arguments ==
30    
31     integer mythid
32     logical lastdiva
33    
34     # ifdef ALLOW_DIVIDED_ADJOINT
35    
36     c == local variables ==
37    
38     c == end of interface ==
39    
40     c-- Each process has calculated the global part for itself.
41     lastdiva = .FALSE.
42    
43     IF (myProcId .eq. 0) THEN
44     _BEGIN_MASTER( mythid )
45     open(unit=76,file='costfinal')
46     write(76,*) fc
47     close(76)
48     _END_MASTER( mythid )
49     ENDIF
50     _BARRIER
51    
52     #endif
53    
54     end

  ViewVC Help
Powered by ViewVC 1.1.22