The necessary steps for compiling and running the various examples in ViennaSHE are outlined for several different platforms in the following. Although we run nightly tests on various platforms, we cannot check every possible combination of hardware, operating system, and compiler. If you experience any trouble, do not hesitate to ask for help at our mailinglist: vienn.nosp@m.ashe.nosp@m.-supp.nosp@m.ort@.nosp@m.lists.nosp@m..sou.nosp@m.rcefo.nosp@m.rge..nosp@m.net
To simplify installation, the required dependencies for using ViennaSHE are kept as small as possible:
| A recent C++ compiler | GCC version 4.2.x or above, Clang 3.0 or above, and Visual C++ 2005 or above are known to work. |
| ViennaCL | The ViennaCL sources are included in the ViennaSHE package, no separate installation required. |
| ViennaGrid | The ViennaGrid sources are included in the ViennaSHE package, no separate installation required. |
| PETSc | A working PETSc installation is required. The environment variables PETSC_DIR and PETSC_ARCH need to be set. |
Moreover, the following optional components are available:
| CMake | Using CMake as a build system makes it easy to configure your builds appropriately. |
| OpenCL | If you intend to leverage GPU acceleration through ViennaCL, make sure you installed an OpenCL-capable vendor driver. |
| OpenMP | This comes with your compiler. GCC 4.2.x and some versions of Visual Studio include support for OpenMP. Please consult your compiler manual. |
ViennaSHE is distributed with a couple of examples on how to interface the simulator. To build all examples, type
$> cd /your-ViennaSHE-path/build/
Execute
$> cmake ..
to obtain a Makefile and type
$> make
to trigger the build process.
To use ViennaSHE as a simulator library in your own projects, it is sufficient to copy the source folders src/, viennashe/, viennacl/, and viennagrid/ either into your project folder. If ViennaCL or ViennaGrid is already installed on your system, the respective folder can be skipped.
On Unix-like operating systems, the global system include path is usually /usr/include/ or /usr/local/include/. On Windows, the situation strongly depends on your development environment. We advise to consult the documentation of the compiler on how to set the include path correctly. With Visual Studio 9.0 this is usually something like C:\Program Files\Microsoft Visual Studio 9.0\VC\include and can be set in Tools -> Options -> Projects and Solutions -> VC++-Directories.
For building the examples, we suppose that CMake is properly set up on your system. The instructions for the various operating systems are as follows
To build the examples, open a terminal and change to:
$> cd /your-ViennaSHE-path/build/
Execute
$> cmake ..
to obtain a Makefile and type
$> make
to build the examples and the standalone executable. If desired, one can build each example separately instead:
$> make nin-diode-1d #builds the 1d nin-diode example
You may speed up the building process by using multiple concurrent jobs, e.g. make -j4.
For the GCC compiler the Xcode [26] package has to be installed. To install CMake, external portation tools such as Fink [5], DarwinPorts [4], or MacPorts [15] have to be used.
The build process of ViennaSHE is similar to Linux.
In the following the procedure is outlined for Visual Studio: Assuming that CMake is already installed, Visual Studio solution and project files can be created using CMake:
Note that the examples should be executed from the build/ folder in order to access the correct input files.