Skip to content

Repository containing the code base for the SiSc-Laboratory for the "Automatic Generation of Drivers for Algorithmic Differentiation"

License

Notifications You must be signed in to change notification settings

STCE-at-RWTH/AD-Driver-Generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

General

The project uses CMake as a build system. For the unit tests Google Test - GTest is used. For the invocation of the unit tests as well as integration tests CTest is used.

Building on the Cluster

Load the appropriate modules such as

ml GCC CMake

or

ml Clang CMake

and then you can build.

Building

Run in the main directory

cmake -S . -B build
cmake --build build -j 4

and the project should be ready for subsequent builds the last line is sufficient. If one wants to build another configuration the first line can be appended with -DCMAKE_BUILD_TYPE=Debug or -DCMAKE_BUILD_TYPE=Release.

Testing

When your cmake version is recent enough cmake --version should be higher than 3.20 one might directly use

ctest --test-dir build

With this invocation both unit tests which are in build/src as well as integration tests which are in build/test are executed. If the cmake version is lower than 3.20 one might use

cd build
ctest

and you should receive an overview about the tests and if they failed or not. As the project uses quite common setup for this also your preferred IDE should be able to run the tests over some plugins.

Folder structure

Most of our code files will be in src where it might be good practice to follow canonical project structure.

.
├── CMakeLists.txt
├── README.md
├── src
    ├── CMakeLists.txt
    ├── Utilities.hpp
    ├── UtilitiesMock.hpp
    ├── CppUtilities.hpp
    └── CppUtilities.test.cpp
    ...
└── tests

In this simple example the Utilities.hpp file will include the abstract class interface, whereas the CppUtilities.cpp file will contain a specific implementation for the C++ language. When another class wants to use the Utilities, one can use the mock implementation in UtilitiesMock.hpp to have them decoupled. Therefore also corresponding unit tests for a specific implementation should be post-fixed with .test.cpp.

Third party Dependencies

Currently following third party libraries are used to perform some tasks. Both are pulled in automatically when running CMake.

Tutorials - Documentation

Following are some small tutorials as well as documentation to get started with the tools used in this project.

For local development interesting up to Moving Work Around. For remote development one can recommend both sections.

Recommendation is to read over the GoogleTest Primer and then to look at the Mocking for Dummies. This should give sufficient background for understanding the tests and the structure in this repository. When adding new files the Quickstart: CMake provides guidance on how to discover the tests in the new files.

About

Repository containing the code base for the SiSc-Laboratory for the "Automatic Generation of Drivers for Algorithmic Differentiation"

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •