User Tools

Site Tools


haas:spring2016:sysprog:projects:pnc0

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
haas:spring2016:sysprog:projects:pnc0 [2016/02/23 15:43] – created wedgehaas:spring2016:sysprog:projects:pnc0 [2016/02/25 18:12] (current) – [Check Results] wedge
Line 286: Line 286:
  
 <cli> <cli>
-lab46:~/src/sysprog/pnc0$ primerun+lab46:~/src/cprog/pnc0$ primerun
 ============================================ ============================================
-   range       brute        sqrt         opt+   range       brute        sqrt         opt 
 ============================================ ============================================
-          0.000002    0.000009    0.000001 +          0.000002    0.000002    0.000002   
-      16    0.000002    0.000003    0.000002 +      16    0.000002    0.000002    0.000002   
-      32    0.000003    0.000007    0.000002 +      32    0.000003    0.000004    0.000002   
-      64    0.000005    0.000006    0.000002 +      64    0.000005    0.000020    0.000003   
-     128    0.000012    0.000008    0.000003 +     128    0.000012    0.000023    0.000003   
-     256    0.000038    0.000027    0.000006 +     256    0.000037    0.000029    0.000006   
-     512    0.000178    0.000036    0.000012 +     512    0.000165    0.000036    0.000014   
-    1024    0.000540    0.000081    0.000028 +    1024    0.000540    0.000080    0.000033   
-    2048    0.001779    0.000190    0.000066 +    2048    0.001761    0.000187    0.000078   
-    4096    0.006087    0.000448    0.000163 +    4096    0.006115    0.000438    0.000189   
-    8192    0.021272    0.001037    0.000414 +    8192    0.021259    0.001036    0.000458   
-   16384    0.077553    0.002529    0.001028 +   16384    0.077184    0.002520    0.001153   
-   32768    0.281896    0.006146    0.002621 +   32768    0.281958    0.006156    0.002826   
-   65536    1.046907    0.015268    0.006740 +   65536    1.046501    0.015234    0.007135   
-  131072    5.160277    0.045539    0.020873 +  131072    5.160141    0.045482    0.021810   
-  262144   18.302749    0.119166    0.055821+  262144    --------    0.119042    0.057520   
 +  524288    --------    0.301531    0.146561   
 + 1048576    --------    0.758027    0.370700   
 + 2097152    --------    1.921014    0.943986   
 + 4194304    --------    4.914725    2.423202   
 + 8388608    --------    --------    --------  
 ============================================ ============================================
-lab46:~/src/sysprog/pnc0$ + verify:       OK          OK          OK      
 +============================================ 
 +lab46:~/src/cprog/pnc0$ 
 </cli> </cli>
  
-To mitigate errant values, each test is run 4 times, and the resulting time is averaged.+For evaluation, each test is run 4 times, and the resulting time is averaged. During development, I have it set to only run each test once. 
 + 
 +If the runtime of a particular prime variant exceeds an upper threshold (likely to be set at 2 seconds), it will be omitted from further tests, and a series of dashes will instead appear in the output.
  
 If you don't feel like waiting, simply hit **CTRL-c** and the script will terminate. If you don't feel like waiting, simply hit **CTRL-c** and the script will terminate.
  
 +In the example output above, my **primeopt** is playing with an implementation of the **6a+/-1** algorithm.
 +
 +I also include a validation check- to ensure your prime programs are actually producing the correct list of prime numbers. If the check is successful, you will see "OK" displayed beneath in the appropriate column; if unsuccessful, you will be "MISMATCH".
 +
 +If you'd like to experiment with other variations, the script also recognizes prime variants of the following names:
 +  * primeopt0 (for an additional optimization)
 +  * primeopt1 (and another)
 +  * primeopt2 (if you'd like another entry for another optimization)
 +  * primeopt3 (for yet another optimization)
 +  * primeopt4 (and one more; hey, I want you to have nice things)
 =====Submission===== =====Submission=====
 To successfully complete this project, the following criteria must be met: To successfully complete this project, the following criteria must be met:
haas/spring2016/sysprog/projects/pnc0.1456242184.txt.gz · Last modified: 2016/02/23 15:43 by wedge