Commit 8037fbf6 authored by Thomas Jahns's avatar Thomas Jahns 🤸
Browse files

Add missing config.h includes.

* Also fix missing/malformed license headers and conditional inclusion macros
  where found.
parent 8988be36
/**
* @file openmpi_dup.c
* @brief detects problem some versions of OpenMPI have with MPI_Type_dup
*
* @copyright Copyright (C) 2012 Moritz Hanke <hanke@dkrz.de>
* Thomas Jahns <jahns@dkrz.de>
*
* @author Moritz Hanke <hanke@dkrz.de>
* Thomas Jahns <jahns@dkrz.de>
*/
/*
* Keywords:
* Maintainer: Moritz Hanke <hanke@dkrz.de>
* Thomas Jahns <jahns@dkrz.de>
* URL: https://redmine.dkrz.de/doc/yaxt/html/index.html
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 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.
*
* Neither the name of the DKRZ GmbH 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.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <mpi.h>
#include <stdio.h>
......@@ -8,7 +55,7 @@ mpicc -std=gnu99 mpi_test.c && a.out
* expected output: none
* actual output
* actual output on defective OpenMPI installations
recv_data[0] = 131072
ref_recv_data[0] = 0
......
/**
* @file openmpi_struct_dt.c
* @brief demonstrates a problem some OpenMPI versions have with
* transferring some data layouts
*
* @copyright Copyright (C) 2012 Moritz Hanke <hanke@dkrz.de>
* Thomas Jahns <jahns@dkrz.de>
*
* @author Moritz Hanke <hanke@dkrz.de>
* Thomas Jahns <jahns@dkrz.de>
*/
/*
* Keywords:
* Maintainer: Moritz Hanke <hanke@dkrz.de>
* Thomas Jahns <jahns@dkrz.de>
* URL: https://redmine.dkrz.de/doc/yaxt/html/index.html
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 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.
*
* Neither the name of the DKRZ GmbH 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.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <mpi.h>
#include <stdio.h>
......
......@@ -40,6 +40,9 @@
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <stdlib.h>
#include <stdio.h>
......
/**
* @file idxsection_example.c
* @file idxsection_examples.c
*
* @copyright Copyright (C) 2012 Moritz Hanke <hanke@dkrz.de>
*
......@@ -37,6 +37,9 @@
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <stdlib.h>
#include <stdio.h>
......
/**
* @file print_index_list.c
* @file print_index_list.h
*
* @copyright Copyright (C) 2013 Moritz Hanke <hanke@dkrz.de>
* Thomas Jahns <jahns@dkrz.de>
......@@ -38,6 +38,12 @@
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef PRINT_INDEX_LIST_H
#define PRINT_INDEX_LIST_H
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
static void print_index_list(Xt_idxlist idxlist) {
......@@ -54,3 +60,4 @@ static void print_index_list(Xt_idxlist idxlist) {
puts("");
}
#endif
/**
* @file row_to_col.c
* @file row2col.c
*
* @copyright Copyright (C) 2013 Moritz Hanke <hanke@dkrz.de>
* Thomas Jahns <jahns@dkrz.de>
......@@ -40,6 +40,9 @@
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <stdlib.h>
#include <stdio.h>
......
......@@ -43,6 +43,9 @@
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <stdlib.h>
#include <stdio.h>
......
......@@ -40,6 +40,9 @@
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <assert.h>
#include <math.h>
......
/**
* @file test_perf_idxsection_get_positions_of_indices.c
* @file perf_idxsection_get_positions_of_indices.c
*
* @copyright Copyright (C) 2012 Moritz Hanke <hanke@dkrz.de>
*
......@@ -37,7 +37,9 @@
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <inttypes.h>
#include <limits.h>
......
......@@ -43,6 +43,10 @@
#ifndef PPM_XFUNCS_INCLUDED
#define PPM_XFUNCS_INCLUDED
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <stdio.h>
#include <stdlib.h>
......
......@@ -43,6 +43,10 @@
#ifndef SYMPREFIX_H
#define SYMPREFIX_H
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
/* All upper case fortran names */
#define SYMPREFIX(symbol) XT_##symbol
/* Mixed case C names */
......
......@@ -38,6 +38,9 @@
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <errno.h>
#include <stdlib.h>
......
......@@ -38,6 +38,10 @@
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <errno.h>
#include <stdio.h>
#include <string.h>
......
......@@ -40,6 +40,9 @@
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <stdlib.h>
......
......@@ -44,6 +44,10 @@
#ifndef ENSURE_ARRAY_SIZE_H
#define ENSURE_ARRAY_SIZE_H
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
void
xt_realloc_array(void **array, size_t elem_size, size_t *curr_array_size,
size_t requested_size);
......
/**
* @file instr.h
*
* @copyright Copyright (C) 2012 Jörg Behrens <behrens@dkrz.de>
* Moritz Hanke <hanke@dkrz.de>
* Thomas Jahns <jahns@dkrz.de>
*
* @author Jörg Behrens <behrens@dkrz.de>
* Moritz Hanke <hanke@dkrz.de>
* Thomas Jahns <jahns@dkrz.de>
*/
/*
* Keywords:
* Maintainer: Moritz Hanke <hanke@dkrz.de>
* Thomas Jahns <jahns@dkrz.de>
* URL: https://redmine.dkrz.de/doc/yaxt/html/index.html
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 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.
*
* Neither the name of the DKRZ GmbH 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.
*/
#ifndef SCT_INSTR_H_INCLUDED
#define SCT_INSTR_H_INCLUDED
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#ifdef INSTR_WITH_SCT
#include "sct.h"
......@@ -19,3 +70,5 @@
#define INSTR_FINALIZE(...)
#endif
#endif /* SCT_INSTR_H_INCLUDED */
......@@ -40,6 +40,9 @@
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <stdlib.h>
#include <stdio.h>
......
#include <stdlib.h>
#include "xt/quicksort.h"
/** \file quicksort.c
* \brief Non-recursive stack version of Quicksort
*
* based on N. Wirth's Pascal Book, 'Algorithms + Data Structures = Programms'.
* by Alan Miller ( 19 Jul 1995 )
*
* based on:
* - http://www.nag.com/nagware/examples.asp
* - http://www.nag.com/nagware/Examples/nur.f90
*
* see also:
* - http://en.wikipedia.org/wiki/Quicksort
*
* @copyright Copyright (C) 2012 Jörg Behrens <behrens@dkrz.de>
* Moritz Hanke <hanke@dkrz.de>
* Thomas Jahns <jahns@dkrz.de>
*
* @author Jörg Behrens <behrens@dkrz.de>
* Moritz Hanke <hanke@dkrz.de>
* Thomas Jahns <jahns@dkrz.de>
*/
/**
* @file quicksort.c
* @brief Non-recursive stack version of Quicksort
*
* based on N. Wirth's Pascal Book, 'Algorithms + Data Structures = Programms'.
* by Alan Miller ( 19 Jul 1995 )
*
* based on:
* - http://www.nag.com/nagware/examples.asp
* - http://www.nag.com/nagware/Examples/nur.f90
*
* see also:
* - http://en.wikipedia.org/wiki/Quicksort
*
* @copyright Copyright (C) 2012 Jörg Behrens <behrens@dkrz.de>
* Moritz Hanke <hanke@dkrz.de>
* Thomas Jahns <jahns@dkrz.de>
*
* @author Jörg Behrens <behrens@dkrz.de>
* Moritz Hanke <hanke@dkrz.de>
* Thomas Jahns <jahns@dkrz.de>
*/
/*
* Keywords:
* Maintainer: Jörg Behrens <behrens@dkrz.de>
......@@ -57,6 +54,14 @@
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <stdlib.h>
#include "xt/quicksort.h"
void xt_quicksort_idxpos(idxpos_type *v, int n) {
......
#ifndef MERGESORT_H
#define MERGESORT_H
#ifndef XT_MERGESORT_H
#define XT_MERGESORT_H
/**
* @file mergesort.h
......@@ -41,6 +41,9 @@
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "sort_common.h"
......@@ -60,4 +63,4 @@ void xt_mergesort_idxpos(idxpos_type *v, int n);
*/
void xt_mergesort_index (Xt_int * a, int n, int * idx, int reset_index);
#endif
#endif /* XT_MERGESORT_H */
#ifndef QUICKSORT_H
#define QUICKSORT_H
#ifndef XT_QUICKSORT_H
#define XT_QUICKSORT_H
/**
* @file quicksort.h
......@@ -47,6 +47,9 @@
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "xt/sort_common.h"
......@@ -66,4 +69,4 @@ void xt_quicksort_idxpos(idxpos_type *v, int n);
*/
void xt_quicksort_index (Xt_int * a, int n, int * idx, int reset_index);
#endif
#endif /* XT_QUICKSORT_H */
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment