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.
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:
1.what and how many multiple core CPUs do I have in my computer?
The answer may be given (in LINUX) by the command
2. what and how many GPUs do I have in my computer?
The answer comes from the use
of a typical system administration task like, with a Linux
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/ ) .
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.
Do you have a C/C++ compiler apt to use Open MP installed on your computer?
If NO, you have to
it and follow the installation instructions from the site
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:
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:
whose output is something like:
Device 0: "Quadro NVS 290"
Number of multiprocessors: 2
Number of cores: 16
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:
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.
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:
Home page Dolcetta home page