Difference between revisions of "Download and Installation new"

From OxDNA
(Installation)
m (Compile options)
Line 37: Line 37:
 
*'''-DDebug=1''' oxDNA will be compiled with debug flags (both for nvcc and gcc).
 
*'''-DDebug=1''' oxDNA will be compiled with debug flags (both for nvcc and gcc).
 
*'''-DG=1''' oxDNA will be compiled with both debug and optimization flags.
 
*'''-DG=1''' oxDNA will be compiled with both debug and optimization flags.
*'''-DINTEL=1''' oxDNA will be compiled using the Intel icpc compiler. The resulting executable will be named oxDNA_intel.
+
*'''-DINTEL=1''' oxDNA will be compiled using the Intel icpc compiler.
 
*'''-DCUDA=1''' oxDNA will be compiled with CUDA support. This requires a CUDA runtime version >= 3.2.
 
*'''-DCUDA=1''' oxDNA will be compiled with CUDA support. This requires a CUDA runtime version >= 3.2.
 
*'''-DMPI=1''' oxDNA will be compilted with MPI support. This is currently an '''unsupported''' feature and it should be used by developers only.
 
*'''-DMPI=1''' oxDNA will be compilted with MPI support. This is currently an '''unsupported''' feature and it should be used by developers only.

Revision as of 15:17, 17 March 2014

In this section, we outline the procedure for compiling oxDNA.

Requirements

Compiler

The recommended compiler is gcc 4.6.x. oxDNA compilation has been thoroughly tested with gcc >= 4.1.x and icpc >= 10. Note that compiling with gcc 4.6.x rather than with gcc 4.1.x results in a significant increase in performances. Since oxDNA is writtern in standard c++, it should be also compatible with other compilers. Optionally, oxDNA can be compiled to run on NVIDIA GPUs by enabling CUDA support at compile time.

Operating system

oxDNA has been tested on Linux (kernel >= 2.6.x) and Mac OS X. Since it is written in ANSI c++, it should also work out-of-the-box on other OSes.

Dependencies

The pre-compilation stage requires cmake, while compilation is carried out with GNU Make.

The CPU-only oxDNA does not depend on any external library apart from the standard c++ library.

The GPU-enabled oxDNA requires CUDA >= 3.2.

Download

There are currently no available binary packages for oxDNA. The last stable source package can be downloaded here, while bleeding edge (possibly unstable) versions are available via a subversion repository, accessible here.

Compilation

We recommend using an out-of-source build to compile oxDNA. A standard out-of-source build is as follows

cd oxDNA
mkdir build
cd build
cmake ..           # cmake options go here, more on this later
make -j4           # use 4 threads for compilation, sensibly shortening compiling time

Compile options

The following parameters can be passed to cmake:

  • -DDebug=1 oxDNA will be compiled with debug flags (both for nvcc and gcc).
  • -DG=1 oxDNA will be compiled with both debug and optimization flags.
  • -DINTEL=1 oxDNA will be compiled using the Intel icpc compiler.
  • -DCUDA=1 oxDNA will be compiled with CUDA support. This requires a CUDA runtime version >= 3.2.
  • -DMPI=1 oxDNA will be compilted with MPI support. This is currently an unsupported feature and it should be used by developers only.

The compilation process will generate three executables in the build/bin folder: oxDNA, DNAnalysis and confGenerator. Their usage is as follows:

oxDNA <input>
DNAnalysis <input>
confGenerator <input> <box_size/density> # the second argument will be interpreted as a density if it is less than 2.0

If you want some oxDNA hands-on examples, there are some in the EXAMPLES directory.