Changeset 520
- Timestamp:
- Jul 2, 2014 11:38:39 AM (5 years ago)
- Location:
- trunk/ADOL-C/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ADOL-C/src/ampisupport.cpp
r470 r520 51 51 ourADTOOL_AMPI_FPCollection.popGSVinfo_fp=&ADTOOL_AMPI_popGSVinfo; 52 52 ourADTOOL_AMPI_FPCollection.push_CallCode_fp=&ADTOOL_AMPI_push_CallCode; 53 ourADTOOL_AMPI_FPCollection.push_CallCodeReserve_fp=&ADTOOL_AMPI_push_CallCodeReserve; 53 54 ourADTOOL_AMPI_FPCollection.pop_CallCode_fp=&ADTOOL_AMPI_pop_CallCode; 54 55 ourADTOOL_AMPI_FPCollection.push_AMPI_Request_fp=&ADTOOL_AMPI_push_AMPI_Request; … … 245 246 + sizeof(adouble)*(dtdata->last_active_block_lengths[dt_idx]-1); 246 247 } 247 else { activeVarCount = count; bitCountToFirstActive = 0; bitCountToLastActive = count-1; }248 else { activeVarCount = count; bitCountToFirstActive = 0; bitCountToLastActive = (count-1)*sizeof(adouble); } 248 249 if (count>0) { 249 250 assert(buf); … … 479 480 put_op(ampi_allgather); 480 481 break; 482 default: 483 assert(0); 484 break; 485 } 486 } 487 } 488 489 void ADTOOL_AMPI_push_CallCodeReserve(enum AMPI_CallCode_E thisCall, unsigned int numlocations) { 490 if (ADOLC_CURRENT_TAPE_INFOS.traceFlag) { 491 switch(thisCall) { 481 492 case AMPI_GATHERV: 482 put_op (ampi_gatherv);493 put_op_reserve(ampi_gatherv, numlocations); 483 494 break; 484 495 case AMPI_SCATTERV: 485 put_op (ampi_scatterv);496 put_op_reserve(ampi_scatterv, numlocations); 486 497 break; 487 498 case AMPI_ALLGATHERV: 488 put_op (ampi_allgatherv);499 put_op_reserve(ampi_allgatherv, numlocations); 489 500 break; 490 501 default: -
trunk/ADOL-C/src/tapedoc/tapedoc.c
r515 r520 106 106 double *val,int ncst, double* cst) { 107 107 int i; 108 109 ++op_cnt;110 --rev_op_cnt;111 108 112 109 checkPageBreak(); … … 180 177 int i; 181 178 182 ++op_cnt;183 --rev_op_cnt;184 185 179 checkPageBreak(); 186 180 … … 207 201 /*--------------------------------------------------------------------------*/ 208 202 void filewrite_end( int opcode ) { 209 ++op_cnt;210 --rev_op_cnt;211 203 #ifdef ADOLC_TAPE_DOC_VALUES 212 204 fprintf(fp," %i & %i & %i & end of tape & & & & & & & & & & \\\\ \\hline \n",op_cnt,rev_op_cnt, opcode); … … 282 274 /* globals */ 283 275 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; 285 277 286 278 dp_T0 = myalloc1(ADOLC_CURRENT_TAPE_INFOS.stats[NUM_MAX_LIVES]); 287 279 288 280 operation=get_op_f(); 281 ++op_cnt; 282 --rev_op_cnt; 289 283 while (operation !=end_of_tape) { 284 ++op_cnt; 285 --rev_op_cnt; 290 286 switch (operation) { 291 287 … … 298 294 get_op_block_f(); 299 295 operation=get_op_f(); 296 ++op_cnt; 297 --rev_op_cnt; 300 298 /* Skip next operation, it's another end_of_op */ 301 299 break; … … 1410 1408 1411 1409 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; 1427 1429 #endif 1428 1430 /*--------------------------------------------------------------------------*/ … … 1437 1439 /* Read the next operation */ 1438 1440 operation=get_op_f(); 1441 ++op_cnt; 1442 --rev_op_cnt; 1439 1443 } /* endwhile */ 1440 1444
Note: See TracChangeset
for help on using the changeset viewer.