OpenMP and more C++

The leap-frog integrator has been implemented and it yields exactly the same behavior as discussed in the GADGET-2 paper; It's more reliable than second order Runge-Kutta even though they are both second order methods.  I've modified the code so that it initializes particles according to a simple distribution function. The images below are IFrIT plots of  3, 10, and 100 randomly oriented orbits in a simple \Phi \propto r^{-1} potential, as well as a plot of 25,000 initial positions.

3-orbits10-orbits100-orbits25000-points

The main focus of the last few days has been C++ programming and building the individual pieces that will be needed for the N-body code later this month.  I've been able to use OpenMP to parallelize the main for-loop.  It's surprisingly easy.  There is  noticeable speed increase on my dual processor system ( Note: I have not yet benchmarked the program to measure the actual speed-up factor).  The CPU utilization now reaches 100% rather than the previous 50%.  I'm currently working out the bugs with the shared memory system.  Writing a code for parallel execution requires me to modify my way of thinking a bit.  I am also trying to figure out how to handle large amounts of memory in C++.  Once these issues are resolved, I will try to implement a data visualization library so the program can plot output automatically.  This will be important for the next project because I want to be able to make animations of the N-body simulations.

In terms of reading, I just started reading Bruno's  paper dealing with continuous stellar mass-loss in N-body models.

10 Responses to “OpenMP and more C++”

  1. Across the Universe » Blog Archive » Research day Says:

    [...] I spent most of today doing research.  I leaned a good bit and got some things accomplished toward my summer research goals. The details of what I did today, including pictures, are here: www.idius.net/openmp-and-more-c/ [...]

  2. Dcs Replacement Parts Says:

    I just like it!...

    Amazing article. I desire you up-to-date your blog significantly more often, I just cannot seem to be to acquire adequate of your blog. I preserved your blog in my bookmarks. Would it be feasible to do a guest post sometime?...

  3. Livejasmin Says:

    Live Video Chat Cams...

    This is getting a bit more subjective, but I a lot prefer the Zune Marketplace. The interface is colorful, has extra aptitude, and a few cool options like \'Mixview\' that let you rapidly see associated albums, songs, or different users associated to w...

  4. Assisted Living Escondido Says:

    Sources...

    [...]check below, are some totally unrelated websites to ours, however, they are most trustworthy sources that we use[...]…...

  5. We Know A Place Says:

    Recent Blogroll Additions…...

    [...]usually posts some very interesting stuff like this. If you’re new to this site[...]…...

  6. bike games Says:

    Great comment......

    [...]we like to honor many other internet sites on the web, even if they aren’t linked to us, by linking to them. Under are some webpages worth checking out[...]……...

  7. infinite2allery2556 Says:

    infinite gallery5541...

    aaa ba a ds531b...

  8. fitnes Says:

    great...

    I saw this really great post today....

  9. Visit my blog Says:

    Your post...

    After reading this great share I would like to thank you for all the outstanding facts!...

  10. My superb site Says:

    Regarding your post...

    I read the write-up and totally trust you. Your discuss is excellent and i may discuss it together with my local freinds in addition to fb contacts. If I a website as part of your specific niche market I would will give you a link exchange. Your curren...

Leave a Reply