New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 6582 for branches/2016/dev_HPC_Gyre_benchmark_test/NEMOGCM/TOOLS/COUNTERS/TESTS – NEMO

Ignore:
Timestamp:
2016-05-20T09:47:27+02:00 (8 years ago)
Author:
timgraham
Message:

Commit Martin's changes to COUNTERS tool including a new timing/performance module that does not use string comparisons.

Location:
branches/2016/dev_HPC_Gyre_benchmark_test/NEMOGCM/TOOLS/COUNTERS/TESTS
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/2016/dev_HPC_Gyre_benchmark_test/NEMOGCM/TOOLS/COUNTERS/TESTS/Makefile

    r6540 r6582  
    1 FC=ifort 
     1FC=gfortran 
    22PAPI_INC=/users/home/opt/papi/papi-5.1.0/include/ 
    33PAPI_LIB=/users/home/opt/papi/papi-5.1.0/lib/ 
     
    55 
    66all: 
    7    ${FC} -o nemo_test nemo_test.F90 -I${PAPI_INC} -L${PAPI_LIB} -lpapi -L${COUNTERS_LIB} -lpm 
     7#  ${FC} -I${PAPI_INC} -L${PAPI_LIB} -L${COUNTERS_LIB} -lperf_regions -o nemo_test nemo_test.F90  -lpapi 
     8   ${FC} -g -I${PAPI_INC} -L${PAPI_LIB} -L${COUNTERS_LIB} ../*.o -o nemo_test nemo_test.F90  -lpapi 
    89 
    910clean : 
    1011   rm nemo_test 
     12 
  • branches/2016/dev_HPC_Gyre_benchmark_test/NEMOGCM/TOOLS/COUNTERS/TESTS/nemo_test.F90

    r6540 r6582  
     1#include "../perf_region_defines.h" 
     2 
    13PROGRAM nemo 
    24 
    35     interface 
    4         subroutine counting_init ( ) bind ( C,       & 
    5      & name ="counting_init" ) 
    6                 use iso_c_binding 
    7         end subroutine counting_init 
    8  
    9         subroutine counting_start ( ) bind ( C,       & 
    10      & name ="counting_start" ) 
    11                 use iso_c_binding 
    12         end subroutine counting_start 
    13  
    14         subroutine counting_stop ( ) bind ( C,        & 
    15      & name ="counting_stop" ) 
    16                 use iso_c_binding 
    17         end subroutine counting_stop 
     6        subroutine perf_regions_init ( ) bind ( C,       & 
     7     & name ="perf_regions_init" ) 
     8                use iso_c_binding 
     9        end subroutine perf_regions_init 
     10 
     11 
     12        subroutine perf_regions_finalize ( ) bind ( C,       & 
     13     & name ="perf_regions_finalize" ) 
     14                use iso_c_binding 
     15        end subroutine perf_regions_finalize 
     16 
     17 
     18        subroutine perf_region_start (id, measure_type) bind ( C,       & 
     19     & name ="perf_region_start" ) 
     20                use iso_c_binding 
     21                INTEGER, VALUE, INTENT(IN) ::id 
     22                INTEGER, VALUE, INTENT(IN) ::measure_type 
     23        end subroutine perf_region_start 
     24 
     25        subroutine perf_region_stop (id) bind ( C,        & 
     26     & name ="perf_region_stop" ) 
     27                use iso_c_binding 
     28                INTEGER, VALUE, INTENT(IN) ::id 
     29        end subroutine perf_region_stop 
     30 
    1831      end interface 
    1932 
     33     call perf_regions_init() 
     34 
    2035     CALL test 
     36     CALL test 
     37 
     38     call perf_regions_finalize() 
    2139 
    2240CONTAINS 
     
    3553   INTEGER                                   :: ji, jj, jk 
    3654   CHARACTER(len=10)                         :: env 
     55 
     56   call perf_region_start (PERF_REGIONS_FOO,  IOR(PERF_TIMINGS, PERF_COUNTERS)) 
    3757 
    3858   CALL get_environment_variable("JPI", env) 
     
    94114!*********************** 
    95115 
    96    call counting_init() 
    97    call counting_start () 
    98116   DO jk = 1, jpk 
    99117     DO jj = 1, jpj 
     
    239257       END DO 
    240258     END DO 
    241     
    242      call counting_stop() 
    243259 
    244260     DEALLOCATE(mydomain) 
     
    260276     DEALLOCATE(tsn) 
    261277 
     278     call perf_region_stop(PERF_REGIONS_FOO) 
     279 
    262280     end subroutine test 
    263281 
  • branches/2016/dev_HPC_Gyre_benchmark_test/NEMOGCM/TOOLS/COUNTERS/TESTS/run_job

    r6540 r6582  
    55export JPK=72 
    66 
     7# 
     8# Use papi_avail command to check available performance counters 
     9# These are part of papi-tools package 
     10# 
    711export NUM_COUNTERS=2 
    812export LIST_COUNTERS=FP_COMP_OPS_EXE,PAPI_L3_TCM 
    913 
     14export NUM_COUNTERS=1 
     15export LIST_COUNTERS=PAPI_L3_TCM 
     16 
    1017./nemo_test 
Note: See TracChangeset for help on using the changeset viewer.