![]() ![]() You're running one process on a multi-core machine - so it only runs on one core. If you know anything about optimising code to work on 90's Cray super computers give us a shout too! Of course this program didn't really work with the Crays 8 specialist processors, and that is a whole other issue. exe that could be easily distributed and ran on Windows machines. However I only got 5% usage! So my question is, how can I adapt the program to run on my gaming machine in either Windows 7 or live Linux at 100% CPU utilisation? Another thing that would be great but not necessary is if the end product can be one. I figured that must be Windows being Windows, so I booted into a Live CD of Ubuntu thinking that Ubuntu would allow the process to run with its full potential as it had done earlier on my laptop. ![]() I first adapted the code to run on Windows since that is what the gaming PC was using, but was saddened to find that the process was only getting about 15% of the CPU's power. When I got home I decided to try it on my hex-core modern gaming PC, and this is where we get our first issues. Which on our dual core laptop running Ubuntu (The Cray runs UNICOS), worked perfectly, getting 100% CPU usage and taking about 10 minutes or so. Printf("This machine calculated all %d prime numbers under 1000 in %g seconds\n", primes, runTime) RunTime = (end - start) / (double) CLOCKS_PER_SEC Printf("%d prime numbers calculated\n",primes) We quickly came up with this code to count prime numbers: #include We decided the best way to do this was to write a simple C program that would calculate prime numbers and show how long it took to do so, then run the program on a fast modern desktop PC and compare the results. I work at The National Museum of Computing, and we have just managed to get a Cray Y-MP EL super computer from 1992 running, and we really want to see how fast it can go! This is quite an interesting question so let me set the scene. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |