Changeset 520


Ignore:
Timestamp:
Jul 2, 2014 11:38:39 AM (5 years ago)
Author:
kulshres
Message:

Merge branch 'ampi' from 'aragonne'

The following commits were merged:

commit ba102836ff4533dc70f99c992b1fb2a6bf532c49
Author: Max Sagebaum <sagebaum@…>
Date: Mon Jun 30 15:44:54 2014 +0200

Fix of buffer length in ampi_pushSR

commit 918a9e2a60fb2c2d36617db95a96b16ca798e408
Author: Michel Schanen <schanen@…>
Date: Mon Jun 30 13:42:58 2014 +0200

Fix for the ampi tracing beyond chunk size

Using put_op_reserve instead of put_op for Gatherv and Scatterv. New function
push_CallCodeReserve with additional location number argument.

commit 00994d40a5d29bfcf40bebd22f3306bdaad86e92
Author: Jean Utke <utke@…>
Date: Fri Mar 28 15:57:29 2014 -0500

rearrange

commit a1c1d11ab0e2af58d43aaeb92f6e4982ce81d92f
Author: Jean Utke <utke@…>
Date: Fri Mar 28 15:29:47 2014 -0500

make it consistent and count in the loop rather than jumping of the duplicates like the end of tape ones and leaving it to guess to the user why the rev count doesn't got down to 1

commit bf1acc6155cd555bc35e8b9c6241097b4b833345
Author: Jean Utke <utke@…>
Date: Fri Mar 28 13:38:02 2014 -0500

fix up allgatherv output for chasing a misalignment observed in ISSM

Location:
trunk/ADOL-C/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/ADOL-C/src/ampisupport.cpp

    r470 r520  
    5151  ourADTOOL_AMPI_FPCollection.popGSVinfo_fp=&ADTOOL_AMPI_popGSVinfo;
    5252  ourADTOOL_AMPI_FPCollection.push_CallCode_fp=&ADTOOL_AMPI_push_CallCode;
     53  ourADTOOL_AMPI_FPCollection.push_CallCodeReserve_fp=&ADTOOL_AMPI_push_CallCodeReserve;
    5354  ourADTOOL_AMPI_FPCollection.pop_CallCode_fp=&ADTOOL_AMPI_pop_CallCode;
    5455  ourADTOOL_AMPI_FPCollection.push_AMPI_Request_fp=&ADTOOL_AMPI_push_AMPI_Request;
     
    245246        + sizeof(adouble)*(dtdata->last_active_block_lengths[dt_idx]-1);
    246247    }
    247     else { activeVarCount = count; bitCountToFirstActive = 0; bitCountToLastActive = count-1; }
     248    else { activeVarCount = count; bitCountToFirstActive = 0; bitCountToLastActive = (count-1)*sizeof(adouble); }
    248249    if (count>0) {
    249250      assert(buf);
     
    479480        put_op(ampi_allgather);
    480481        break;
     482      default:
     483        assert(0);
     484        break;
     485    }
     486  }
     487}
     488
     489void ADTOOL_AMPI_push_CallCodeReserve(enum AMPI_CallCode_E thisCall, unsigned int numlocations) {
     490  if (ADOLC_CURRENT_TAPE_INFOS.traceFlag) {
     491    switch(thisCall) {
    481492      case AMPI_GATHERV:
    482         put_op(ampi_gatherv);
     493        put_op_reserve(ampi_gatherv, numlocations);
    483494        break;
    484495      case AMPI_SCATTERV:
    485         put_op(ampi_scatterv);
     496        put_op_reserve(ampi_scatterv, numlocations);
    486497        break;
    487498      case AMPI_ALLGATHERV:
    488          put_op(ampi_allgatherv);
     499         put_op_reserve(ampi_allgatherv, numlocations);
    489500         break;
    490501      default:
  • trunk/ADOL-C/src/tapedoc/tapedoc.c

    r515 r520  
    106106                double *val,int ncst, double* cst) {
    107107    int i;
    108 
    109     ++op_cnt;
    110     --rev_op_cnt;
    111108
    112109    checkPageBreak();
     
    180177    int i;
    181178
    182     ++op_cnt;
    183     --rev_op_cnt;
    184 
    185179    checkPageBreak();
    186180
     
    207201/*--------------------------------------------------------------------------*/
    208202void filewrite_end( int opcode ) {
    209     ++op_cnt;
    210     --rev_op_cnt;
    211203#ifdef ADOLC_TAPE_DOC_VALUES
    212204  fprintf(fp," %i & %i & %i & end of tape & & & & & & & & & &  \\\\ \\hline \n",op_cnt,rev_op_cnt, opcode);
     
    282274    /* globals */
    283275    op_cnt=0;
    284     rev_op_cnt=ADOLC_CURRENT_TAPE_INFOS.stats[NUM_OPERATIONS];
     276    rev_op_cnt=ADOLC_CURRENT_TAPE_INFOS.stats[NUM_OPERATIONS]+1;
    285277
    286278    dp_T0 = myalloc1(ADOLC_CURRENT_TAPE_INFOS.stats[NUM_MAX_LIVES]);
    287279
    288280    operation=get_op_f();
     281    ++op_cnt;
     282    --rev_op_cnt;
    289283    while (operation !=end_of_tape) {
     284      ++op_cnt;
     285      --rev_op_cnt;
    290286        switch (operation) {
    291287
     
    298294                get_op_block_f();
    299295                operation=get_op_f();
     296                ++op_cnt;
     297                --rev_op_cnt;
    300298                /* Skip next operation, it's another end_of_op */
    301299                break;
     
    14101408
    14111409            case ampi_allgatherv:
    1412                 TAPE_AMPI_read_int(loc_a+1); /* commSizeForRootOrNull */
    1413                 for (l=0;l<*(loc_a+1);++l) {
    1414                   TAPE_AMPI_read_int(loc_a+2); /* rcnts */
    1415                   TAPE_AMPI_read_int(loc_a+2); /* displs */
    1416                 }
    1417                 if (*(loc_a+1)>0) {
    1418                   loc_a[2] = get_locint_f(); /* rbuf loc */
    1419                   TAPE_AMPI_read_MPI_Datatype(&anMPI_Datatype); /* rtype */
    1420                 }
    1421                 TAPE_AMPI_read_int(loc_a+3); /* count */
    1422                 TAPE_AMPI_read_MPI_Datatype(&anMPI_Datatype); /* type */
    1423                 TAPE_AMPI_read_MPI_Comm(&anMPI_Comm);
    1424                 TAPE_AMPI_read_int(loc_a+1); /* commSizeForRootOrNull */
    1425                 filewrite_ampi(operation, "ampi allgatherv",4, loc_a);
    1426                 break;
     1410              size=0;
     1411              TAPE_AMPI_read_int(loc_a+size++); /* commSizeForRootOrNull */
     1412              for (l=0;l<*(loc_a);++l) {
     1413                TAPE_AMPI_read_int(loc_a+size); /* rcnts */
     1414                TAPE_AMPI_read_int(loc_a+size+1); /* displs */
     1415              }
     1416              if (*(loc_a)>0) {
     1417                size+=2;
     1418                loc_a[size++] = get_locint_f(); /* rbuf loc */
     1419                TAPE_AMPI_read_MPI_Datatype(&anMPI_Datatype); /* rtype */
     1420              }
     1421              loc_a[size++] = get_locint_f(); /* buf loc */
     1422              TAPE_AMPI_read_int(loc_a+size++); /* count */
     1423              TAPE_AMPI_read_MPI_Datatype(&anMPI_Datatype); /* type */
     1424              TAPE_AMPI_read_int(loc_a+size++); /* root */
     1425              TAPE_AMPI_read_MPI_Comm(&anMPI_Comm);
     1426              TAPE_AMPI_read_int(loc_a); /* commSizeForRootOrNull */
     1427              filewrite_ampi(operation, "ampi allgatherv",size, loc_a);
     1428              break;
    14271429#endif
    14281430                /*--------------------------------------------------------------------------*/
     
    14371439        /* Read the next operation */
    14381440        operation=get_op_f();
     1441        ++op_cnt;
     1442        --rev_op_cnt;
    14391443    }  /* endwhile */
    14401444
Note: See TracChangeset for help on using the changeset viewer.