Skip to content
Snippets Groups Projects
Commit 6a8f2ff0 authored by Luis Kornblueh's avatar Luis Kornblueh
Browse files

Merge branch 'cleanup-license' into 'master'

Cleanup license

See merge request !12
parents e9ce17ad 9d64372b
No related branches found
Tags 1.1.2
1 merge request!12Cleanup license
Showing with 371 additions and 311 deletions
// Copyright (c) 2013-2024 MPI-M, Luis Kornblueh, Rahul Sinha and DWD, Florian Prill. All rights reserved.
//
// SPDX-License-Identifier: BSD-3-Clause
//
/**
* @addtogroup CBindings libmtime C language bindings
* @{
......
// Copyright (c) 2013-2024 MPI-M, Luis Kornblueh, Rahul Sinha and DWD, Florian Prill. All rights reserved.
//
// SPDX-License-Identifier: BSD-3-Clause
//
/**
* @addtogroup CBindings libmtime C language bindings
* @{
......
// Copyright (c) 2013-2024 MPI-M, Luis Kornblueh, Rahul Sinha and DWD, Florian Prill. All rights reserved.
//
// SPDX-License-Identifier: BSD-3-Clause
//
#ifndef ORBIT_H
#define ORBIT_H
......
# Copyright (c) 2018-2024, MPI-M
#
# Author: Sergey Kosukhin <sergey.kosukhin@mpimet.mpg.de>
#
# SPDX-License-Identifier: BSD-3-Clause
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. Neither the name of the copyright holder nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
# ACX_FC_MODULE_IN_FLAG([ACTION-IF-SUCCESS],
# [ACTION-IF-FAILURE = FAILURE])
# -----------------------------------------------------------------------------
# Originally taken from the master branch of Autoconf where it is known as
# AC_FC_MODULE_FLAG.
# -----------------------------------------------------------------------------
# Finds the Fortran compiler flag needed to specify module search paths.
#
# If successful, runs ACTION-IF-SUCCESS, otherwise runs ACTION-IF-FAILURE
......@@ -12,59 +39,36 @@
# The flag is cached in the acx_cv_fc_module_in_flag variable, which may
# contain a significant trailing whitespace.
#
# Known flags:
# gfortran: -Idir, -I dir (-M dir, -Mdir (deprecated),
# -Jdir for writing)
# g95: -I dir (-fmod=dir for writing)
# SUN: -Mdir, -M dir (-moddir=dir for writing;
# -Idir for includes is also searched)
# HP: -Idir, -I dir (+moddir=dir for writing)
# IBM: -Idir (-qmoddir=dir for writing)
# Intel: -Idir -I dir (-mod dir for writing)
# Absoft: -pdir
# Lahey: -mod dir
# Cray: -module dir, -p dir (-J dir for writing)
# -e m is needed to enable writing .mod files at all
# Compaq: -Idir
# NAGWare: -I dir
# PathScale: -I dir (but -module dir is looked at first)
# Portland: -module dir (first -module also names dir for writing)
# Fujitsu: -Am -Idir (-Mdir for writing is searched first, then '.',
# then -I)
# (-Am indicates how module information is saved)
# The implementation patches the standard Autoconf macro AC_FC_MODULE_FLAG to
# reduce the number of LANG switches and to avoid false negative results with
# the GFortran '-fmodule-private' flag.
#
AC_DEFUN([ACX_FC_MODULE_IN_FLAG],
[AC_LANG_ASSERT([Fortran])dnl
AC_CACHE_CHECK([for Fortran compiler flag needed to specify search paths dnl
for module files],
[acx_cv_fc_module_in_flag],
[acx_cv_fc_module_in_flag=unknown
AS_MKDIR_P([conftest.dir])
cd conftest.dir
AC_COMPILE_IFELSE([AC_LANG_SOURCE(
[[ module conftest_module
implicit none
public
contains
subroutine conftest_routine
end subroutine
end module]])],
[cd ..
acx_save_FCFLAGS=$FCFLAGS
AC_LANG_CONFTEST([AC_LANG_PROGRAM([],
[[ use conftest_module, only : conftest_routine
m4_pushdef([ac_cv_fc_module_flag], [acx_cv_fc_module_in_flag])dnl
m4_pushdef([AC_CACHE_CHECK],
m4_bpatsubst(m4_dquote(m4_defn([AC_CACHE_CHECK])),
[\$][1],
[for Fortran compiler flag needed to specify search paths for module dnl
files]))dnl
m4_pushdef([AC_SUBST], [dn][l ])dnl
m4_pushdef([AC_CONFIG_COMMANDS_PRE], [dn][l ])dnl
m4_pushdef([acx_orig_macro],
m4_bpatsubsts(m4_dquote(m4_defn([AC_FC_MODULE_FLAG])),
[^ module conftest_module], [\&
implicit none
call conftest_routine()]])])
for acx_flag in -M -I '-I ' '-M ' -p '-mod ' '-module ' '-Am -I'; do
FCFLAGS="$acx_save_FCFLAGS ${acx_flag}conftest.dir dnl
dnl Add the flag twice to prevent matching an output flag.
${acx_flag}conftest.dir"
AC_COMPILE_IFELSE([], [acx_cv_fc_module_in_flag=$acx_flag])
test "x$acx_cv_fc_module_in_flag" != xunknown && break
done
rm -f conftest.$ac_ext
FCFLAGS=$acx_save_FCFLAGS])
rm -rf conftest.dir])
public],
[^ use conftest_module], [\&, only : conftest_routine
implicit none],
[AC_LANG_P\(OP\|USH\)(\[?Fortran\]?)], [dn][l ],
[FC_MODINC=.*], [dn][l ],
[^ *#], [dn][l ]))dnl
acx_orig_macro([:], [:])dnl
m4_popdef([acx_orig_macro])dnl
m4_popdef([AC_SUBST])dnl
m4_popdef([AC_CONFIG_COMMANDS_PRE])dnl
m4_popdef([AC_CACHE_CHECK])dnl
m4_popdef([ac_cv_fc_module_flag])dnl
AS_VAR_IF([acx_cv_fc_module_in_flag], [unknown], [m4_default([$2],
[AC_MSG_FAILURE([unable to detect Fortran compiler flag needed to dnl
specify search paths for module files])])], [$1])])
......@@ -72,9 +76,6 @@ specify search paths for module files])])], [$1])])
# ACX_FC_MODULE_OUT_FLAG([ACTION-IF-SUCCESS],
# [ACTION-IF-FAILURE = FAILURE])
# -----------------------------------------------------------------------------
# Originally taken from the master branch of Autoconf where it is known as
# AC_FC_MODULE_OUTPUT_FLAG.
# -----------------------------------------------------------------------------
# Finds the Fortran compiler flag needed to specify module output path.
#
# If successful, runs ACTION-IF-SUCCESS, otherwise runs ACTION-IF-FAILURE
......@@ -83,42 +84,40 @@ specify search paths for module files])])], [$1])])
# The flag is cached in the acx_cv_fc_module_out_flag variable, which may
# contain a significant trailing whitespace.
#
# See ACX_FC_MODULE_IN_FLAG for the known flags.
# The implementation patches the standard Autoconf macro
# AC_FC_MODULE_OUTPUT_FLAG to reduce the number of LANG switches and to avoid
# false negative results with the GFortran '-fmodule-private' flag.
#
AC_DEFUN([ACX_FC_MODULE_OUT_FLAG],
[AC_LANG_ASSERT([Fortran])dnl
AC_CACHE_CHECK([for Fortran compiler flag needed to specify output path dnl
for module files],
[acx_cv_fc_module_out_flag],
[acx_cv_fc_module_out_flag=unknown
AS_MKDIR_P([conftest.dir/sub])
cd conftest.dir
acx_save_FCFLAGS=$FCFLAGS
AC_LANG_CONFTEST([AC_LANG_PROGRAM([],
[[ use conftest_module, only : conftest_routine
implicit none
call conftest_routine()]])])
mv conftest.$ac_ext sub/conftest.$ac_ext
AC_LANG_CONFTEST([AC_LANG_SOURCE(
[[ module conftest_module
m4_pushdef([ac_cv_fc_module_output_flag], [acx_cv_fc_module_out_flag])dnl
m4_pushdef([AC_CACHE_CHECK],
m4_bpatsubst(m4_dquote(m4_defn([AC_CACHE_CHECK])),
[\$][1],
[for Fortran compiler flag needed to specify output path for module dnl
files]))dnl
m4_pushdef([AC_SUBST], [dn][l ])dnl
m4_pushdef([AC_CONFIG_COMMANDS_PRE], [dn][l ])dnl
m4_pushdef([acx_orig_macro],
m4_bpatsubsts(m4_dquote(m4_defn([AC_FC_MODULE_OUTPUT_FLAG])),
[^ module conftest_module], [\&
implicit none
public
contains
subroutine conftest_routine
end subroutine
end module]])])
for acx_flag in -J '-J ' -fmod= -moddir= +moddir= -qmoddir= '-mdir ' dnl
'-mod ' '-module ' -M '-Am -M' '-e m -J '; do
FCFLAGS="${acx_flag}sub $acx_save_FCFLAGS"
AC_COMPILE_IFELSE([],
[cd sub
AC_COMPILE_IFELSE([], [acx_cv_fc_module_out_flag=$acx_flag])
cd ..])
test "x$acx_cv_fc_module_out_flag" != xunknown && break
done
FCFLAGS=$acx_save_FCFLAGS
cd ..
rm -rf conftest.dir])
public],
[^ use conftest_module], [\&, only : conftest_routine
implicit none],
[AC_LANG_P\(OP\|USH\)(\[?Fortran\]?)], [dn][l ],
[FC_MODOUT=.*], [dn][l ],
[^ *#], [dn][l ]))dnl
m4_version_prereq([2.70], [],
[m4_define([acx_orig_macro],
m4_bpatsubsts(m4_dquote(m4_defn([acx_orig_macro])),
['-mod '], ['-mdir ' \&],))])dnl
acx_orig_macro([:], [:])dnl
m4_popdef([acx_orig_macro])dnl
m4_popdef([AC_SUBST])dnl
m4_popdef([AC_CONFIG_COMMANDS_PRE])dnl
m4_popdef([AC_CACHE_CHECK])dnl
m4_popdef([ac_cv_fc_module_output_flag])dnl
AS_VAR_IF([acx_cv_fc_module_out_flag], [unknown], [m4_default([$2],
[AC_MSG_FAILURE([unable to detect Fortran compiler flag needed to dnl
specify output path for module files])])], [$1])])
......@@ -126,9 +125,6 @@ specify output path for module files])])], [$1])])
# ACX_FC_MODULE_NAMING([ACTION-IF-SUCCESS],
# [ACTION-IF-FAILURE = FAILURE])
# -----------------------------------------------------------------------------
# Originally taken from the master branch of Autoconf where it is known as
# AC_FC_MODULE_EXTENSION.
# -----------------------------------------------------------------------------
# Finds the Fortran compiler module file naming template.
#
# If successful, runs ACTION-IF-SUCCESS, otherwise runs ACTION-IF-FAILURE
......@@ -157,20 +153,35 @@ AS_VAR_TEST_SET([acx_cv_fc_module_naming_ext])],
subroutine conftest_routine
end subroutine
end module]])],
[acx_cv_fc_module_naming_ext=`ls | sed -n 's,conftest_module\.,,p'`
AS_VAR_IF([acx_cv_fc_module_naming_ext], [],
[acx_cv_fc_module_naming_ext=`ls | sed -n 's,CONFTEST_MODULE\.,,p'`
AS_VAR_IF([acx_cv_fc_module_naming_ext], [],
[acx_cv_fc_module_naming_ext=unknown
[AS_CASE(["$acx_cv_fc_module_naming_upper"],
[yes],
[acx_tmp='CONFTEST_MODULE.*'
acx_cv_fc_module_naming_ext=unknown],
[no],
[acx_tmp='conftest_module.*'
acx_cv_fc_module_naming_ext=unknown],
[AS_VAR_SET_IF([acx_cv_fc_module_naming_ext],
[acx_tmp="CONFTEST_MODULE.$acx_cv_fc_module_naming_ext dnl
conftest_module.$acx_cv_fc_module_naming_ext"
acx_cv_fc_module_naming_upper=unknown],
[acx_cv_fc_module_naming_upper=yes])],
[acx_cv_fc_module_naming_upper=no])],
[acx_cv_fc_module_naming_ext=unknown
acx_cv_fc_module_naming_upper=unknown])
[acx_tmp='CONFTEST_MODULE.* conftest_module.*'
acx_cv_fc_module_naming_upper=unknown
acx_cv_fc_module_naming_ext=unknown])])
acx_tmp=`ls $acx_tmp 2>/dev/null`
AS_IF([test 1 -eq `AS_ECHO(["$acx_tmp"]) | wc -l` 2>/dev/null],
[AS_CASE(["$acx_tmp"],
[CONFTEST_MODULE.*],
[acx_cv_fc_module_naming_upper=yes
acx_cv_fc_module_naming_ext=`echo $acx_tmp | dnl
sed -n 's,CONFTEST_MODULE\.,,p'`],
[conftest_module.*],
[acx_cv_fc_module_naming_upper=no
acx_cv_fc_module_naming_ext=`echo $acx_tmp | dnl
sed -n 's,conftest_module\.,,p'`])])])
cd ..
rm -rf conftest.dir])
AS_IF([test x"$acx_cv_fc_module_naming_upper" = xunknown || dnl
test x"$acx_cv_fc_module_naming_ext" = xunknown],
AS_IF([test "x$acx_cv_fc_module_naming_upper" = xunknown || dnl
test "x$acx_cv_fc_module_naming_ext" = xunknown],
[AC_MSG_RESULT([unknown])
m4_default([$2], [AC_MSG_FAILURE([unable to detect Fortran compiler dnl
module file naming template])])],
......
# Copyright (c) 2018-2024, MPI-M
#
# Author: Sergey Kosukhin <sergey.kosukhin@mpimet.mpg.de>
#
# SPDX-License-Identifier: BSD-3-Clause
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. Neither the name of the copyright holder nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
# ACX_FC_PP_SRCEXT(EXTENSION,
# [ACTION-IF-SUCCESS],
# [ACTION-IF-FAILURE = FAILURE])
# -----------------------------------------------------------------------------
# Originally taken from the master branch of Autoconf where it is known as
# AC_FC_PP_SRCEXT.
# -----------------------------------------------------------------------------
# Finds the Fortran compiler flag needed to enable Fortran preprocessing for
# source files with extension EXTENSION. The result is either "unknown",
# or the actual compiler flag required to enable Fortran preprocessing, which
......@@ -21,69 +48,35 @@
# The flag is cached in the acx_cv_fc_pp_srcext_[]EXTENSION, which may contain
# whitespaces.
#
# Known flags:
# gfortran: -cpp
# SGI: -ftpp
# SUN: -xpp={fpp,cpp}
# IBM: -qsuffix=cpp=EXTENSION
# HP: +cpp
# PGI: -Mpreprocess
# Absoft: -cpp
# Cray: -e T, -e Z
# Intel: -fpp (-Tf may also be needed right before the source file name)
# PathScale: -ftpp, -cpp
# Lahey: -Cpp
# NAGWare: -fpp
# Compaq/Tru64: -cpp
# f2c: -cpp
# g95: -cpp
# The implementation patches the standard Autoconf macro AC_FC_PP_SRCEXT to
# reduce the number of LANG switches and to support additional known compiler
# flags:
# Cray: -e T (must precede -e Z, which triggers generation of unwanted *.i
# flags and crashes old versions of the compiler at the linking
# stage)
#
AC_DEFUN([ACX_FC_PP_SRCEXT],
[m4_provide([AC_FC_PP_SRCEXT])dnl
AC_LANG_ASSERT([Fortran])dnl
[AC_LANG_ASSERT([Fortran])dnl
acx_ext_save=$ac_ext
m4_pushdef([acx_cache_var], [acx_cv_fc_pp_srcext_$1])dnl
AC_MSG_CHECKING([for Fortran compiler flag needed to compile dnl
preprocessed .$1 files])
AC_CACHE_VAL([acx_cache_var],
[acx_cache_var=unknown
acx_ext_save=$ac_ext
acx_fcflags_srcext_save=$ac_fcflags_srcext
ac_ext=$1
AS_CASE([$acx_fc_pp_srcext_ext],
[[[fF]]77], [acx_fc_pp_srcext_try=f77-cpp-input],
[acx_fc_pp_srcext_try=f95-cpp-input])
for ac_fcflags_srcext in '' -ftpp -fpp -Tf '-fpp -Tf' -xpp=fpp dnl
-Mpreprocess '-e T' '-e Z' -cpp -xpp=cpp -qsuffix=cpp=$1 dnl
"-x $acx_fc_pp_srcext_try" +cpp -Cpp; do
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],
[[#if 0
#include <ac_nonexistent.h>
choke me
#endif]])],
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],
[[#if 1
#include <ac_nonexistent.h>
choke me
#endif]])],
[],
[acx_cache_var=$ac_fcflags_srcext])])
test "x$acx_cache_var" != xunknown && break
done
ac_fcflags_srcext=$acx_fcflags_srcext_save
ac_ext=$acx_ext_save])
AS_IF([test -n "$acx_cache_var"],
[AC_MSG_RESULT([$acx_cache_var])],
[AC_MSG_RESULT([none needed])])
AC_SUBST([FCFLAGS_][$1])
m4_pushdef([ac_cv_fc_pp_srcext_$1], [acx_cache_var])dnl
m4_pushdef([AC_CACHE_CHECK],
m4_bpatsubst(m4_dquote(m4_defn([AC_CACHE_CHECK])),
[\$][1],
[for Fortran compiler flag needed to compile preprocessed .$1 files]))dnl
m4_pushdef([AC_FC_PP_SRCEXT],
m4_bpatsubsts(m4_dquote(m4_defn([AC_FC_PP_SRCEXT])),
["-e Z"], ["-e T" \&],
[AC_LANG_P\(OP\|USH\)(\[?Fortran\]?)], [dn][l ]))dnl
AC_FC_PP_SRCEXT([$1], [], [:])
m4_popdef([AC_FC_PP_SRCEXT])dnl
m4_popdef([AC_CACHE_CHECK])dnl
m4_popdef([ac_cv_fc_pp_srcext_$1])dnl
AS_VAR_IF([acx_cache_var], [unknown],
[ac_fcflags_srcext=
AS_VAR_COPY([FCFLAGS_][$1], [ac_fcflags_srcext])
[ac_ext=$acx_ext_save
m4_default([$3],
[AC_MSG_FAILURE([unable to detect Fortran compiler flag needed to dnl
compile preprocessed .$1 files])])],
[ac_fcflags_srcext=$acx_cache_var
AS_VAR_COPY([FCFLAGS_][$1], [ac_fcflags_srcext])
ac_fc_srcext=$1
AS_VAR_COPY([ac_ext], [ac_fc_srcext])
[ac_ext=$ac_fc_srcext
$2])
m4_popdef([acx_cache_var])])
# Copyright (c) 2010-2024, DKRZ, MPI-M
#
# Authors:
# Thomas Jahns <jahns@dkrz.de>
# Sergey Kosukhin <sergey.kosukhin@mpimet.mpg.de>
#
# SPDX-License-Identifier: BSD-3-Clause
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. Neither the name of the copyright holder nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
# ACX_LANG_LIB_CHECK(FUNC-NAME,
# [ACTION-IF-SUCCESS],
# [ACTION-IF-FAILURE = FAILURE],
......
# Copyright (c) 2018-2024, MPI-M
#
# Author: Sergey Kosukhin <sergey.kosukhin@mpimet.mpg.de>
#
# SPDX-License-Identifier: BSD-3-Clause
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. Neither the name of the copyright holder nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
# ACX_LANG_OPENMP_FLAG([ACTION-IF-SUCCESS],
# [ACTION-IF-FAILURE = FAILURE])
# -----------------------------------------------------------------------------
# Originally taken from the master branch of Autoconf where it is a part of
# AC_OPENMP.
# -----------------------------------------------------------------------------
# Finds the compiler flag needed to enable OpenMP support. The result is either
# "unknown", or the actual compiler flag required to enable OpenMP support,
# which may be an empty string.
#
# Known flags:
# Intel >= 16: -qopenmp
# NAG, Intel < 16: -openmp
# GNU: -fopenmp
# Cray: -homp
# SGI, PGI: -mp
# SunPRO: -xopenmp
# Tru64 Compaq C: -omp
# IBM XL: -qsmp=omp
# NEC SX: -Popenmp
# Lahey Fortran: --openmp
#
# If successful, runs ACTION-IF-SUCCESS, otherwise runs ACTION-IF-FAILURE
# (defaults to failing with an error message).
#
......@@ -34,7 +49,9 @@
# acx_cv_[]_AC_LANG_ABBREV[]_macro__OPENMP_value shell variable. The possible
# (successful) values of the variable are dates, which map to the versions of
# the standard in the following way:
# 201611 5.0 (OpenMP 5.0 preview 1)
# 202111 5.2
# 202011 5.1
# 201811 5.0
# 201511 4.5
# 201307 4.0
# 201107 3.1
......@@ -54,8 +71,7 @@ support])
[acx_cache_var=unknown
acx_save_[]_AC_LANG_PREFIX[]FLAGS=$[]_AC_LANG_PREFIX[]FLAGS
AC_LANG_CONFTEST([_ACX_LANG_OPENMP])
for acx_lang_openmp_flag in '' -qopenmp -openmp -fopenmp -homp -mp dnl
-xopenmp -omp -qsmp=omp -Popenmp --openmp; do
for acx_lang_openmp_flag in '' -qopenmp -openmp -fopenmp -homp -mp; do
_AC_LANG_PREFIX[]FLAGS="${acx_save_[]_AC_LANG_PREFIX[]FLAGS} dnl
$acx_lang_openmp_flag"
AC_LINK_IFELSE([], [acx_cache_var=$acx_lang_openmp_flag])
......
# Copyright (c) 2010-2024, DKRZ, MPI-M
#
# Authors:
# Thomas Jahns <jahns@dkrz.de>
# Sergey Kosukhin <sergey.kosukhin@mpimet.mpg.de>
#
# SPDX-License-Identifier: BSD-3-Clause
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. Neither the name of the copyright holder nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
# ACX_LANG_PACKAGE_INIT(PACKAGE-NAME,
# [INC-SEARCH-FLAGS],
# [LIB-SEARCH-FLAGS],
......@@ -36,13 +68,13 @@ AC_DEFUN([ACX_LANG_PACKAGE_INIT],
m4_pushdef([acx_package_with_root],
[with_[]AS_TR_SH([ASX_TR_ARG([$1])])_root])dnl
AC_ARG_WITH(ASX_TR_ARG([$1])[-root],
[AC_HELP_STRING([--with-ASX_TR_ARG([$1])-root=[]acx_package_ROOT],
[AS_HELP_STRING([--with-ASX_TR_ARG([$1])-root=[]acx_package_ROOT],
[root search path for $1 headers and libraries])])
m4_ifnblank([$2],
[m4_pushdef([acx_package_with_include],
[with_[]AS_TR_SH([ASX_TR_ARG([$1])])_include])dnl
AC_ARG_WITH(ASX_TR_ARG([$1])[-include],
[AC_HELP_STRING([--with-ASX_TR_ARG([$1])-include=DIR],
[AS_HELP_STRING([--with-ASX_TR_ARG([$1])-include=DIR],
[search path for $1 headers @<:@]acx_package_ROOT[]dnl
m4_default([$4], [/include])[@:>@])], [],
[AS_VAR_SET_IF([acx_package_with_root],
......@@ -61,7 +93,7 @@ m4_default([$4], [/include])"])])
[m4_pushdef([acx_package_with_lib],
[with_[]AS_TR_SH([ASX_TR_ARG([$1])])_lib])dnl
AC_ARG_WITH(ASX_TR_ARG([$1])[-lib],
[AC_HELP_STRING([--with-ASX_TR_ARG([$1])-lib=DIR],
[AS_HELP_STRING([--with-ASX_TR_ARG([$1])-lib=DIR],
[search path for $1 libraries @<:@]acx_package_ROOT[]dnl
m4_default([$5], [/lib])[@:>@])],
[],
......
# Copyright (c) 2018-2024, MPI-M
#
# Author: Sergey Kosukhin <sergey.kosukhin@mpimet.mpg.de>
#
# SPDX-License-Identifier: BSD-3-Clause
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. Neither the name of the copyright holder nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
# ASX_TR_ARG(EXPRESSION)
# -----------------------------------------------------------------------------
# Transforms EXPRESSION into shell code that generates a name for a command
......@@ -74,3 +104,34 @@ AC_DEFUN([ASX_ESCAPE_SINGLE_QUOTE],
[AS_CASE([AS_VAR_GET([$1])], [*\'*],
[AS_VAR_SET([$1], [`AS_ECHO(["AS_VAR_GET([$1])"]) | dnl
sed "s/'/'\\\\\\\\''/g"`])])])
# ASX_SRCDIRS(BUILD-DIR-NAME)
# -----------------------------------------------------------------------------
# Receives a normalized (i.e. does not contain '/./', '..', etc.) path
# BUILD-DIR-NAME to a directory relative to the top build directory and emits
# shell code that sets the following variables:
# 1) ac_builddir - path to BUILD-DIR-NAME relative to BUILD-DIR-NAME
# (i.e. always equals to '.');
# 2) ac_abs_builddir - absolute path to BUILD-DIR-NAME;
# 3) ac_top_builddir_sub - path to the top build directory relative to
# BUILD-DIR-NAME (i.e. equals to '.' if
# BUILD-DIR-NAME is the top build directory);
# 4) ac_top_build_prefix - empty if ac_top_builddir_sub equals to '.' and
# path to the top build directory relative to
# BUILD-DIR-NAME with a trailing slash, otherwise;
# 5) ac_abs_top_builddir - absolute path to the top build directory;
# 6) ac_srcdir - path to <top-srcdir>/BUILD-DIR-NAME relative to
# BUILD-DIR-NAME where <top-srcdir> is the top source
# directory (i.e. equals to the path from BUILD-DIR-NAME to
# its respective source directory);
# 7) ac_abs_srcdir - absolute path to <top-srcdir>/BUILD-DIR-NAME where
# <top-srcdir> is the top source directory (i.e. equals
# to the absolute path to the source directory that
# corresponds to BUILD-DIR-NAME);
# 8) ac_top_srcdir - path to the top source directory relative to
# BUILD-DIR-NAME;
# 9) ac_abs_top_srcdir - absolute path to the top source directory.
#
AC_DEFUN([ASX_SRCDIRS],
[AC_REQUIRE_SHELL_FN([acx_subdir_srcdirs_fn], [], [_AC_SRCDIRS(["$[]1"])])dnl
acx_subdir_srcdirs_fn $1])
\ No newline at end of file
......@@ -88,6 +88,7 @@
# Then add this variable to MOSTLYCLEANFILES.
#
# LICENSE
# SPDX-License-Identifier: FSFAP
#
# Copyright (c) 2009 Oren Ben-Kiki <oren@ben-kiki.org>
# Copyright (c) 2015 Olaf Mandel <olaf@mandel.name>
......
# Helper functions for option handling. -*- Autoconf -*-
#
# Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software
# Foundation, Inc.
# Copyright (C) 2004-2005, 2007-2009, 2011-2019, 2021-2022 Free
# Software Foundation, Inc.
# Written by Gary V. Vaughan, 2004
#
# This file is free software; the Free Software Foundation gives
......
# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
#
# Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software
# Copyright (C) 2004-2005, 2007-2008, 2011-2019, 2021-2022 Free Software
# Foundation, Inc.
# Written by Gary V. Vaughan, 2004
#
......
# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
#
# Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software
# Foundation, Inc.
# Copyright (C) 2004-2005, 2007, 2009, 2011-2019, 2021-2022 Free
# Software Foundation, Inc.
# Written by Scott James Remnant, 2004.
#
# This file is free software; the Free Software Foundation gives
......
# Copyright (c) 2013-2024 MPI-M, Luis Kornblueh, Rahul Sinha and DWD, Florian Prill. All rights reserved.
#
# SPDX-License-Identifier: CC0-1.0
#
/tests
!! Copyright (c) 2013-2024 MPI-M, Luis Kornblueh, Rahul Sinha and DWD, Florian Prill. All rights reserved.
!!
!! SPDX-License-Identifier: BSD-3-Clause
!!
ADD_TEST_SUITE(from_example_test_suite)
# Copyright (c) 2013-2024 MPI-M, Luis Kornblueh, Rahul Sinha and DWD, Florian Prill. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
lib_LTLIBRARIES = libmtime.la
AM_CPPFLAGS = -I$(top_srcdir)/include
......
......@@ -426,6 +426,11 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
# Copyright (c) 2013-2024 MPI-M, Luis Kornblueh, Rahul Sinha and DWD, Florian Prill. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
lib_LTLIBRARIES = libmtime.la
AM_CPPFLAGS = -I$(top_srcdir)/include
AM_FCFLAGS = $(am__append_1)
......
This diff is collapsed.
// Copyright (c) 2013-2024 MPI-M, Luis Kornblueh, Rahul Sinha and DWD, Florian Prill. All rights reserved.
//
// SPDX-License-Identifier: BSD-3-Clause
//
/*
* Description:
*
......
!! Copyright (c) 2013-2024 MPI-M, Luis Kornblueh, Rahul Sinha and DWD, Florian Prill. All rights reserved.
!!
!! SPDX-License-Identifier: BSD-3-Clause
!!
!> @file libmtime.f90
!!
!! @brief Providing the Fortran language bindings for libmtime
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment