The NBSymple code: a symplectic, parallel, N-body code running on composite CPU+GPU platforms




The NBSymple code is a time-symplectic, parallel, code developed by R. Capuzzo-Dolcetta and A. Mastrobuono-Battisti to perform high precision N-body simulations.

It has been developed in various (five) versions, characterized by different levels of parallelization and different use of hardware resources.

A full description of the code, his characteristics, performances and a description and discussion of first applications is in the arxiv.org papers:

http://arxiv.org/abs/1003.3896 and http://arxiv.org/abs/0909.0879

 

Here we give some basic information about the code, in order to make as easy as possible its use. Note that the use of the code is free, upon acknowledgement of its use to the authors and provided its correct citation as "NBSymple" code.


Hardware Requirements



Best performances from NBSymple are achieved when it runs on a composite system, where a "host" based on multiple cores CPUs has availability of one or more Graphic Processing Units. Consequently, the potential NBSymple user should preliminarly answers the questions:



In particular, NBSymple was developed and tested on the platform below

















The composite CPU+GPU computing platform available at the Dep. of Physics, Sapienza Univ. of Roma, where the NBSymple code has been developed, tested and run. The hardware shown in the figure was configured with the help of the E4 company ( http://www.e4company.com/ ) .




Software Requirements



After the preliminary HW checking a software requirement checking is needed.

To distribute NBSymple computations on the CPUs of your computer, Open MP is needed.

So:

Do you have a C/C++ compiler apt to use Open MP installed on your computer?

If NO, you have to

1) Download it and follow the installation instructions from the site
openmp.org, see:

http://openmp.org/wp/openmp-compilers/

To distribute NBSymple computations on the GPUs of your computer, Computer Unified Device Architecture (CUDA) (a parallel computing architecture developed by NVIDIA corporation) is needed.

So you have to

2) Download the CUDA toolkit and CUDA toolkit documentation proper for your Operating System, as well as CUDA SDK code samples and more. They are found in:

http://developer.nvidia.com/object/cuda_2_3_downloads.html
  

3) Install CUDA following the intsallation instructions.


Steps 1 to 3 make your CPU+GPU computer ready to run the double parallel code NBSymple.


After these steps, another, fundamental, question to answer is:

what is/are the identification number/s of the available GPU/s?

The answer comes from the command "DeviceQuery" whose path usally is:

   /usr/local/cuda-sdk/bin/linux/release/DeviceQuery

whose output is something like:

Device 0: "Quadro NVS 290"

...

Number of multiprocessors: 2

Number of cores: 16

...

or:

Device 1: "Tesla C1060"

...

Number of multiprocessors: 30

Number of cores: 240

...

The knowledge of the device number allows the proper setting in two subroutines of NBSymple: leapfrog.cu and sixth.cu.
     In leapfrog.cu, line 100 and in sixth.cu line 154 in the statement CUDA_SAFE_CALL  you have to set properly the last number of the statement: 
                CUDA_SAFE_CALL(CudaSetdeviceCcpu_threa_id%num_cputhreads+1),

Specifically: if you want the code run using a number NUM_GPUS of GPU devices of the same type (see subroutine const.h and explanation in the README file) you must enter "+n", where n is the device id number of the first of the NUM_GPUS GPUs, in place of "+1", provided that device id numbers are sequentially ordered.


Download



Now you are all set to download the NBSymple package, to install and run it.




Download the complete CPU+GPU NBSymple version.



IMPORTANT NOTE : These are “beta” versions of our code, so for any question, doubt, comment or potential bug discovery, please send an email to:

                   Alessandra.MastrobuonoBattisti@uniroma1.it

Home page
Dolcetta home page