Changeset 138 for trunk/Softwares/SPECINT2000/src/c
- Timestamp:
- May 12, 2010, 7:34:01 PM (14 years ago)
- Location:
- trunk/Softwares/SPECINT2000/src/c
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Softwares/SPECINT2000/src/c/benchmark.c
r119 r138 9 9 #endif 10 10 11 //#define SPEC_DATA "ref" 12 #define SPEC_DATA "test" 13 //#define SPEC_DATA "train" 14 11 #if !defined(SPECINT2000_TEST) && !defined(SPECINT2000_TRAIN) && !defined(SPECINT2000_REF) 12 # error "SPECINT2000_TEST, SPECINT2000_TRAIN or SPECINT2000_REF must be defined" 13 #endif 14 15 #if defined(SPECINT2000_TEST) 16 # error "SPECINT2000_TEST not yet supported" 17 #endif 18 19 #if defined(SPECINT2000_REF) 20 # error "SPECINT2000_REF not yet supported" 21 #endif 22 23 #ifdef SPEC_gzip 15 24 int main_164_gzip (int argc, char * argv[]); 25 #endif 26 #ifdef SPEC_vpr 16 27 int main_175_vpr (int argc, char * argv[]); 28 #endif 29 #ifdef SPEC_gcc 17 30 int main_176_gcc (int argc, char * argv[]); 31 #endif 32 #ifdef SPEC_mcf 18 33 int main_181_mcf (int argc, char * argv[]); 34 #endif 35 #ifdef SPEC_vortex 19 36 int main_255_vortex (int argc, char * argv[]); 37 #endif 38 #ifdef SPEC_bzip 20 39 int main_256_bzip2 (int argc, char * argv[]); 40 #endif 41 #ifdef SPEC_twolf 21 42 int main_300_twolf (int argc, char * argv[]); 43 #endif 22 44 23 45 //======================================================================================= … … 33 55 // [ run_164_gzip ] 34 56 //======================================================================================= 35 void run_164_gzip () 36 { 37 printf("***** 164.gzip - Begin *****\n"); 38 57 #ifdef SPECINT2000_TRAIN 58 void main_164_gzip_train () 59 { 60 #ifdef SPEC_gzip 39 61 int argc = 4; 40 62 char ** argv; … … 83 105 84 106 free(filename); 85 107 #endif 108 } 109 #endif 110 111 void run_164_gzip () 112 { 113 printf("***** 164.gzip - Begin *****\n"); 114 115 #ifdef SPECINT2000_TRAIN 116 main_164_gzip_train (); 117 #endif 118 86 119 printf("***** 164.gzip - End *****\n"); 87 } 120 } 88 121 89 122 //======================================================================================= 90 123 // [ run_175_vpr ] 91 124 //======================================================================================= 92 void run_175_vpr () 93 { 94 printf("***** 175.vpr - Begin *****\n"); 125 126 #ifdef SPECINT2000_TRAIN 127 void main_175_vpr_train () 128 { 129 #ifdef SPEC_vpr 95 130 96 131 #define nb_option_175_vpr 12 … … 208 243 free(routed_out ); 209 244 245 #endif 246 } 247 #endif 248 249 void run_175_vpr () 250 { 251 printf("***** 175.vpr - Begin *****\n"); 252 253 #ifdef SPECINT2000_TRAIN 254 main_175_vpr_train (); 255 #endif 256 210 257 printf("***** 175.vpr - End *****\n"); 211 } 258 } 212 259 213 260 //======================================================================================= 214 261 // [ run_176_gcc ] 215 262 //======================================================================================= 216 void run_176_gcc () 217 { 218 printf("***** 176.gcc - Begin *****\n"); 263 #ifdef SPECINT2000_TRAIN 264 void main_176_gcc_train () 265 { 266 #ifdef SPEC_gcc 219 267 220 268 #define nb_option_176_gcc 2 … … 294 342 free(filename); 295 343 344 #endif 345 } 346 #endif 347 348 void run_176_gcc () 349 { 350 printf("***** 176.gcc - Begin *****\n"); 351 352 #ifdef SPECINT2000_TRAIN 353 main_176_gcc_train (); 354 #endif 355 296 356 printf("***** 176.gcc - End *****\n"); 297 } 357 } 358 298 359 299 360 //======================================================================================= 300 361 // [ run_181_mcf ] 301 362 //======================================================================================= 302 void run_181_mcf () 303 { 304 printf("***** 181.mcf - Begin *****\n"); 363 #ifdef SPECINT2000_TRAIN 364 void main_181_mcf_train () 365 { 366 #ifdef SPEC_mcf 305 367 306 368 int argc = 2; … … 334 396 free(filename); 335 397 398 #endif 399 } 400 #endif 401 402 void run_181_mcf () 403 { 404 printf("***** 181.mcf - Begin *****\n"); 405 406 #ifdef SPECINT2000_TRAIN 407 main_181_mcf_train (); 408 #endif 409 336 410 printf("***** 181.mcf - End *****\n"); 337 } 411 } 338 412 339 413 //======================================================================================= 340 414 // [ run_255_vortex ] 341 415 //======================================================================================= 342 void run_255_vortex () 343 { 344 printf("***** 255.vortex - Begin *****\n"); 416 #ifdef SPECINT2000_TRAIN 417 void main_255_vortex_train () 418 { 419 #ifdef SPEC_vortex 345 420 346 421 int argc = 2; … … 348 423 349 424 char * execname = "./vortex"; 425 #if defined(MORPHEO) 350 426 char *_filename = "/255.vortex/data/test/input/bendian.raw"; 427 #else 428 # if (defined(EV67) || defined(x86)) 429 char *_filename = "/255.vortex/data/test/input/lendian.raw"; 430 # else 431 # error "Unknow target" 432 # endif 433 #endif 434 351 435 char * filename = (char *) malloc(strlen(SPECINT2000_PATH)+strlen(_filename)); 352 436 strcpy(filename,SPECINT2000_PATH); strcat(filename,_filename); … … 373 457 free(filename); 374 458 459 #endif 460 } 461 #endif 462 463 void run_255_vortex () 464 { 465 printf("***** 255.vortex - Begin *****\n"); 466 467 #ifdef SPECINT2000_TRAIN 468 main_255_vortex_train (); 469 #endif 470 375 471 printf("***** 255.vortex - End *****\n"); 376 } 472 } 377 473 378 474 //======================================================================================= 379 475 // [ run_256_bzip2 ] 380 476 //======================================================================================= 381 void run_256_bzip2 () 382 { 383 printf("***** 256.bzip2 - Begin *****\n"); 477 #ifdef SPECINT2000_TRAIN 478 void main_256_bzip2_train () 479 { 480 #ifdef SPEC_bzip 384 481 385 482 int argc = 4; … … 429 526 free(filename); 430 527 528 #endif 529 } 530 #endif 531 532 void run_256_bzip2 () 533 { 534 printf("***** 256.bzip2 - Begin *****\n"); 535 536 #ifdef SPECINT2000_TRAIN 537 main_256_bzip2_train (); 538 #endif 539 431 540 printf("***** 256.bzip2 - End *****\n"); 432 541 } … … 435 544 // [ run_300_twolf ] 436 545 //======================================================================================= 437 void run_300_twolf () 438 { 439 printf("***** 300.twolf - Begin *****\n"); 546 #ifdef SPECINT2000_TRAIN 547 void main_300_twolf_train () 548 { 549 #ifdef SPEC_twolf 440 550 441 551 int argc = 2; … … 443 553 444 554 char * execname = "./twolf"; 445 char *_circuitName 446 char * circuitName 555 char *_circuitName = "/300.twolf/data/test/input/test"; 556 char * circuitName = (char *) malloc(strlen(SPECINT2000_PATH)+strlen(_circuitName)); 447 557 strcpy(circuitName,SPECINT2000_PATH); strcat(circuitName,_circuitName); 448 558 … … 468 578 free(circuitName); 469 579 580 #endif 581 } 582 #endif 583 584 void run_300_twolf () 585 { 586 printf("***** 300.twolf - Begin *****\n"); 587 588 #ifdef SPECINT2000_TRAIN 589 main_300_twolf_train (); 590 #endif 591 470 592 printf("***** 300.twolf - End *****\n"); 471 593 } 472 473 /*474 //=======================================================================================475 // [ run_dhry21 ]476 //=======================================================================================477 void run_dhry21 ()478 {479 printf("***** dhry2.1 - Begin *****\n");480 481 int argc = 2;482 char ** argv;483 484 char * execname = "./dhry21";485 char * numberOfRuns = "2000";486 487 // Create the arguments488 if (argc != 2)489 {490 printf("Usage : dhry21 numberOfRuns\n");491 return;492 }493 494 argv = (char **)malloc (argc * sizeof(char *));495 496 argv[0] = (char *) malloc (strlen(execname ));497 argv[0] = memcpy(argv[0],execname ,strlen(execname ));498 argv[1] = (char *) malloc (strlen(numberOfRuns ));499 argv[1] = memcpy(argv[1],numberOfRuns ,strlen(numberOfRuns ));500 501 // Run the benchmark502 main_dhry21 (argc,argv);503 504 printf("***** dhry2.1 - End *****\n");505 }506 */ -
trunk/Softwares/SPECINT2000/src/c/main.c
r117 r138 16 16 int main() 17 17 { 18 #ifdef MORPHEO 18 19 int pid = (int)getpid(); 19 20 … … 25 26 else 26 27 printf("The number of function in the workload is %d. (maximum of thread is : %d)\n",(int)NB_WORKLOAD,NB_THREAD_MAX); 28 #endif 29 30 #ifdef UNIX 31 for (int i=0; i<(int)NB_WORKLOAD; ++i) 32 (*WorkLoad[i])(); 33 #endif 27 34 28 35 exit (0);
Note: See TracChangeset
for help on using the changeset viewer.