Changes between Version 8 and Version 9 of ticket/0829
- Timestamp:
- 2011-06-03T14:55:54+02:00 (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ticket/0829
v8 v9 116 116 CALL nemo_deallocate(zwi) ! end routine 117 117 }}} 118 It was implemented in wrk_nemo_2 and implemented for test in traadv_tvd. To avoid changing all routines before a definitive choice, we choose to keep the old way and duplicate wrk_nemo in wrk_nemo_2 (later saved as wrk_nemo_2_simple), so we declare the double amount of memory .[[BR]]118 It was implemented in wrk_nemo_2 and implemented for test in traadv_tvd. To avoid changing all routines before a definitive choice, we choose to keep the old way and duplicate wrk_nemo in wrk_nemo_2 (later saved as wrk_nemo_2_simple), so we declare the double amount of memory, this would of course not be the case if it was implemented in all routines[[BR]] 119 119 To avoid memory leaks, we could check for instance at the end of step that each counter is equal to one. 120 120 121 121 ==== 3- Dynamic dynamic memory ==== 122 123 The point here is to avoid to have hard-coded the maximum of potential work arrays in use, and to optimize the memory size, especially for applications expensive in memory (biogeochemistry, assimilation)[[BR]] 124 Here again, as a preliminary test, the implementation is done is w and the previous one is renamed wrk_nemo_2_simple.[[BR]] 125 For each type of work arrays, we use an associated chained list to build the working arrays needed. But when we exit a routine, we do not destroy the working array created but we just point back to the beginning of the list. Actually at the end of the first time step we should have built all the memory needed. 122 126 123 127