Stories
Slash Boxes
Comments

News for nerds, stuff that matters

Slashdot Log In

Log In

Create Account  |  Retrieve Password

Can You Spare A Few Trillion Cycles?

Posted by timothy on Tue Apr 13, 2004 03:03 AM
from the distributing-the-light dept.
rkeene517 writes "11 years ago I did a simulation of 29 billion photons in a room, that got published at SIGGRAPH 94. The 1994 image, called Photon Soup is here . Now computers are 3000 times faster and I am doing it again only much better, with a smaller aperature, in stereo, with 3 cameras, and with some errors fixed, and in Java. The 1994 image took 100 Sparc Station 1's a month to generate. I need volunteers to run the program for about a month in the background and/or nights. The program is pure Java." Read on for how you can participate in the project.

"The plan is to run the program on a zillion machines for a month and combine the results. All you have to do is run it and when the deadline arrives, email me a compressed file of the cache directory. So email me here and I'll send you the zip file. The deadline will be June 1st 2004.

The running program has a More CPU/Less CPU button. Every half hour it saves the current state of the film. The longer and more machines that run this, the cleaner and sharper the image gets. If you have a lot of machines, I can give instructions how to combine the results so you can send in a single cache directory.

Of course, you will get mention in the article if it gets published."

+ -
story
This discussion has been archived. No new comments can be posted.
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More
Loading... please wait.
  • Java eh? (Score:5, Funny)

    by Anonymous Coward on Tuesday April 13 2004, @03:05AM (#8845535)
    Java eh? So it should run at about the same speed now on modern hardware as it did a decade ago? Chortle.
    • Re:Java eh? (Score:5, Interesting)

      by Anonymous Coward on Tuesday April 13 2004, @04:23AM (#8845885)
      It depends. If you use Java Objects instead of C / C++ int, then probably yes. If you use Java int instead of C++ int, then the speed is about the same. And you will find absolutely no difference if you need floating point.

      I did quite a lot of C++ and Java programming. At one point, I thought: 'oh, I have now a beautiful and quite fast Java fractal application (mandelbrot), let's convert that to C++ and it will be even faster.'. It was even slower in C++ (probably because of the C++ compiler, Visual Studio). And that was quite a long time back. The link is: http://users.quick-line.ch/thomasm
      • Re:Java eh? (Score:5, Insightful)

        by AllUsernamesAreGone (688381) on Tuesday April 13 2004, @05:33AM (#8846073)
        This is true for pure number crunching where you spend a lot of time in loops.

        Java is quite good at that.

        Now, try writing a real application. One with an interface, one that does real work and spends most of its time interacting with a user rather than banging numbers. Run the test again and you'll find that C++ is significantly faster than Java in this situation because Swing is slower than arthritic snail carrying a small planet and Hotspot isn't good at optimising the sort of stuff a general program has to do.
                  • Re:Java eh? (Score:5, Informative)

                    by markbthomas (123470) on Tuesday April 13 2004, @04:33PM (#8853279)

                    Given that this was an exercise, I'm somewhat tempted to ask whether you aren't counting the JVM startup time on top of a very short problem instance.

                    C: 30 seconds, Java: 8 hours. No kidding. These were running on the same laboratory machines, the Java programs using the latest Sun JVM at the time. The exercise involved calculating some statistics from a simulation run for one virtual year. Most of the people doing the Java version had to leave it running overnight. Besides, JVM startup time is a performance issue, you can't just dismiss it out of hand.

                    That, or whether the exercise involved lots of dynamic creation of objects (in which case your program was by definition not doing the same thing as the Java implementations). The exercise you mention sort of sounds like that.

                    In the Java version, each event was an object. In C each event was a malloc'd struct. These are analagous in that they are the correct way to solve the problem in that particular language. The fact that object creation and destruction is a lengthy process is an important reason why Java is so slow. It's an object-oriented language, its raison d'etre is to create and destroy objects. If it can't do that fast enough then what's the point in it being able to do anything else with speed?

                    I know at this point the Java apologists will say "just use a pool of pre-created Objects, that'll speed it up". This misses the point in two ways: (1) Java was supposed to obviate the need to perform manual memory handling. Now I have to not only remember to de-allocate my objects when I am done with them, I have to write a Pool class within which to store my not-currently-in-use objects?! (2) I can do that in C, too, if I really want to, and it'll make the C version faster again.

                    I am well aware of the forte of Haskell and its different interpreter implementations. To the degree that I wouldn't be surprised if the Haskell implementation did better than your C implementation.

                    They didn't. I was told they took around 10 minutes to run, but I never actually saw them working. When I produced results from a simulation that ran for 1000 years (an overnight run for my C program), the professor was amazed. But yes, in my experience interpreted Haskell is very fast, which makes Java look even more foolish.

                    I've done this four times now; written a C equivalent of a Java program and found it at least one, often several orders of magnitude faster. I've yet once to be shown a Java program that is significantly faster than its C equivalent.

                    This does not mean that Java should not be used as a programming language. The language features (especially those in version 1.5) are useful for working in a collaborative environment with mediocre programmers, and where the raw performance of the application is not critical (such as a GUI front-end to a server application). Just don't bullshit about it being faster than C, or even "fast" and expect me to believe it.

                    I'm willing to be proven wrong, but until someone can actually show me proof that it can be done, I'm not going to believe the hype, hand-waving and hot air.

            • Re:Java eh? (Score:5, Informative)

              by TheLink (130905) on Tuesday April 13 2004, @05:24AM (#8846061) Journal
              His argument isn't invalid.

              rkeene517 is asking for volunteers to run the program. If rkeene517 does it in C/C++ then rkeene will have to compile for the different x86 types and ensure that volunteers download the right binary. From experience you end up getting a high number of people getting the generic x86 binary instead of the optimized one because in order to avoid zillions of support queries, you have a "If you are unsure, click on i386".

              Of course you could bundle all the various binaries and add code or a binary that figures out what x86 it is and runs the relevant binary.

              But that involves a step more than what you suggest.
                • by Z-MaxX (712880) on Tuesday April 13 2004, @08:49AM (#8847323) Journal
                  can continuously re-optimize code based on the state of the system at that exact point in time. This is the critical point.

                  For instance, let's say you have an interface I, and a class X that implements I. If X is the _only_ implementation of I loaded at the moment, then all calls to methods on I can be direct, non-virtual calls because there's only one choice! In fact, HotSpot will even inline the method calls if it decides it will be beneficial.

                  But then a class B is loaded. HotSpot will de-optimize the inlined and direct calls to methods on I.

                  There are many more examples, such as loop bounds-checking elimination, and other things HotSpot can do because it sees the state of the running system.

                  If you've used a slow Java program, it's no doubt the result of a poor design and coding job by the programmer. "I'll just pick up Java for Dummies in 24 Minutes. Now I'm a 1337 j4v4 h4x0r!!" You may also have been using an old, slow JVM. The performance increases between Java 1.2, 1.3, and 1.4 are truly awesome. Also, Sun's Java 1.5 starts up on my machine in less than half the time that 1.4.2 did, and the graphics as OpenGL accelerated now, ... the list goes on and on. For anyone who had used a Java IDE, especially NetBeans/Forte (which I like, except that it's so freakin' slow I fall asleep between operations), you must try IntelliJ IDEA [intellij.com]. It is so responsive and just a joy to use. On the systems I've run it on, it is significantly more responsive than Eclipse.

                  • by Brandybuck (704397) on Tuesday April 13 2004, @12:55PM (#8850497) Homepage Journal
                    Java has been out for how long now? Nine and a half years. A whole freaking decade! Yet every damn time someone mentions the poor performance of Java, the same standard excuses are trotted out, with an exhortation to use the new and improved Java:

                    1) That's because you're using Java 1.x. Use Java 1.y instead, it's got all these new performance features...

                    2) That's because it's using the old GUI toolkit. Use the new one instead...

                    3) That was with the old JVM. Use the new one...

                    4) That was with the old JIT. Use the new one...

                    5) That's because you're using a slow XX Hz CPU. Don't be a tight wad and upgrade to a YY Hz CPU intead...

                    Why should I believe you this time? You might actually be right, but I really don't care anymore. You had your chances, nine and a half years of them, so I'm not giving you any more.
              • Re:Java eh? (Score:5, Insightful)

                by BlackHawk-666 (560896) <ivan.hawkes@gmail.com> on Tuesday April 13 2004, @08:10AM (#8846916) Homepage
                If this is true then why is Java so goddammed slow still? Why is it every medium sized or above Java app I've used performs like crap compared to a similar one compiled in C++ or simlilar languages? It just seems to me there is a major disconnect between what the Java adherants are claiming and the reality I am faced with every time I use a Java app.
                • Re:Java eh? (Score:5, Interesting)

                  by Suidae (162977) on Tuesday April 13 2004, @08:25AM (#8847061)
                  I don't know why Java is so slow, but I wonder if it has something to do with memory requirements/managment?

                  All the Java apps I use that are not trivial tend to eat at least 100Mb of ram, and sometimes several hundred. They also tend to stomp all over my poor CPU, which, at 500-1000Mhz, really ought to be fast enough for most things (seriously, I'm not trying to crunch SETI data or crack an RC5 key here).

                  I attribute most Java slowness to poor programming techniques. Its got to be, since Java programmers are always telling me how fast the code really is; it must just be that most Java coders are so crappy that they drag that blazing fast JVM to its knees.
  • by alphakappa (687189) on Tuesday April 13 2004, @03:06AM (#8845546) Homepage
    I hear they use cycles big time there. Pretty cheap too comapared to cars.
  • by isugimpy (769087) on Tuesday April 13 2004, @03:06AM (#8845550)
    This is a wonderful thing to see. Distributed processing is a wonderful way to spend those extra clock cycles that most of us have, while at the same time benefitting someone else. I really hope to see more projects like this in the future.
  • Real URL to image (Score:4, Informative)

    by FrenZon (65408) * on Tuesday April 13 2004, @03:06AM (#8845551) Homepage
    Emailed this to the editor, but something must've gone wrong.

    The URL to the photo soup image is missing the 'www'. The image can be seen here [cpjava.net] (you may want to do a 'Save Target As', as the mime-type seems to be a bit off).
  • Java? (Score:4, Insightful)

    by Kent Simon (760127) on Tuesday April 13 2004, @03:08AM (#8845559) Homepage
    nothing against Java it has its place, but for something this CPU intensive, it seems like you'd be wasting CPU cycles. This sounds like a job for C.
    • Oh boy... (Score:5, Insightful)

      by MosesJones (55544) on Tuesday April 13 2004, @03:19AM (#8845604) Homepage

      He needs networking connection, a decent threading model and doesn't want to crash your box.

      So while he could spend a huge amount of time doing all these basic things in C and still have major risks for the people running it, he has chosen to use the right tool for the job.

      Also the Maths libraries are IEEE compliant in Java and not in C on the PC, so I'm assuming that also played in to his reasoning.

      • Re:Oh boy... (Score:4, Insightful)

        by pla (258480) on Tuesday April 13 2004, @04:07AM (#8845832) Journal
        He needs networking connection, a decent threading model and doesn't want to crash your box.

        False, on all of the above.

        For "networking", users will manually send him their cache directory (as the FP explicitly stated). As for threading... To do what? He wants to run a completely straightforward trajectory simulation, iterated a few "zillion" times. I'll admit that I have a bias against most uses of multithreading and consider them inappropriate 99.9% of the time, but if you can even force them onto this project, you need to go back to the drawing board.



        So while he could spend a huge amount of time doing all these basic things in C and still have major risks for the people running it, he has chosen to use the right tool for the job.

        Umm... Yeah, whatever. He wants to run a CPU-intensive background process, performing a totally straightforward set of calculations, and nothing else. No GUI (beyond a few simple controls to make it play nice), and nothing server-side - sounds like a perfect candidate for anything but Java.

        Personally, I'd say this even sounds like a good candidate for hand-tuned assembly. But then, at least from my alma-mater, they don't even require that to graduate in CS anymore. Sad... And people actually wonder why tech jobs keep heading for India. Well, the FP and you just provided a nice answer - Using Java for a tightly CPU-bound problem? Using threads for the same (Ever heard of "cache consistancy"? Yet another reason to avoid multithreading in a program of this nature)? Why not just downgrade to a 486? Same effect, less complex.
        • Re:Oh boy... (Score:5, Insightful)

          by David Leppik (158017) on Tuesday April 13 2004, @09:27AM (#8847734) Homepage
          He wants to run a CPU-intensive background process, performing a totally straightforward set of calculations, and nothing else. No GUI (beyond a few simple controls to make it play nice), and nothing server-side - sounds like a perfect candidate for anything but Java.
          Except that what makes Java slow is its do-it-yourself GUI and run-time object management. Those disadvantages mostly go away if you program Java as if it were C: use and re-use arrays of primative types in preference to short-lived objects, and cluster things together in memory (via arrays) when they are used together. The just-in-time compiler will convert the bytecode into machine instructions on the fly, using information that's not available at compile time.
          Personally, I'd say this even sounds like a good candidate for hand-tuned assembly.
          Okay, I'll bite. I've got two macs and to Linux boxes here. Each has a different processor architecture (Celeron, Athalon, G3, G4.) I don't know much about hand-tuning for x86, but on the G4 you shove your floats into 128-bit vectors and do your ray tracing in chunks of four floats. The G3 lacks the vector coprocessor, so you'd optimize it in a very different way.

          Besides, by writing in Java and not hand-written assembly, he gets to run it on machines like mine, which probably weren't the original target platform. The name of the game in distributed processing is to use as many spare processors as possible, even if some are slow. An hour of work to promote his project is more likely to pick up 10% more (or 1000% more, with \.) CPUs than an hour of hand-tuning assembly is likely to get 10% more speed out of a particular processor.

    • Re:Java? (Score:5, Insightful)

      by hayds (738028) on Tuesday April 13 2004, @03:22AM (#8845622)

      Java can actually be quite fast and efficient for number crunching or scientific applications because of the JIT compilers and automatic optimisation. Its only painfully slow when you need a GUI. It also has a great class library so he should be able to do things like the visualisation and the networking for the clients to send the data home relatively easily, whereas it would take a lot longer to write and debug in C.

      Also with Java, he can just offer the JAR file on his site or whatever and people can d/l it and run it. I guess this isnt really important if he's aiming at geeks, but if he's trying to get others to participate, it is handy that people wont need to worry about compiling it themselves or picking the right version (like at the seti@home site).

    • Re:Java? (Score:5, Informative)

      by Anonymous Coward on Tuesday April 13 2004, @03:32AM (#8845679)
      Not really that slow, depends on what you're doing. At work we're using a CPU intensive Java based "optimizer" that runs a hybrid Genetic Algorithm. We also have a very similar version that was coded in C++. Chances are that the C++ coders sorta sucked, but the end result has been pretty much the same. The only difference was that our Java application actually DOES run on many platforms, including Windows, SuSE, and MacOS X, without a problem. And I can't say it enough times, it's just as fast as the C++ version that only runs on Windows .
        • Re:Java? (Score:4, Insightful)

          by eric76 (679787) on Tuesday April 13 2004, @04:04AM (#8845827)

          I think the primary reason is that there are enormous numbers of numerical routines in Fortran that are extremely well debugged and validated.

          Change to other languages and those routines must be rewritten, redebugged, and revalidated.

  • by Compact Dick (518888) on Tuesday April 13 2004, @03:08AM (#8845561) Homepage
    Now ... I am doing it again only much better, with a smaller aperature [sic], in stereo, with 3 cameras ...
    The world needs more dedicated releasers like you.
  • Nah (Score:4, Funny)

    by AstrumPreliator (708436) on Tuesday April 13 2004, @03:10AM (#8845569)
    I don't feel like donating a few trillion cycles to produce an image that says "The page cannot be displayed". Possibly if you made it say, "The photons cannot be displayed", I would think about it.

    =P
  • by DigiShaman (671371) on Tuesday April 13 2004, @03:12AM (#8845579) Homepage
    The best time for these project is in the Winter time. Because, that's when I have my heater on. And if my CPU is running 100%, then the heat from it will help heat up my appartment rather then the heater needing to kick on.

    I mean, I don't mean to belittle this project. But for all grid computing projects, there is a better time and place for this in my opinion.

  • by Dominic_Mazzoni (125164) * on Tuesday April 13 2004, @03:14AM (#8845583) Homepage
    The link to the image should be http://www.cpjava.net/raytraces/DRUN.GIF [cpjava.net] (The www is necessary and was left out of the link in the article.)

    People are already cracking jokes about how the fact that it's in Java will mean that it will run a lot slower than it could. While I love to pick on Java as much as the next person, I am curious how much it actually makes a difference for raytracing - does anyone know? My experience with numerically-intensive algorithms is that Java is 2-4x slower than C. You can get it within 2x of the speed of C if you ignore object-oriented programming and you're really good at Java optimization, but that's it. And it will run much slower on some architecetures because Java guarantees certain floating-point operation semantics at the expense of speed.

    If I were writing a new numerically-intensive program from scratch that I wanted to use for a cross-platform distributed computing project, I'd probably do it in Numerical Python (NumPy) [pfdubois.com] - my experience has been that it can be within a factor of 2-3 of the speed of C, but it's much more concise, requiring half as many lines of code as Java or C to do the same thing. And these days Python is just as cross-platform as Java - it definitely runs great on Mac, Windows, and Unix.
    • by evanbd (210358) on Tuesday April 13 2004, @03:30AM (#8845669)
      Not so slow as that... I have no idea about raytracing, but I've done several compute-intensive applications with Java. Both of them, the Java code has run at most 20-30% slower than the C. The two that I have worked with recently are a program that plays Amazons (a modern board game; fairly nifty) and recently one that does stuff with MD5 (searching for partial collisions). Now, I consider myself competent at Java optimization, but by no means an expert. So, a couple minor pieces of advice for anyone who wants to make their java programs a bit faster, and doesn't really know how:

      1. Learn to use java -Xprof. This is a rudimentary profiler, but even the most basic data is useful. Concentrate on the parts that get the most use.

      2. If -Xprof says the garbage collector is taking more than about 1-2% of the cpu, it's a problem. If it's at 10%, it's costing you well more than 10% speed -- lots of reasons, like cache misses, thread switching, and the allocations in the first place.

      3. Don't delete objects in the main loop. Use factory methods and the like if you have to. This is how you decrease GC times.

      4. Some of the standard API pieces are very slow. I've had particular trouble with anything related to the Collections framework, and Strings are even worse. Avoid these.

      Now, all this takes work, but it's not particularly harder or easier than doing good optimization of C Code.

      • by Anonymous Coward on Tuesday April 13 2004, @04:58AM (#8845982)
        ...and don't forget "-server". The Sun 1.4.2VM with -server now generates SSE code, giving a nice boost to FP apps.
    • by Kunta Kinte (323399) on Tuesday April 13 2004, @03:44AM (#8845736) Homepage Journal

      My experience with numerically-intensive algorithms is that Java is 2-4x slower than C. You can get it within 2x of the speed of C if you ignore object-oriented programming and you're really good at Java optimization, but that's it. And it will run much slower on some architecetures because Java guarantees certain floating-point operation semantics at the expense of speed.

      The speed difference oft cited is about 20% on numerical apps. Check out http://www.idiom.com/~zilla/Computer/javaCbenchmar k.html [idiom.com]. He brings up " Benchmarking Java against C and Fortran for Scientific Applications [philippsen.com] as well.

      You have to remember that Java's speed disadvantage is mainly in the JVM startup and GUI areas. Although a good Java dev team can make Swing fly ( checkout JBuilder for instance ).

      Java being Just-In-Time compiled can even take advantage make runtime optimizations that your C/C++ application may not.

  • Photons (Score:5, Interesting)

    by richie2000 (159732) <rickard.olsson@gmail.com> on Tuesday April 13 2004, @03:17AM (#8845593) Homepage Journal
    Thought experiment:
    Go outside (No, it won't kill you) and look up at a bright star. Now imagine that star is in the center of a sphere and your eye is on the surface of the sphere. The aperture of your eye captures enough photons to image the star constantly. Now imagine that same amount of photons reaching all points of the sphere's surface. That's a serious bunch of photons. And the star outputs them constantly, for billions of years.

    Any biology majors here care to tell me how many photons the eye needs to 'see' a reasonably bright star? With that information, you can calculate the rest (left as an exercise for the reader).

    • Re:Photons (Score:5, Interesting)

      by Bandwidth_ (91035) on Tuesday April 13 2004, @03:41AM (#8845716) Homepage Journal
      >Any biology majors here care to tell me how many
      >photons the eye needs to 'see' a reasonably >bright star? With that information, you can
      >calculate the rest (left as an exercise for the
      >reader).

      The rods in human eyes are incredibly efficient photoreceptors. They can reportedly be triggered by individual photons under optimal conditions. This was proven by experiment in the mid 1950s sometime in a pitch black room after 30 minutes of adaptation. A controlled light source was placed at an angle of 20 degrees or so away from the eye plane and tests were done such that the absolute minimum threshold of light intensity was found. Calculations based on angle, spread, etc were made and the area the light source would hit in the eye. It was found that, as stated above, rods could reliably detect single photons.

      It's an evolutionary limit of sorts. I may be off on the procedure as I'm recalling it from an odd psychophysics book I read back at uni but I'm fairly sure of the single photon thing.
    • Re:Photons (Score:4, Interesting)

      by Yarn (75) on Tuesday April 13 2004, @03:46AM (#8845745) Homepage
      I'm a physicist, but IIRC a rod (monochrome sensor) absorbs a photon 50% of the time, and from that absorbed photon outputs a signal about 50% of the time. Hence, about 4 photons to have a high probability of detection.

      The colour sensors (cones) are less sensitive. Whilst googling for the sensitivity of these I found a page detailing the sensitivity of the eye [nus.edu.sg] It needs about 500 to 900 photons/sec to actually register. However, I've already written about rods so I'm not going to delete that!
  • Explain picture (Score:5, Interesting)

    by miike (770833) on Tuesday April 13 2004, @03:25AM (#8845639)
    I would like to know what I see in the picture before I dedicate my cycles to the project. What are those "bubbles" in the pic for example?
    • Re:Explain picture (Score:5, Informative)

      by rkeene517 (637993) on Tuesday April 13 2004, @09:07AM (#8847537) Homepage
      The old 1994 picture is of a cubic room with mirrors on the near and far walls. The 'bubbles' are refletive spheres. A beam of light comes out of the left wall, hits a prism and forms a spectrum on the right wall. The depth of field is very shallow so only objects exactly on the focal plane are in focus. The black fuzzy blob is the camera aperature, out of focus, being reflected in the far mirror. There is an error in the image. The corners of the room are bright and should not be. This is due to a poorly chosen diffuse scattering model. The current project is an almost identicle setup, with 1/4 as big of aperature. I have done about 1 billion photons on my 3 computers, and the new image looks much cleaner. I expcet it will take about a trillion photons to make a realy smooth image.
  • Trust? (Score:5, Insightful)

    by wan-fu (746576) on Tuesday April 13 2004, @03:26AM (#8845641)
    What's to insure the trust within this project? Call me a cynic, but what's preventing some jerk from swapping some bytes in his set of data before sending it off, thus, rendering your combined result different from what you intended?
  • by Xenoproctologist (698865) on Tuesday April 13 2004, @03:29AM (#8845661)
    A much larger version of the SIGGRAPH `94 image "Photon Soup", clocking in at 840x560, can be found HERE [uni-hamburg.de].
  • by theguywhosaid (751709) on Tuesday April 13 2004, @03:29AM (#8845662) Homepage
    wow, its slower than C. i'd rather run a random java app than a random native app because you can easily sandbox it and know its not going to screw your computer. thats one less barrier to people helping the dude out. and theres no recompile for the various linux platforms, win32, solaris, macOS, etc etc. its certainly slower, but more friendly to the community.
  • Enter applet. (Score:5, Insightful)

    by Kingpin (40003) on Tuesday April 13 2004, @03:32AM (#8845681) Homepage
    Applets are bad for a LOT of things. But this is one thing they would work really well for. Using an applet:

    1. The client PC runs the program in a sandbox
    2. Most client PC's don't need additional software installed (if written for JDK 1.1)
    3. The user does not need to know how to invoke a Java application
    4. There's no administrative overhead in iniating the application, just go to a URL

  • by sandwichmaker (565653) on Tuesday April 13 2004, @04:13AM (#8845857)
    Two words: Photon Mapping
    The simulation you are trying to run does not the kind of compute effort that you are planning on using. I implemented a photon map based renderer for a rendering class last year and it can render a room like the one you showed in a couple of minutes.

    The reference you are looking for is:

    Realistic Image Synthesis using Photon Mapping
    By Henrik Wann Jensen

    He is the guy who got the technical oscar this year for being one of the inventors of a method to render materials which display subsurface scattering, e.g. skin and marble.
  • by Gollum (35049) on Tuesday April 13 2004, @04:21AM (#8845879)
    MD5Crk.com has an applet on their site that does distributed calculations so long as it is visible in the browser (and assuming that you have specifically permitted it to do so). They are trying to find a collision to demonstrate that MD5 is insecure.

    This is great for a simple calculation that returns simple results (e.g.MD5), but probably wouldn't work in a situation where you have to have lots of data to work from. Of course, if you can break it down sufficiently, it might work, and I guess he has already done the work in figuring out how to break it down and recombine the results.

    See MD5Crk [md5crk.com] for the applet in question.
  • by Avt232 (691144) on Tuesday April 13 2004, @04:36AM (#8845925)
    As founder of the Distributed Hardware Evolution Project [susx.ac.uk] which is written in Java, I'd like to remind you all that the Just-In-Time compiler coupled with the real time profiling and dynamic on-the-fly optimisation that goes on in the Server VM [sun.com] makes the difference between C and Java minimal for code which is in the critical region. This is specially the case for code which is executed over and over again, such as with these distributed processing projects. In fact the guys at Sun are doing such a good job at exploiting the ever more complex characteristics of different processors that Java code is expected to run faster than C in the future. Also, during the weeks that you would spend debugging and porting your C code, your Java code has gone miles ahead doing useful stuff! If you would like to start your own Java distributed processing project, DistrIT [sf.net] might help.
  • by dummkopf (538393) on Tuesday April 13 2004, @04:38AM (#8845934) Homepage
    1 Month on 100 sparcs? Peanuts! In my research [duamutef.ethz.ch] simulations usually take (depending on the problem) up to 6 months on an average of 150 workstations (and some runs on large clusters). You wonder what I do? Spin glasses!

    Spin glasses are systems in with the interactions between magnetic moments are in conflict with each other. These competing interactions make these systems extremely hard to simulate at low enough temperatures. If you have a linux box sitting around idle which is fast enough, let me know and I will provide you with some samples to run. Current project: 100 - 300 samples, each takes ~ 10 days on a 2.4 GHz Xeon... For information on how to contact me, go to duamutef.ethz.ch [duamutef.ethz.ch]. Of course your name will be mentioned if you compute a considerable number of samples!
  • by Andy_R (114137) on Tuesday April 13 2004, @05:06AM (#8846004) Homepage Journal
    You could cut your rendering time down to about 1/200th sec by employing the following hardware:

    old cookie tin
    2 marbles
    cheap disposable camera and a... ...whatever that blurry thing top right is supposed to be.

    The resultant time saving could be usefully employed learing how the gif file format works.
    • by LarsWestergren (9033) on Tuesday April 13 2004, @03:22AM (#8845624) Homepage Journal
      He sounds like a clever guy, but "pure Java" for number crunching!?! With "pure C", it'd take half the time with half the number of computers.

      ...but he would have to spend a lot more time porting it between different architectures and OSes. God, how many times do you have to explain this to people? These days, processing cycles cheap, programmer time expensive.


      FP ops in Java are incredibly slow and broken.


      Er, do you have any more recent numbers than a lecture from 2001, originally published in 1998??
      • by Metallic Matty (579124) on Tuesday April 13 2004, @03:24AM (#8845633)
        Either I'm suffering deja vu, or this has been posted nearly verbatim before in a previous discussion of Java vs. C.

        Astounding.
      • by evanbd (210358) on Tuesday April 13 2004, @03:36AM (#8845694)
        Dude, is your C compiler that bad? I like Java a lot, and use it for compute intensive applications, but I think you're either pretty bad witha c compiler or trolling. if you're doing something CPU intensive in C, you need to use gcc -O2 (or -O3, depending), with -march=cputype. This will allow gcc to generate exactly the same code you just described, since it is not limited to 386 instructions. And if you need even more performance, you can just use Intel's C compiler for a lot of things (non-commercial is free as in beer), though it doesn't support some GNU extensions and I think has trouble with some things like the Linux kernel.
    • power consumption (Score:5, Insightful)

      by lightray (215185) <tobin@splorg.org> on Tuesday April 13 2004, @03:32AM (#8845676) Homepage
      The fact of the matter is that a machine with 100% CPU utilization uses a lot more electricity than one with low utilization. The extra cycles aren't free.

      I measured this in 1997 on some kind of AMD K6 machine. IIRC, running dnetc doubled the power consumption of the machine.
    • by mec (14700) <mec@shout.net> on Tuesday April 13 2004, @03:36AM (#8845693) Journal
      First there are resource allocation problems. The OS has to provide a sandbox with strict limits on all resources: memory, filesystem, and networking, as well as CPU time. It's fine with me if the "background compute demon" takes 25% of my processor but I don't want to take more than 10% of my memory.

      Then there's the security issue.

      But I see another problem which is even harder to solve: the tragedy of the commons. Consider a university campus, and suppose that anyone on campus can submit jobs to the Campus Grid. You come in the next morning and see that there are 10000 jobs in your grid queue, and 9800 of them are encoding random people's MP3's.

      The problem is that if you give free resources to a large anonymous community, it takes only a few of those people to suck up all the resources. So you need some way of identifying everyone who submits a job, and some way of charging for the jobs.
    • Re:Povray ? (Score:5, Interesting)

      by imroy (755) <ian@testers.homelinux.net> on Tuesday April 13 2004, @06:33AM (#8846258) Homepage Journal

      I'm just guessing here, but it sounds like he's doing forward ray-tracing on the whole scene. Conventional ray-tracing traces the light rays backwards, i.e from the camera/eye out into the scene and finally back to the light(s). The only problem is that it doesn't really do caustics or diffuse lighting well. POVray [povray.org] faked caustics in version 3 (IIRC), and Radiance [lbl.gov] has done excellent diffuse lighting using a monte-carlo simulation for about a decade. In recent years photon maps have also developed. These apply forward ray-tracing to selected areas, usually selected refractive and reflective surfaces. The impact points for the photons are recorded and then used in a regular renderer (either scan-line or ray-tracer) as an additional source of light.

      Again, it sounds like this guy wants to do this to the whole scene, and to a very high degree of precision. I'm not sure why. Any decent ray-tracer would get a 99% solution in a fraction of the time. Hell, in good hands even scan-line renderers can get a 90% solution even quicker, just look at all the motion-picture visual effects (and whole movies) rendered with Pixar PRman. Most effects don't even need a good ray-tracer to look realistic to most people. Unless he's rendering something more interesting than shiny balls and a mirror, or going to do something interesting with the trillions of photons (near-real-time camera-independent renders?), I really don't see the point. It's still kinda interesting though, if only because of the scale of the work. It might lead somewhere, you just never know.

    • by Anonymous Coward on Tuesday April 13 2004, @07:04AM (#8846424)
      Photon Simulation: "forward ray tracing". Emit photons from light sources, have them bounce off scenery, and see where they hit the eye.

      Ray tracing: "reverse ray tracing". Emit "sight rays" from the eye, have them bounce off scenery, and see where they hit light sources.

      That's simplifying, of course.

      Forward ray tracing was here first, but was quickly (all but) abandoned, since it is computationally way more intense (why, 10 years ago, it would have taken 100 Sparc Station 1's an entire month just to calculate one small image!). Imagine simulating a zillion photons just to discover that over 0.99 zillion had failed to reach the eye...

      On the other hand, it is physically more correct, since effects like caustics are very difficult to do right in "reverse" ray tracing.