Opened 9 years ago

Closed 3 years ago

#896 closed Enhancement (duplicate)

test dynamical allocation performances

Reported by: smasson Owned by: nemo
Priority: low Milestone:
Component: OCE Version: release-3.4
Severity: Keywords: 2011 nemo_v3_4*
Cc: Review:
MP ready?:
Progress:

Description

Provide a shell script rewrite_nemo.sh to remove the use of all wkr_alloc and wrk_dealloc and replace it by automatic allocation on the stack.

→ it is much simpler (and should help us with AGRIF….)
→ performance could be (slightly, much ?) better…

This shell script has been added to TOOLS/MISCELLANEOUS

I tested this script with ORCA2_LIM and ORCA2_LIM3 (same solver.stat) and I also tested the compilation with ORCA2_LIM (+key_esopa), ORCA2_LIM_PISCES.

Note:

  • This script is not changing the BDY files that are too complicated to be automatically modified.
  • This script doesn't work properly when k[ijkl]start optional parameter is used un work_alloc. → indices used in the definition of the dimension of concerned variables are changed with a specific sed at the end of the script.
  • This shell script may need a modern grep, egrep and sed… It works with:
    egrep (GNU grep) 2.5.1
    grep (GNU grep) 2.5.1
    GNU sed version 4.2.1
    

There is an example of utilisation:

cd blabla/dev_NEMO_MERGE_2011/NEMOGCM
rsync -av NEMO/ NEMOtst/                    # create a new sources directory
cd NEMOtst/
../TOOLS/MISCELLANEOUS/rewrite_nemo.sh      # rewrite sources in this new directory
cd ../CONFIG
./makenemo -n ORCA2_LIM -s NEMOtst -j 4     # compile these new sources

Commit History (2)

ChangesetAuthorTimeChangeLog
3210smasson2011-12-10T09:05:59+01:00

dev_NEMO_MERGE_2011: add script to rewrite the dynamical allocation, see ticket #896

3209smasson2011-12-10T09:04:49+01:00

dev_NEMO_MERGE_2011: syntaxe change to dynamical allocation, see ticket #896

Change History (12)

comment:1 Changed 9 years ago by smasson

done. need changeset:3210

comment:2 Changed 9 years ago by trackstand

A couple of comments:

I discovered recently that simply changing the declaration of an array from ALLOCATABLE to POINTER can hit performance. Doing this for a couple of heavily used arrays increased the mean time to do a time step by 5-10% depending on whether the PGI or Intel compiler was used.

Although using automatic arrays might possibly improve performance, this has to be balanced against the fact that once a program runs out of stack space (on which it puts such arrays) it will crash. Such a crash cannot be caught and therefore no explanation can be given to the user/developer as to why their job has failed.

comment:3 Changed 4 years ago by nicolasmartin

  • Keywords 2011 Developer Interface Stream added

comment:4 Changed 4 years ago by nicolasmartin

  • Keywords interfaces added; Interface removed

comment:5 Changed 4 years ago by nicolasmartin

  • Keywords Developer removed

comment:6 Changed 4 years ago by nicolasmartin

  • Keywords nemo_v3_4_alpha added

comment:7 Changed 4 years ago by nicolasmartin

  • Keywords Stream interfaces removed

comment:8 Changed 4 years ago by nicolasmartin

  • Milestone 2011 Stream 2: Developer Interface deleted

Milestone 2011 Stream 2: Developer Interface deleted

comment:9 Changed 4 years ago by nicolasmartin

  • Keywords nemo_v3_4* added; nemo_v3_4_alpha removed

comment:10 Changed 3 years ago by lovato

  • Resolution set to duplicate
  • Status changed from new to closed

This is quite old issue and more recently it was decided to remove the use of all wkr_alloc and wrk_dealloc.

This ticket will be closed and users interested on this development are addressed to the specific action of WP2017
https://forge.ipsl.jussieu.fr/nemo/wiki/2017WP/HPC-02_TimGraham_allocate

comment:11 Changed 3 years ago by nemo

  • Keywords release-3.4* added; nemo_v3_4* removed

comment:12 Changed 3 years ago by nemo

  • Keywords release-3.4* removed
Note: See TracTickets for help on using tickets.