Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,4 @@ gh-pages*
#theia/vscode/gitpod settings
/compile_commands.json
/.clangd
/.vscode
50 changes: 0 additions & 50 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ option(SERIALBOX_USE_NETCDF "Use NetCDF library" OFF)

option(SERIALBOX_TESTING "Build unittest executables" OFF)
option(SERIALBOX_TESTING_GRIDTOOLS "Build gridtools unitests and examples" OFF)
option(SERIALBOX_TESTING_STELLA "Build STELLA unitests" OFF)
option(SERIALBOX_TESTING_DEATH_TESTS "Run death-tests" OFF)
option(SERIALBOX_TESTING_LARGE_FILE_TESTS "Run large file (>4GB) tests" OFF)
option(SERIALBOX_TESTING_FORTRAN "Build tests for the Fortran interface")
Expand Down Expand Up @@ -162,7 +161,6 @@ set(SERIALBOX_EXTERNAL_LIBRARIES)

## Enable testing if one ore more of the tests is requested
if(SERIALBOX_TESTING_GRIDTOOLS OR
SERIALBOX_TESTING_STELLA OR
SERIALBOX_TESTING_DEATH_TESTS OR
SERIALBOX_TESTING_FORTRAN)
set(SERIALBOX_TESTING ON)
Expand Down Expand Up @@ -250,54 +248,6 @@ endif(SERIALBOX_TESTING_GRIDTOOLS)
find_package(Boost 1.54 REQUIRED)
set(SERIALBOX_BOOST_VERSION ${Boost_VERSION})

#---------------------------------------- STELLA ---------------------------------------------------
if(SERIALBOX_TESTING_STELLA)

# If STELLA_ROOT is not provided, we try to find it in external/
set(STELLA_ROOT_ENV "$ENV{STELLA_ROOT}")
if(NOT(STELLA_ROOT) AND NOT(STELLA_ROOT_ENV) AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/external/stella/CMakeLists.txt")

set(STELLA_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/external/stella")

set(BUILD_STELLA "ON" BOOL)
set(STELLA_INSTALL_DIR "${CMAKE_BINARY_DIR}/external/stella/install")

# Forward toolchain
set(CMAKE_EXTERNAL_ARGS -Wno-dev
-DSTELLA_ENABLE_BENCHMARK=OFF
-DSTELLA_ENABLE_COMMUNICATION=OFF
-DSTELLA_ENABLE_SERIALIZATION=OFF
-DSTELLA_ENABLE_TESTING=OFF
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-DCMAKE_GENERATOR=${CMAKE_GENERATOR}
-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
-DCMAKE_INSTALL_PREFIX=${STELLA_INSTALL_DIR}
)

# Build STELLA
ExternalProject_Add(
stella
URL "${CMAKE_CURRENT_SOURCE_DIR}/external/stella"
PREFIX "external/stella"
CMAKE_ARGS ${CMAKE_EXTERNAL_ARGS}
)
message(STATUS "Building STELLA from: ${CMAKE_CURRENT_SOURCE_DIR}/external/stella")

set(STELLA_INCLUDE_DIRS "${STELLA_INSTALL_DIR}/include/STELLA")
set(STELLA_LIBRARIES "${STELLA_INSTALL_DIR}/lib/libSharedInfrastructure.a"
"${STELLA_INSTALL_DIR}/lib/libStella.a"
"${STELLA_INSTALL_DIR}/lib/libStellaUtils.a")
else()
find_package(STELLA QUIET REQUIRED)
endif()

include_directories(SYSTEM ${STELLA_INCLUDE_DIRS})
set(SERIALBOX_HAS_STELLA 1)

endif(SERIALBOX_TESTING_STELLA)

#---------------------------------------- ClangTools -----------------------------------------------

find_package(ClangTools)
Expand Down
57 changes: 0 additions & 57 deletions cmake/modules/FindSTELLA.cmake

This file was deleted.

3 changes: 1 addition & 2 deletions cmake/modules/FindSphinx.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# Variables defined by this module:
#
# SPHINX_FOUND System has Sphinx
# STELLA_EXECUTABLE The location sphinx-build
# SPHINX_EXECUTABLE The location sphinx-build
#
include(FindPackageHandleStandardArgs)

Expand All @@ -20,4 +20,3 @@ find_program(SPHINX_EXECUTABLE
find_package_handle_standard_args(Sphinx
"Failed to locate sphinx-build executable"
SPHINX_EXECUTABLE)

2 changes: 1 addition & 1 deletion docs/latex/ppser_doc.tex
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
\begin{document}
\maketitle

\ppser{} is a parser to expand \texttt{!\$SER} serialization directives in Fortran code in order to generate serialization code using the \texttt{m\_serialize.f90} interface for the STELLA serialization framework.
\ppser{} is a parser to expand \texttt{!\$SER} serialization directives in Fortran code in order to generate serialization code using the \texttt{m\_serialize.f90} interface.

The grammar is defined by a set of \texttt{!\$SER} directives. All directives are case-insensitive. The main keywords are \texttt{INIT} for initialization, \texttt{VERBATIM} for echoing some Fortran statements, \texttt{OPTION} for setting specific options for the serialization module, \texttt{REGISTER} for registering a data field meta-information, \texttt{ZERO} for setting some field to zero, \texttt{SAVEPOINT} for registering a savepoint with some optional information, \texttt{DATA} for serializing a data field, and \texttt{CLEANUP} for finishing serialization.

Expand Down
21 changes: 0 additions & 21 deletions docs/sphinx/Building.rst
Original file line number Diff line number Diff line change
Expand Up @@ -70,17 +70,6 @@ Serialbox has several unittest which use the external library they are built for

$ cmake -DSERIALBOX_TESTING=ON -DSERIALBOX_TESTING_GRIDTOOLS=ON -DSERIALBOX_GRIDTOOLS_ROOT=<path-to-gridtools> ../

Similarly, you can build the unittest for `STELLA <https://github.com/MeteoSwiss-APN/stella>`_ and the compatible tests with the old `Serialbox <https://github.com/MeteoSwiss-APN/serialbox>`_. If you clone those projects in ``external/``, CMake will automatically find and **build** them. The following will enable all possible unittests:

.. code-block:: console

$ cd $(git rev-parse --show-toplevel) # Change to top-level directory
$ git clone git@github.com:eth-cscs/gridtools.git external/gridtools
$ git clone git@github.com:MeteoSwiss-APN/stella.git external/stella
$ git clone https://github.com/MeteoSwiss-APN/serialbox external/serialbox
$ cd build
$ cmake -DSERIALBOX_TESTING=ON -DSERIALBOX_TESTING_GRIDTOOLS=ON -DSERIALBOX_TESTING_OLD_SERIALBOX=ON -DSERIALBOX_TESTING_STELLA=ON ../

To run the unittests via CTest:

.. code-block:: console
Expand Down Expand Up @@ -227,12 +216,6 @@ Serialbox specific variables
**SERIALBOX_TESTING_GRIDTOOLS**:BOOL
Build `gridtools <https://github.com/eth-cscs/gridtools>`_ unittests and examples.

**SERIALBOX_TESTING_STELLA**:BOOL
Build `STELLA <https://github.com/MeteoSwiss-APN/stella>`_ unittests.

**SERIALBOX_TESTING_OLD_SERIALBOX**:BOOL
Build the compatiblity unitests against the old `Serialbox <https://github.com/MeteoSwiss-APN/serialbox>`_.

**SERIALBOX_TESTING_DEATH_TESTS**:BOOL
Compile the death-tests.

Expand Down Expand Up @@ -260,9 +243,5 @@ External project specific variables
**SERIALBOX_OLD_ROOT**:PATH
Install directory of old `Serialbox <https://github.com/MeteoSwiss-APN/serialbox>`_.

**STELLA_ROOT**:PATH
Install directory of `STELLA <https://github.com/MeteoSwiss-APN/stella>`_.

**NETCDF_ROOT**:PATH
Install directory of `NetCDF-4 <http://www.unidata.ucar.edu/software/netcdf/>`_.

2 changes: 1 addition & 1 deletion src/serialbox-c/Serializer.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ SERIALBOX_API void serialboxSerializerUpdateMetaData(serialboxSerializer_t* seri
* The return value can be:
*
* 0: the variable is not yet initialized -> the serialization is enabled if the environment
* variable `STELLA_SERIALIZATION_DISABLE` or `SERIALBOX_SERIALIZATION_DISABLE` is not set to a
* variable `SERIALBOX_SERIALIZATION_DISABLE` is not set to a
* positive value. The first Serializer which is initialized has to set this value either to +1
* or to -1 according to the environment.
* +1: the serialization is enabled, independently of the environment
Expand Down
3 changes: 1 addition & 2 deletions src/serialbox-python/pp_ser/pp_ser.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@
pp_ser.py

Parser to expand $!SER serialization directives in Fortran code in order to generate
serialization code using the m_serialize.f90 interface for the STELLA serialization
framework.
serialization code using the m_serialize.f90 interface.

The grammar is defined by a set of !$SER directives. All directives are case-
insensitive. The main keywords are INIT for initialization, VERBATIM for echoeing
Expand Down
6 changes: 3 additions & 3 deletions src/serialbox-python/serialbox/serializer.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ def enable():
"""Enable serialization.

Serialization is enabled by default, but it can be disabled either by setting the
environment variable ``STELLA_SERIALIZATION_DISABLE`` to a positive value or by calling the
environment variable ``SERIALBOX_SERIALIZATION_DISABLE`` to a positive value or by calling the
function :func:`Serializer.disable <serialbox.Serializer.disable>`.
With this function you enable the serialization independently of the current environment.

Expand All @@ -328,7 +328,7 @@ def disable():
"""Disable serialization.

Serialization is enabled by default, but it can be disabled either by setting the
environment variable ``STELLA_SERIALIZATION_DISABLE`` to a positive value or by calling the
environment variable ``SERIALBOX_SERIALIZATION_DISABLE`` to a positive value or by calling the
function :func:`Serializer.disable <serialbox.Serializer.disable>`.
With this function you disable the serialization independently of the current environment.

Expand All @@ -344,7 +344,7 @@ def status():
The status is represented as an integer which can take the following values:

- 0: the variable is not yet initialized i.e the serialization is enabled if the environment
variable ``STELLA_SERIALIZATION_DISABLE`` or ``SERIALBOX_SERIALIZATION_DISABLE`` is not
variable ``SERIALBOX_SERIALIZATION_DISABLE`` is not
set to a positive value. The first Serializer which is initialized has to set this value
either to +1 or to -1 according to the environment.
- +1: the serialization is enabled, independently of the environment
Expand Down
9 changes: 0 additions & 9 deletions src/serialbox/core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,6 @@ set(SOURCES
archive/NetCDFArchive.h
archive/MockArchive.cpp
archive/MockArchive.h

frontend/stella/MetainfoSet.cpp
frontend/stella/MetainfoSet.h
frontend/stella/Savepoint.cpp
frontend/stella/Savepoint.h
frontend/stella/Serializer.cpp
frontend/stella/Serializer.h
frontend/stella/DataFieldInfo.cpp
frontend/stella/DataFieldInfo.h
)

add_library(SerialboxObjects OBJECT ${SOURCES})
Expand Down
2 changes: 1 addition & 1 deletion src/serialbox/core/SerializerImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ static inline bool dimsEqual(const std::vector<int>& dims1, const std::vector<in
return false;

// If a dimensions is negative, 0 or 1 it is ignored. We have to do this as gridtools treats empty
// dimensions as 0 while STELLA and Frotran usually set them to 1.
// dimensions as 0 while Fortran usually set them to 1.
for(std::size_t i = 0; i < dims1.size(); ++i)
if(dims1[i] != dims2[i] && !(dims1[i] <= 1 && dims2[i] <= 1))
return false;
Expand Down
Loading