Changeset 3644
- Timestamp:
- 04/30/10 12:01:14 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/externalpackages/scotch/gmapx.c
r3639 r3644 230 230 SCOTCH_stratInit (&stradat); /* Set default mapping strategy */ 231 231 232 printf("point 0: C_FILENBR=%d, C_fileNbr=%d, C_paraNbr=%d\n",233 C_FILENBR,C_fileNbr,C_paraNbr);234 232 for (i = 0; i < C_FILENBR; i ++) /* Set default stream pointers */ 235 233 C_fileTab[i].pntr = (C_fileTab[i].mode[0] == 'r') ? stdin : stdout; 236 234 for (i = 1; i < argcm; i ++) { /* Loop for all option codes */ 237 printf("point 1: i=%d; C_fileNbr=%d, C_fileNum=%d, C_paraNbr=%d, C_paraNum=%d\n",238 i,C_fileNbr,C_fileNum,C_paraNbr,C_paraNum);239 235 if ((argvm[i][0] != '-') || (argvm[i][1] == '\0') || (argvm[i][1] == '.')) { /* If found a file name */ 240 printf("point 2: i=%d; C_fileNbr=%d, C_fileNum=%d, C_paraNbr=%d, C_paraNum=%d\n",241 i,C_fileNbr,C_fileNum,C_paraNbr,C_paraNum);242 236 if (C_paraNum < C_paraNbr) { /* If number of parameters not reached */ 243 237 if ((C_partNbr = atoi (argvm[i])) < 1) /* Get the number of parts */ … … 246 240 continue; /* Process the other parameters */ 247 241 } 248 printf("point 3: i=%d; C_fileNbr=%d, C_fileNum=%d, C_paraNbr=%d, C_paraNum=%d\n",249 i,C_fileNbr,C_fileNum,C_paraNbr,C_paraNum);250 242 if (C_fileNum < C_fileNbr) /* A file name has been given */ 251 243 C_fileTab[C_fileNum ++].name = argvm[i]; 252 244 else 253 245 errorPrint ("main: too many file names given"); 254 printf("point 4: i=%d; C_fileNbr=%d, C_fileNum=%d, C_paraNbr=%d, C_paraNum=%d\n",255 i,C_fileNbr,C_fileNum,C_paraNbr,C_paraNum);256 246 } 257 247 else { /* If found an option name */ … … 314 304 } 315 305 } 316 printf("point 5\n");317 306 if ((flagval & C_FLAGPART) != 0) { /* If program run as the partitioner */ 318 307 C_fileTab[3].name = C_fileTab[2].name; /* Put provided file names at their right place */ … … 320 309 C_fileTab[1].name = "-"; 321 310 } 322 printf("point 6\n");323 311 324 312 fileBlockOpen (C_fileTab, C_FILENBR); /* Open all files */ 325 for (i=0; i<C_FILENBR; i++)326 printf("C_fileTab[%d]: name=\"%s\",pntr=%p,mode=\"%s\"\n",327 i,C_fileTab[i].name,C_fileTab[i].pntr,C_fileTab[i].mode);328 printf("point 7\n");329 313 330 314 clockInit (&runtime[0]); 331 315 clockStart (&runtime[0]); 332 printf("point 8\n");333 316 334 317 SCOTCH_graphInit (&grafdat); /* Create graph structure */ 335 318 SCOTCH_graphLoad (&grafdat, C_filepntrsrcinp, -1, grafflag, nvert, nedge2, adjir, adjjc, vertlab, vertwgt, edgewgt); /* Read source graph */ 336 319 337 printf("point 9\n");338 320 SCOTCH_archInit (&archdat); /* Create architecture structure */ 339 321 if ((flagval & C_FLAGPART) != 0) /* If program run as the partitioner */ … … 341 323 else 342 324 SCOTCH_archLoad (&archdat, C_filepntrtgtinp, archtyp, napar, archpar); /* Read target architecture */ 343 printf("point 10\n");344 325 345 326 clockStop (&runtime[0]); /* Get input time */ … … 347 328 clockStart (&runtime[1]); 348 329 349 printf("point 10a\n");350 330 SCOTCH_graphMapInit (&grafdat, &mapdat, &archdat, NULL); 351 printf("point 10b\n");352 331 SCOTCH_graphMapCompute (&grafdat, &mapdat, &stradat); /* Perform mapping */ 353 printf("point 11\n");354 332 355 333 clockStop (&runtime[1]); /* Get computation time */ … … 360 338 /* convert output arguments from scotch data types */ 361 339 362 /* for (i=0; i<nvert; i++)363 printf("maptab[%d][0]=%d, maptab[%d][1]=%d\n",364 i,maptab[i][0],i,maptab[i][1]); */365 340 if (maptab) { 366 341 *pmaptabi = (int (*)[2]) malloc(nvert*2*sizeof(int)); … … 371 346 free(maptab); 372 347 } 373 printf("point 12\n");374 348 375 349 clockStop (&runtime[0]); /* Get output time */ … … 380 354 putc ('\n', C_filepntrlogout); 381 355 } 382 printf("point 13\n");383 356 if (flagval & C_FLAGVERBTIM) { 384 357 fprintf (C_filepntrlogout, "T\tMapping\t\t%g\nT\tI/O\t\t%g\nT\tTotal\t\t%g\n", … … 388 361 (double) clockVal (&runtime[1])); 389 362 } 390 printf("point 14\n");391 363 if (flagval & C_FLAGVERBMAP) 392 364 SCOTCH_graphMapView (&grafdat, &mapdat, C_filepntrlogout); 393 printf("point 15\n");394 365 395 366 fileBlockClose (C_fileTab, C_FILENBR); /* Always close explicitely to end eventual (un)compression tasks */ 396 367 397 printf("point 16\n");398 368 SCOTCH_graphMapExit (&grafdat, &mapdat); 399 printf("point 16a\n");400 369 SCOTCH_graphExit (&grafdat); 401 printf("point 16b\n");402 370 SCOTCH_stratExit (&stradat); 403 printf("point 16c\n");404 371 SCOTCH_archExit (&archdat); 405 printf("point 17\n");406 372 407 373 if (archpar) free(archpar); … … 415 381 pthread_exit ((void *) 0); /* Allow potential (un)compression tasks to complete */ 416 382 #endif /* COMMON_PTHREAD */ 417 printf("point 18\n");418 383 return (0); 419 384 }
Note:
See TracChangeset
for help on using the changeset viewer.