Message Boards Message Boards

0
|
9282 Views
|
6 Replies
|
1 Total Likes
View groups...
Share
Share this post:

Are there any 3rd party gridMathematica services?

Posted 11 years ago
I have some calculations that take many days to complete, up to a month or longer, on my one computer.  I don't have access to multiple computers.  Are there any organizations with great computing ability that i can hire to execute notebooks?
POSTED BY: Bryan Lettner
6 Replies
Posted 11 years ago
What I am trying to accomplish is the creation of a high resolution object to export as a .stl file, so that I can 3d print it.  The object involves a 3d parametric curve of a square cross-section, excluded from a 3d parametrized surface.  Think of a sphere with a square groove worming around its surface, as an example.  I tried Solidworks but it doesn't handle intricate equation driven curves very well.  Buggy, and features are limitted in scope.  Mathematica is ideally positioned to generate 3D objects driven by complicated parametric equations, but unfortunately, RegionPlot3D is one of the only functions that can serve the purpose of designing 3d parts for export.  My surface can be defined in terms of xyz, but my curve cannot.  RegionPlot3D cannot interpret parametric equations, so I had to sample many xyz points from my parametric curve, and then define an irregular polyhedron (using surface normal planes, offset parallel planes, etc) around each point to approximate a small portion of the groove.  That's the best work-around I could come up with, anyway.  It looks like I will have to widen the groove a bit so that RegionPlot3D will recognize it with fewer PlotPoints. I am eagerly awaiting mathematica 10 (release date????) to see if it has any new features that might help, such as a RegionPlot3D function that can interpret both xyz and parametric equations.

EDIT:   After some research, I've discovered that what I need is Programmatic CAD.  There are many free platforms available with a simple google search.  I will try one of these, but I would love to see Wolfram incorporate programatic CAD in the future.
POSTED BY: Bryan Lettner
Let's back up a bit. I'll talk about parallelization below, but let's not focus on that for right now.  RegionPlot3D wasn't meant to handle this problem. It was meant to handle the common plotting tasks you'll find in the definition for the function. I'm not sure I understand your problem, but RegionPlot3D is not the answer.

You have over 1500 inequalities.
 - If each (or most of them) matter then you have a very very complicated 3D graphic you're trying to make. There's probably a better way of making it. You probably don't want a 3D graphic that complicated. Your eyes probably can't interpret the results.
 - If most of the inequalities are redundant or eliminatable, then you want to simplify the system of inequalities before working with it like this.
 - Maybe the case is inbetween and both of the bullet points above apply.

Without more information about the task, it's hard for me to say what should be done. Maybe each of the inequalities define a face on a surface. Maybe your problem is complicated and we need to talk to someone who does computational geometry. What is this thing you're trying to plot? If it is super complicated, why are you plotting it? What info are you trying to get out of the plot? Do all the inequalities have some form (like being linear inequalities? Quadratic?).

Parallelization is not an instant win.
It's important to understand a bit more about what the computation is actually doing and how parallel programming works.
RegionPlot3D is effectively making a 3D vector graphic using some adaptive sampling of some kind. The code for this isn't parallelizable either because it was not written for that or because the algorithm underneath it doesn't parallelize easily. The function does does some pretty complicated stuff in order to try drawing the shape with the fewest samples possible.
Something that would parallelize very easily: Sampling whether a large set of points satisfied the inequality or not.
POSTED BY: Sean Clarke
Posted 11 years ago
Hmm I think it may be embarassingly parallel, not sure.  My code is a RegionPlot3D with thousands of inequalities defining many small regions bounded by planes, shown below.  I just tried parallelizing it and got :
 Parallelize[
  RegionPlot3D[
   c1^2 x^2 + c1^2 y^2 - 2 c1^3 x y z + c1^2 z^2 < 1 \[And]
    N[Sqrt[c1^2 x^2 + c1^2 y^2 + c1^2 z^2], 15] <=
     N[Sqrt[3],
      8] \[And] \[Not] (c2^2 x^2 + c2^2 y^2 - 2 c2^3 x y z + c2^2 z^2 <
         1 \[And]
       N[Sqrt[c2^2 x^2 + c2^2 y^2 + c2^2 z^2], 15] <=
        N[Sqrt[3], 8]) \[And] \[Not] (otherregions), {x, -1.667,
   1.667}, {y, -1.667, 1.667}, {z, -1.667, 1.667}, PlotPoints -> 20,
  MaxRecursion -> 1, PlotStyle -> Opacity[0.5], Mesh -> False]]
" cannot be parallelized; proceeding with sequential evaluation."  I'm not sure if this would be the proper way to make the code run in parallel.

otherregions  has been defined in a previous evaluation as   inequalities1 || inequalities2 || inequalities3 ..... inequalities1500 .   It is also noteworty is that I want to use a high number of PlotPoints (1000 or 1500), which seems to be the determining factor is slowing down evaluation.  So I guess my question boils down to...

What's the best way to optimize computation speed for a RegionPlot3D which is defined (mostly) by thousands of small regions bounded by planes (similar to a bunch of little cubes linked together) and uses PlotPoints > 1000 ?
POSTED BY: Bryan Lettner
Not for most problems and most code.

Is your code embarrasingly parallel? How fast does it run on 1 core vs 2 cores? Have you written the code to run in parallel?

https://en.wikipedia.org/wiki/Amdahl%27s_law
POSTED BY: Sean Clarke
Posted 11 years ago
Thank you, looks like what I need.  Would it be logical to assume that running evaluations on their 32 core system will be ~16 times faster than my 2 core in most cases?
POSTED BY: Bryan Lettner
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract