Changeset 640 for trunk/user
- Timestamp:
- Oct 1, 2019, 1:19:00 PM (5 years ago)
- Location:
- trunk/user
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/user/fft/fft.c
r638 r640 96 96 #define MODE COSIN // DATA array initialisation mode 97 97 #define CHECK 0 98 #define DEBUG_MAIN 1// trace main() function (detailed if odd)98 #define DEBUG_MAIN 0 // trace main() function (detailed if odd) 99 99 #define DEBUG_WORK 0 // trace work() function (detailed if odd) 100 100 #define DEBUG_FFT1D 0 // trace FFT1D() function (detailed if odd) 101 101 #define DEBUG_ROW 0 // trace FFTRow() function (detailed if odd) 102 102 #define PRINT_ARRAY 0 103 #define DISPLAY_SCHED_AND_VMM 0 // display final VMM state in all clusters 103 104 104 105 // macro to swap two variables … … 234 235 unsigned int ncores; // max number of cores per cluster 235 236 237 236 238 unsigned int x; // current index for cluster X coordinate 237 239 unsigned int y; // current index for cluster Y coordinate … … 258 260 #endif 259 261 262 int pid = getpid(); 263 260 264 // get FFT application start cycle 261 265 get_cycle( &start_init_cycle ); … … 311 315 312 316 printf("\n[fft] starts / %d points / %d thread(s) / PID %x / cycle %d\n", 313 N, nthreads, getpid(), (unsigned int)start_init_cycle );317 N, nthreads, pid, (unsigned int)start_init_cycle ); 314 318 315 319 // build instrumentation file name … … 498 502 } 499 503 500 // close instrumentation file501 ret = fclose( f );502 if( ret )503 {504 printf("\n[fft error] cannot close file <%s>\n", path );505 exit(0);506 }507 508 504 #if DEBUG_MAIN 509 505 get_cycle( &debug_cycle ); … … 553 549 { 554 550 unsigned int data_size = (N / nclusters) * 2 * sizeof(double); 555 unsigned int coefs_size = (rootN - 1) * 2 * sizeof(double);556 551 557 552 data[cid] = (double *)malloc( data_size ); … … 589 584 printf("\n[fft] %s : thread %d exit barrier for buffer allocation / cycle %d\n", 590 585 __FUNCTION__, tid, (unsigned int)barrier_stop ); 586 #endif 587 588 #if DISPLAY_SCHED_AND_VMM 589 unsigned int x_size; 590 unsigned int y_size; 591 unsigned int ncores; 592 get_config( &x_size , &y_size , &ncores ); 593 unsigned int x = cid / y_size; 594 unsigned int y = cid % y_size; 595 unsigned int cxy = HAL_CXY_FROM_XY( x , y ); 596 display_sched( cxy , lid ); 597 if( lid == 0 ) display_vmm( cxy , getpid() , 0 ); 591 598 #endif 592 599 … … 652 659 printf("\n[fft] %s : thread %d exit\n", 653 660 __FUNCTION__, tid ); 661 #endif 662 663 #if DISPLAY_SCHED_AND_VMM 664 printf("\n[fft] %s : thread %d exit\n", __FUNCTION__, tid ); 665 if( lid == 0 ) display_vmm( cxy , getpid() , 0 ); 654 666 #endif 655 667 -
trunk/user/ksh/ksh.c
r638 r640 400 400 if( argc < 2 ) 401 401 { 402 printf(" usage: display vmm cxy pid \n"402 printf(" usage: display vmm cxy pid mapping\n" 403 403 " display sched cxy lid\n" 404 404 " display process cxy\n" … … 416 416 else if( strcmp( argv[1] , "vmm" ) == 0 ) 417 417 { 418 if( argc != 4)419 { 420 printf(" usage: display vmm cxy pid \n");418 if( argc != 5 ) 419 { 420 printf(" usage: display vmm cxy pid mapping\n"); 421 421 } 422 422 else … … 424 424 unsigned int cxy = atoi(argv[2]); 425 425 unsigned int pid = atoi(argv[3]); 426 427 if( display_vmm( cxy , pid ) ) 426 unsigned int map = atoi(argv[4]); 427 428 if( display_vmm( cxy , pid , map ) ) 428 429 { 429 430 printf(" error: no process %x in cluster %x\n", pid , cxy );
Note: See TracChangeset
for help on using the changeset viewer.