Changeset 629 for trunk/user
- Timestamp:
- May 17, 2019, 9:27:04 AM (6 years ago)
- Location:
- trunk/user
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/user/fft/fft.c
r628 r629 538 538 exit(0); 539 539 } 540 printf("\n[ sort] file <%s> closed\n", path );540 printf("\n[fft] file <%s> closed\n", path ); 541 541 542 542 exit( 0 ); … … 570 570 571 571 #if DEBUG_SLAVE 572 printf("\n[fft] %s : thread % xenter / cycle %d\n",572 printf("\n[fft] %s : thread %d enter / cycle %d\n", 573 573 __FUNCTION__, MyNum, (unsigned int)parallel_start ); 574 574 #endif 575 576 // BARRIER 577 get_cycle( &barrier_start ); 578 pthread_barrier_wait( &barrier ); 579 get_cycle( &barrier_stop ); 580 sync_time[MyNum] += (barrier_stop - barrier_start); 581 582 // printf("\n[@@@] %s : thread %d exit first barrier / cycle %d\n", 583 // __FUNCTION__, MyNum, (unsigned int)barrier_stop ); 575 584 576 585 // allocate and initialise local array upriv[] … … 592 601 FFT1D( 1 , data , trans , upriv , twid , MyNum , MyFirst , MyLast ); 593 602 594 // BARRIER595 get_cycle( &barrier_start );596 pthread_barrier_wait( &barrier );597 get_cycle( &barrier_stop );598 599 sync_time[MyNum] += (barrier_stop - barrier_start);600 601 603 #if CHECK 602 604 get_cycle( &barrier_start ); 603 605 pthread_barrier_wait( &barrier ); 604 606 get_cycle( &barrier_stop ); 605 606 607 sync_time[MyNum] += (long)(barrier_stop - barrier_start); 607 608 608 FFT1D( -1 , data , trans , upriv , twid , MyNum , MyFirst , MyLast ); 609 609 #endif … … 688 688 { 689 689 unsigned int i , j; 690 double cks;691 690 unsigned int c_id; 692 691 unsigned int c_offset; 692 double cks; 693 693 694 694 cks = 0.0; … … 849 849 unsigned long long cycle; 850 850 get_cycle( &cycle ); 851 printf("\n[fft] %s : thread % xenter / first %d / last %d / cycle %d\n",851 printf("\n[fft] %s : thread %d enter / first %d / last %d / cycle %d\n", 852 852 __FUNCTION__, MyNum, MyFirst, MyLast, (unsigned int)cycle ); 853 853 #endif … … 858 858 #if( DEBUG_FFT1D & 1 ) 859 859 get_cycle( &cycle ); 860 printf("\n[fft] %s : thread % xafter first transpose / cycle %d\n",860 printf("\n[fft] %s : thread %d after first transpose / cycle %d\n", 861 861 __FUNCTION__, MyNum, (unsigned int)cycle ); 862 862 if( PRINT_ARRAY ) PrintArray( tmp , N ); … … 871 871 #if( DEBUG_FFT1D & 1 ) 872 872 get_cycle( &cycle ); 873 printf("\n[fft] %s : thread % xexit barrier after first transpose / cycle %d\n",873 printf("\n[fft] %s : thread %d exit barrier after first transpose / cycle %d\n", 874 874 __FUNCTION__, MyNum, (unsigned int)cycle ); 875 875 #endif … … 884 884 885 885 #if( DEBUG_FFT1D & 1 ) 886 printf("\n[fft] %s : thread % xafter first twiddle\n", __FUNCTION__, MyNum);886 printf("\n[fft] %s : thread %d after first twiddle\n", __FUNCTION__, MyNum); 887 887 if( PRINT_ARRAY ) PrintArray( tmp , N ); 888 888 #endif … … 894 894 895 895 #if( DEBUG_FFT1D & 1 ) 896 printf("\n[fft] %s : thread % xexit barrier after first twiddle\n", __FUNCTION__, MyNum);896 printf("\n[fft] %s : thread %d exit barrier after first twiddle\n", __FUNCTION__, MyNum); 897 897 #endif 898 898 … … 903 903 904 904 #if( DEBUG_FFT1D & 1 ) 905 printf("\n[fft] %s : thread % xafter second transpose\n", __FUNCTION__, MyNum);905 printf("\n[fft] %s : thread %d after second transpose\n", __FUNCTION__, MyNum); 906 906 if( PRINT_ARRAY ) PrintArray( x , N ); 907 907 #endif … … 913 913 914 914 #if( DEBUG_FFT1D & 1 ) 915 printf("\n[fft] %s : thread % xexit barrier after second transpose\n", __FUNCTION__, MyNum);915 printf("\n[fft] %s : thread %d exit barrier after second transpose\n", __FUNCTION__, MyNum); 916 916 #endif 917 917 … … 926 926 927 927 #if( DEBUG_FFT1D & 1 ) 928 printf("\n[fft] %s : thread % xafter FFT on rows\n", __FUNCTION__, MyNum);928 printf("\n[fft] %s : thread %d after FFT on rows\n", __FUNCTION__, MyNum); 929 929 if( PRINT_ARRAY ) PrintArray( x , N ); 930 930 #endif … … 936 936 937 937 #if( DEBUG_FFT1D & 1 ) 938 printf("\n[fft] %s : thread % xexit barrier after FFT on rows\n", __FUNCTION__, MyNum);938 printf("\n[fft] %s : thread %d exit barrier after FFT on rows\n", __FUNCTION__, MyNum); 939 939 #endif 940 940 sync_time[MyNum] += (long)(barrier_stop - barrier_start); … … 954 954 955 955 #if( DEBUG_FFT1D & 1 ) 956 printf("\n[fft] %s : thread % xexit barrier after third transpose\n", __FUNCTION__, MyNum);956 printf("\n[fft] %s : thread %d exit barrier after third transpose\n", __FUNCTION__, MyNum); 957 957 #endif 958 958 … … 964 964 965 965 #if DEBUG_FFT1D 966 printf("\n[fft] %s : thread % xcompleted\n", __FUNCTION__, MyNum);966 printf("\n[fft] %s : thread %d completed\n", __FUNCTION__, MyNum); 967 967 if( PRINT_ARRAY ) PrintArray( x , N ); 968 968 #endif -
trunk/user/ksh/ksh.c
r628 r629 1187 1187 else 1188 1188 { 1189 printf("\n[ksh] load bin/user/ sort.elf\n");1189 printf("\n[ksh] load bin/user/fft.elf\n"); 1190 1190 } 1191 1191 1192 strcpy( cmd , "load bin/user/ sort.elf" );1192 strcpy( cmd , "load bin/user/fft.elf" ); 1193 1193 execute( cmd ); 1194 1194 */ -
trunk/user/sort/sort.c
r628 r629 29 29 #include <hal_macros.h> 30 30 31 #define ARRAY_LENGTH 1024// number of items31 #define ARRAY_LENGTH 4096 // number of items 32 32 #define MAX_THREADS 1024 // 16 * 16 * 4 33 33 … … 423 423 424 424 #if CHECK_RESULT 425 426 425 int success = 1; 427 426 int * res_array = ( (total_threads == 2) || … … 444 443 if ( success ) printf("\n[sort] success\n"); 445 444 else printf("\n[sort] failure\n"); 446 447 445 #endif 448 446 449 447 #if INSTRUMENTATION 450 451 448 char name[64]; 452 449 char path[128]; 453 450 unsigned long long instru_cycle; 454 451 455 // build a file name from n_items / n_clusters / n_cores456 if( USE_DQT_BARRIER ) snprintf( name , 64 , "sort_dqt_%d_%d_%d",457 458 else snprintf( name , 64 , "sort_smp_%d_%d_%d",459 452 // build file name 453 if( USE_DQT_BARRIER ) 454 snprintf( name , 64 , "sort_dqt_%d_%d_%d", ARRAY_LENGTH, x_size * y_size, ncores ); 455 else 456 snprintf( name , 64 , "sort_smp_%d_%d_%d", ARRAY_LENGTH, x_size * y_size, ncores ); 460 457 461 458 // build file pathname … … 471 468 " - parallel : %d cycles\n", 472 469 name, sequencial, parallel ); 473 474 #if IDBG475 idbg();476 #endif477 470 478 471 // open file
Note: See TracChangeset
for help on using the changeset viewer.