Re: Parallel computing and JLink
- To: mathgroup at smc.vnet.net
- Subject: [mg94238] Re: Parallel computing and JLink
- From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
- Date: Tue, 9 Dec 2008 06:54:39 -0500 (EST)
- Organization: Uni Leipzig
- References: <ghg9bb$ho5$1@smc.vnet.net>
- Reply-to: kuska at informatik.uni-leipzig.de
Hi, that's really amazing ! Your parallel JLink program is only 8.15 times slower that a parallel C++ program. On a dual core machine ... And the C++ program works without any parallel Mathematica stuff. I see that Java programs are still faster written than executed. Regards Jens mark mcclure wrote: > Jon Harrop makes an interesting point in this post: > http://forums.wolfram.com/mathgroup/archive/2008/Dec/msg00102.html > > If we need to optimize code so much that we are willing to > parallelize it (which can be quite tricky), then why wouldn't > we use optimized C or Fortran code? In fact, this very logic > persuaded me against purchasing Grid Mathematica, even though > I had potential access to a cluster. Now that parallel tools > are incorporated into every copy of Mathematica, however, why > not use it. In fact, it's quite likely that people will come > up with many novel ideas. > > Here's one proposal: use Mathematica together with JLink to > coordinate Java programs running in parallel. (Of course, > mathlink and C would work as well.) In this scenario, > Mathematica becomes much more than just a master program > coordinating a few Java slaves, because any data generated by > the Java programs becomes immediately available to Mathematica. > A natural application is Mandelbrot or Julia set generation. > I set up a notebook/webpage illustrating this. You can see it > here: > http://facstaff.unca.edu/mcmcclur/Mathematica/ParallelJLink/ > > Since there are a few difficulties and traps, I set up as > carefully as I could and included a fair amount of explanation. > > Mark McClure >