Welcome, Guest. Please Login.
Gravity Simulator
11/18/17 at 08:00:57
News: Registration for new users has been disabled to discourage spam. If you would like to join the forum please send me an email with your desired screen name to tony at gravitysimulator dot com.
Home Help Search Login


Pages: 1
Send Topic Print
make Gravity Simulator in Parallel (Read 4247 times)
FedericoP
Uploader



I Love YaBB 2!

Posts: 12
make Gravity Simulator in Parallel
10/18/11 at 15:36:24
 

Sorry for the inconvenience,  
 
in my thesis in Astrophysics i'm using gravity simulator to simulate planetary migration and scattering. My prof. asked me if gravsim can be put in parallel (MPI) to test it with an extremely high number of particles.
 
Can anyone tell me if is it possible?  Huh
 
 
Another question:  
is it possible to produce two bodies that have the opposite direction of motion? because we wanted to simulate a particular kind of drift so I need that one of the bodies revolves in the opposite direction than the other.
 
Thank you very much.  Smiley
Back to top
 
 
View Profile   IP Logged
Tony
YaBB Administrator
*****




Posts: 1049
Gender: male
Re: make Gravity Simulator in Parallel
Reply #1 - 10/18/11 at 17:49:35
 
No to MPI (isn't that for supercomputers?)  Gravity Simulator runs on Windows only.
There are new unreleased features in the Alpha 3.0 version that would probably make the types of sims you want to run faster.
 
I think the answer to your second question is yes, but I'm not sure I understand what you want to do.  Do you want two objects orbiting a star, but one orbits retrograde?
Back to top
 
 
Email View Profile WWW   IP Logged
FedericoP
Uploader



I Love YaBB 2!

Posts: 12
Re: make Gravity Simulator in Parallel
Reply #2 - 10/18/11 at 23:29:30
 
Yes, i want a retrograde orbit for a set of objects.
 
And yes MPI is used for clusters and my prof wanted to uses a cluster to simulate migration. I can use gravsim also in linux with wine but i want to optimize the code to run faster a very huge simulation with N = 200'000 for istance .
Back to top
 
 
View Profile   IP Logged
Tony
YaBB Administrator
*****




Posts: 1049
Gender: male
Re: make Gravity Simulator in Parallel
Reply #3 - 10/19/11 at 09:53:57
 
Retrograde orbits are easy to do.  When you create objects, you just make their inclination 180 degrees +0%
 
The program would have to be written from scratch for clusters of computers.  If you know how to program for clusters, and you're willing to code yourself, I could assist you with the integration algorithm.  The majority of Gravity Simulator's code is for the GUIs that help the end user.  But if you can do without those, and the graphics, a relatively short program can at least let you output usable data.
 
Gravity simulator doesn't do too well with over 500 objects. But there are some methods you can try.  Simulate your planetary migration with 500 objects and then extrapolate the results to 200,000.  How many years of simulation are you looking to do?  Tell me more about your project and I'll see what help I can offer.
Back to top
 
 
Email View Profile WWW   IP Logged
FedericoP
Uploader



I Love YaBB 2!

Posts: 12
Re: make Gravity Simulator in Parallel
Reply #4 - 10/19/11 at 15:58:10
 
I used gravsim to simulate 1600 massless object and i do it well with just a core of my laptop. I will speak with my supervisor to understand how is it possible to write such a code. Thanks a lot for your help,is very welcome and necessary  embarrassed  
First, What is the programming language of gravsim? Is it possible to have a copy of the code?
Yes, is it possible to eliminate the interface and the graphics. The only thing that is important is the output and the possibility to print data files with which to plot orbital parameters, position, velocity....
So i can use such files to make a movie of the simulation with snapshot that i can take from the data files and run it for a million of years in a cluster or in a single core for many days and save the results in a file and plot them later. This is very important because now i can't see any output with the command: output or systematic output  cry (i stop the simulation, click on output file create data file, create copy, set the condition). I do not understand if i must play the simulation for the time that i use in 'maximum data samples' or if the program do the file for my also if the simulation is stopped.
Back to top
 
View Profile   IP Logged
Tony
YaBB Administrator
*****




Posts: 1049
Gender: male
Re: make Gravity Simulator in Parallel
Reply #5 - 10/19/11 at 22:32:59
 
Don't use Systematic output.  That's for converting Gravity Simulator data for another computer program.
 
File > Output File...
Check "Create data file" and "Create Copy".  The copy is if you want to play with your output file while Gravity Simulator is still gathering data.  Otherwise you don't need it.
 
Choose how often you want your data sampled, which data you want sampled, and for which objects.  Then choose maximum samples.  So if you choose 1 year, and 100 maximum, then it will output data once a year for 100 years, then it will stop outputting data although the simulation may continue to run longer than this.
 
Most of Gravity Simulator is written in Visual Basic.  The integrators are written in C++.  See the recent Runge Kutta 4 thread for a copy of the C++ code.
Back to top
 
 
Email View Profile WWW   IP Logged
FedericoP
Uploader



I Love YaBB 2!

Posts: 12
Re: make Gravity Simulator in Parallel
Reply #6 - 10/20/11 at 09:35:47
 
Ok, thanks a lot. But could you post here the last version of the integrator ?  
 
if it is write in c++ i think there is no problem to rewrite it in parallel, i hope my prof can give me some help or trick to do it.  Wink
Back to top
 
 
View Profile   IP Logged
EDG
Ultimate Member
*****


oh, crumbs!!!

Posts: 611
Gender: male
Re: make Gravity Simulator in Parallel
Reply #7 - 10/20/11 at 14:49:50
 
If it can be re-written in parallel, that would be awesome. Then we can finally take advantage of using multiple cores on modern computers!
Back to top
 
 

(formerly known as Mal)
View Profile WWW   IP Logged
Tony
YaBB Administrator
*****




Posts: 1049
Gender: male
Re: make Gravity Simulator in Parallel
Reply #8 - 10/20/11 at 16:30:38
 
Quote from EDG on 10/20/11 at 14:49:50:
If it can be re-written in parallel, that would be awesome. Then we can finally take advantage of using multiple cores on modern computers!

FedericoP is talking about writing for a supercomputer, not just a dual or quad core processor.  I've already looked at the code and haven't seen any manipulations I could make to take advantage of these processors.
Back to top
 
 
Email View Profile WWW   IP Logged
EDG
Ultimate Member
*****


oh, crumbs!!!

Posts: 611
Gender: male
Re: make Gravity Simulator in Parallel
Reply #9 - 10/21/11 at 03:33:03
 
Quote from Tony on 10/20/11 at 16:30:38:
Quote from EDG on 10/20/11 at 14:49:50:
If it can be re-written in parallel, that would be awesome. Then we can finally take advantage of using multiple cores on modern computers!

FedericoP is talking about writing for a supercomputer, not just a dual or quad core processor.  I've already looked at the code and haven't seen any manipulations I could make to take advantage of these processors.

 
He's talking about parallel processing - I don't think it makes a difference whether that's on multiple computers in a cluster or if it's multiple cores in a single tower, it still means splitting up the calculations to run on different processors. If he knows of or can find a way to do that then it should work on a multicore computer (true, it still may not be possible, but you never know. I'm not sure that all the multi particle collision models that run on supercomputers are all running on a single core).
Back to top
 
 

(formerly known as Mal)
View Profile WWW   IP Logged
FedericoP
Uploader



I Love YaBB 2!

Posts: 12
Re: make Gravity Simulator in Parallel
Reply #10 - 10/21/11 at 06:36:25
 
Yes, it's indifferent to make a MPI program with 4 core or 400. Because there are only differences between single or multi core programming but not from two-core or multi-core programming.  Cheesy  
The very important different is the integrator  cry like treecodes, runge kutta 4th, direct integration, sympletic ....
Back to top
 
 
View Profile   IP Logged
Pages: 1
Send Topic Print