[Ad-dev] [openAD] #179: need logic for explicit initialization of derivative components

OpenAD trac at mcs.anl.gov
Wed Jul 7 11:17:00 CDT 2010


#179: need logic for explicit initialization of derivative components
-------------------------+--------------------------------------------------
 Reporter:  utke         |       Owner:  hlcm         
     Type:  enhancement  |      Status:  assigned     
 Priority:  major        |   Milestone:  MATWS adjoint
Component:  xaifBooster  |    Keywords:               
-------------------------+--------------------------------------------------

Comment(by utke):

 Replying to [comment:1 utke]:
 > The current active type has a default initialization to 0  that is
 needed for correctness of the adjoint computation but is not permitted in
 Fortran if the active type occurs e.g. in an Equivalence.
 > The analog in C/C++ is the use of the active type in a "union".
 > For this scenario we need an option for explicit initialization or the
 active type of
 > A: all locally declared variables (that are not "static") in a given
 procedure
 > B: all globally declared variables at some predefined point.
 >
 > For A: a change in the xaif may be needed to distinguish scopes for
 static from non-static variables.
 > For B: the postprocessor should generate an initialization procedure to
 be called
 > by having the user inject the call into his driver code.

 Addendum to B:
 to avoid nameclashes between modules and common blocks we step through the
 global symbol table
 and for each module and each common block generate a separate init
 procedure
 all of which are kept in a list and then called in a cover-all init.
 Example:

 common /CA/ a,b,c,
 double precision a,b,c

 turns into:

 subroutine CA_init
   common /CA/ a,b,c,
   double precision a,b,c
   a%d=0   etc
 end subroutine

 and then
 subroutine OAD_globalVar_init()
 call CA_init()
 call ..._init
 end subroutine

-- 
Ticket URL: <http://trac.mcs.anl.gov/projects/openAD/ticket/179#comment:6>
OpenAD <http://www.mcs.anl.gov/openad>
Bug tracking for OpenAD components


More information about the Ad-dev mailing list