Skip to content

Commit

Permalink
Adds with-spaces options to generate_makefile.bash
Browse files Browse the repository at this point in the history
Addresses issue #89
  • Loading branch information
crtrott authored and kyungjoo-kim committed Dec 11, 2017
1 parent 025d71d commit 856fe8b
Show file tree
Hide file tree
Showing 172 changed files with 10,253 additions and 647 deletions.
18 changes: 12 additions & 6 deletions scripts/generate_makefile.bash
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ do
HWLOC_PATH="${key#*=}"
;;
--with-memkind*)
KOKKOS_DEVICES="${KOKKOS_DEVICES},HBWSpace"
KOKKOSKERNELS_SPACES="HBWSpace,${KOKKOSKERNELS_SPACES}"
MEMKIND_PATH="${key#*=}"
;;
--arch*)
Expand Down Expand Up @@ -120,6 +120,9 @@ do
--with-tpls*)
KOKKOSKERNELS_ENABLE_TPLS="${key#*=}"
;;
--with-spaces*)
KOKKOSKERNELS_SPACES="${key#*=}"
;;
--with-kokkos-options*)
KOKKOS_OPT="${key#*=}"
;;
Expand Down Expand Up @@ -279,7 +282,6 @@ if [ ${#HWLOC_PATH} -gt 0 ]; then
KOKKOS_USE_TPLS="${KOKKOS_USE_TPLS},hwloc"
fi

echo "MEMKIND_PATH=${MEMKIND_PATH}"
if [ ${#MEMKIND_PATH} -gt 0 ]; then
KOKKOS_SETTINGS="${KOKKOS_SETTINGS} MEMKIND_PATH=${MEMKIND_PATH}"
KOKKOS_USE_TPLS="${KOKKOS_USE_TPLS},experimental_memkind"
Expand All @@ -299,6 +301,14 @@ fi

if [ ${#KOKKOS_CUDA_OPT} -gt 0 ]; then
KOKKOS_SETTINGS="${KOKKOS_SETTINGS} KOKKOS_CUDA_OPTIONS=${KOKKOS_CUDA_OPT}"
if [[ "${KOKKOS_CUDA_OPT}" =~ "force_uvm" ]]; then
KOKKOSKERNELS_SPACES="CudaUVMSpace,${KOKKOSKERNELS_SPACES}"
fi
fi

if [ ${#KOKKOSKERNELS_SPACES} -gt 0 ]; then
KOKKOSKERNELS_SPACES="${KOKKOSKERNELS_SPACES},${KOKKOS_DEVICES}"
KOKKOS_SETTINGS="${KOKKOS_SETTINGS} KOKKOSKERNELS_SPACES=${KOKKOSKERNELS_SPACES}"
fi

if [ ${#KOKKOSKERNELS_SCALARS} -gt 0 ]; then
Expand All @@ -313,10 +323,6 @@ if [ ${#KOKKOSKERNELS_OFFSETS} -gt 0 ]; then
KOKKOS_SETTINGS="${KOKKOS_SETTINGS} KOKKOSKERNELS_OFFSETS=${KOKKOSKERNELS_OFFSETS}"
fi

if [ ${#KOKKOSKERNELS_SPACES} -gt 0 ]; then
KOKKOS_SETTINGS="${KOKKOS_SETTINGS} KOKKOSKERNELS_SPACES=${KOKKOSKERNELS_SPACES}"
fi

if [ ${#KOKKOSKERNELS_LAYOUTS} -gt 0 ]; then
KOKKOS_SETTINGS="${KOKKOS_SETTINGS} KOKKOSKERNELS_LAYOUTS=${KOKKOSKERNELS_LAYOUTS}"
fi
Expand Down
2 changes: 1 addition & 1 deletion scripts/generate_specialization_function_sparse_ml.bash
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ OrdinalList="int int64_t"
OffsetList="int size_t"
ScalarList="double float Kokkos::complex<double> Kokkos::complex<float>"
LayoutList="LayoutLeft LayoutRight"
ExecMemSpaceList="Cuda,CudaSpace,CudaSpace Cuda,CudaUVMSpace,CudaUVMSpace OpenMP,HostSpace,HostSpace Threads,HostSpace,HostSpace Serial,HostSpace,HostSpace OpenMP,Experimental::HBWSpace,Experimental::HBWSpace Threads,Experimental::HBWSpace,Experimental::HBWSpace Serial,Experimental::HBWSpace,Experimental::HBWSpace Cuda,CudaSpace,CudaHostPinnedSpace Cuda,CudaHostPinnedSpace,CudaHostPinnedSpace Cuda,CudaUVMSpace,CudaUVMSpace OpenMP,Experimental::HBWSpace,HostSpace Threads,Experimental::HBWSpace,HostSpace Serial,Experimental::HBWSpace,HostSpace"
ExecMemSpaceList="Cuda,CudaSpace,CudaSpace Cuda,CudaUVMSpace,CudaUVMSpace OpenMP,HostSpace,HostSpace Threads,HostSpace,HostSpace Serial,HostSpace,HostSpace OpenMP,Experimental::HBWSpace,Experimental::HBWSpace Threads,Experimental::HBWSpace,Experimental::HBWSpace Serial,Experimental::HBWSpace,Experimental::HBWSpace Cuda,CudaSpace,CudaHostPinnedSpace Cuda,CudaHostPinnedSpace,CudaHostPinnedSpace Cuda,CudaUVMSpace,CudaHostPinnedSpace OpenMP,Experimental::HBWSpace,HostSpace Threads,Experimental::HBWSpace,HostSpace Serial,Experimental::HBWSpace,HostSpace"

mkdir generated_specializations_hpp
mkdir generated_specializations_cpp/${Function}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
/*
//@HEADER
// ************************************************************************
//
// KokkosKernels 0.9: Linear Algebra and Graph Kernels
// Copyright 2017 Sandia Corporation
//
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
// the U.S. Government retains certain rights in this software.
//
// 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 Corporation nor the names of the
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "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 SANDIA CORPORATION OR THE
// 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.
//
// Questions? Contact Siva Rajamanickam ([email protected])
//
// ************************************************************************
//@HEADER
*/


#define KOKKOSKERNELS_IMPL_COMPILE_LIBRARY true
#include "KokkosSparse_gauss_seidel_spec.hpp"

namespace KokkosSparse {
namespace Impl {
#if defined (KOKKOSKERNELS_INST_KOKKOS_COMPLEX_DOUBLE_) \
&& defined (KOKKOSKERNELS_INST_LAYOUTLEFT) \
&& defined (KOKKOSKERNELS_INST_EXECSPACE_CUDA) \
&& defined (KOKKOSKERNELS_INST_MEMSPACE_CUDAUVMSPACE) \
&& defined (KOKKOSKERNELS_INST_MEMSPACE_CUDAHOSTPINNEDSPACE) \
&& defined (KOKKOSKERNELS_INST_ORDINAL_INT64_T) \
&& defined (KOKKOSKERNELS_INST_OFFSET_INT)
KOKKOSSPARSE_GAUSS_SEIDEL_APPLY_ETI_SPEC_INST(Kokkos::complex<double>, int64_t, int, Kokkos::LayoutLeft, Kokkos::Cuda, Kokkos::CudaUVMSpace, Kokkos::CudaHostPinnedSpace)
#endif
} // Impl
} // KokkosSparse
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
/*
//@HEADER
// ************************************************************************
//
// KokkosKernels 0.9: Linear Algebra and Graph Kernels
// Copyright 2017 Sandia Corporation
//
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
// the U.S. Government retains certain rights in this software.
//
// 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 Corporation nor the names of the
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "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 SANDIA CORPORATION OR THE
// 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.
//
// Questions? Contact Siva Rajamanickam ([email protected])
//
// ************************************************************************
//@HEADER
*/


#define KOKKOSKERNELS_IMPL_COMPILE_LIBRARY true
#include "KokkosSparse_gauss_seidel_spec.hpp"

namespace KokkosSparse {
namespace Impl {
#if defined (KOKKOSKERNELS_INST_KOKKOS_COMPLEX_DOUBLE_) \
&& defined (KOKKOSKERNELS_INST_LAYOUTRIGHT) \
&& defined (KOKKOSKERNELS_INST_EXECSPACE_CUDA) \
&& defined (KOKKOSKERNELS_INST_MEMSPACE_CUDAUVMSPACE) \
&& defined (KOKKOSKERNELS_INST_MEMSPACE_CUDAHOSTPINNEDSPACE) \
&& defined (KOKKOSKERNELS_INST_ORDINAL_INT64_T) \
&& defined (KOKKOSKERNELS_INST_OFFSET_INT)
KOKKOSSPARSE_GAUSS_SEIDEL_APPLY_ETI_SPEC_INST(Kokkos::complex<double>, int64_t, int, Kokkos::LayoutRight, Kokkos::Cuda, Kokkos::CudaUVMSpace, Kokkos::CudaHostPinnedSpace)
#endif
} // Impl
} // KokkosSparse
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
/*
//@HEADER
// ************************************************************************
//
// KokkosKernels 0.9: Linear Algebra and Graph Kernels
// Copyright 2017 Sandia Corporation
//
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
// the U.S. Government retains certain rights in this software.
//
// 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 Corporation nor the names of the
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "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 SANDIA CORPORATION OR THE
// 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.
//
// Questions? Contact Siva Rajamanickam ([email protected])
//
// ************************************************************************
//@HEADER
*/


#define KOKKOSKERNELS_IMPL_COMPILE_LIBRARY true
#include "KokkosSparse_gauss_seidel_spec.hpp"

namespace KokkosSparse {
namespace Impl {
#if defined (KOKKOSKERNELS_INST_KOKKOS_COMPLEX_DOUBLE_) \
&& defined (KOKKOSKERNELS_INST_LAYOUTLEFT) \
&& defined (KOKKOSKERNELS_INST_EXECSPACE_CUDA) \
&& defined (KOKKOSKERNELS_INST_MEMSPACE_CUDAUVMSPACE) \
&& defined (KOKKOSKERNELS_INST_MEMSPACE_CUDAHOSTPINNEDSPACE) \
&& defined (KOKKOSKERNELS_INST_ORDINAL_INT) \
&& defined (KOKKOSKERNELS_INST_OFFSET_INT)
KOKKOSSPARSE_GAUSS_SEIDEL_APPLY_ETI_SPEC_INST(Kokkos::complex<double>, int, int, Kokkos::LayoutLeft, Kokkos::Cuda, Kokkos::CudaUVMSpace, Kokkos::CudaHostPinnedSpace)
#endif
} // Impl
} // KokkosSparse
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
/*
//@HEADER
// ************************************************************************
//
// KokkosKernels 0.9: Linear Algebra and Graph Kernels
// Copyright 2017 Sandia Corporation
//
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
// the U.S. Government retains certain rights in this software.
//
// 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 Corporation nor the names of the
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "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 SANDIA CORPORATION OR THE
// 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.
//
// Questions? Contact Siva Rajamanickam ([email protected])
//
// ************************************************************************
//@HEADER
*/


#define KOKKOSKERNELS_IMPL_COMPILE_LIBRARY true
#include "KokkosSparse_gauss_seidel_spec.hpp"

namespace KokkosSparse {
namespace Impl {
#if defined (KOKKOSKERNELS_INST_KOKKOS_COMPLEX_DOUBLE_) \
&& defined (KOKKOSKERNELS_INST_LAYOUTRIGHT) \
&& defined (KOKKOSKERNELS_INST_EXECSPACE_CUDA) \
&& defined (KOKKOSKERNELS_INST_MEMSPACE_CUDAUVMSPACE) \
&& defined (KOKKOSKERNELS_INST_MEMSPACE_CUDAHOSTPINNEDSPACE) \
&& defined (KOKKOSKERNELS_INST_ORDINAL_INT) \
&& defined (KOKKOSKERNELS_INST_OFFSET_INT)
KOKKOSSPARSE_GAUSS_SEIDEL_APPLY_ETI_SPEC_INST(Kokkos::complex<double>, int, int, Kokkos::LayoutRight, Kokkos::Cuda, Kokkos::CudaUVMSpace, Kokkos::CudaHostPinnedSpace)
#endif
} // Impl
} // KokkosSparse
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
/*
//@HEADER
// ************************************************************************
//
// KokkosKernels 0.9: Linear Algebra and Graph Kernels
// Copyright 2017 Sandia Corporation
//
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
// the U.S. Government retains certain rights in this software.
//
// 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 Corporation nor the names of the
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "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 SANDIA CORPORATION OR THE
// 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.
//
// Questions? Contact Siva Rajamanickam ([email protected])
//
// ************************************************************************
//@HEADER
*/


#define KOKKOSKERNELS_IMPL_COMPILE_LIBRARY true
#include "KokkosSparse_gauss_seidel_spec.hpp"

namespace KokkosSparse {
namespace Impl {
#if defined (KOKKOSKERNELS_INST_KOKKOS_COMPLEX_DOUBLE_) \
&& defined (KOKKOSKERNELS_INST_LAYOUTLEFT) \
&& defined (KOKKOSKERNELS_INST_EXECSPACE_CUDA) \
&& defined (KOKKOSKERNELS_INST_MEMSPACE_CUDAUVMSPACE) \
&& defined (KOKKOSKERNELS_INST_MEMSPACE_CUDAHOSTPINNEDSPACE) \
&& defined (KOKKOSKERNELS_INST_ORDINAL_INT64_T) \
&& defined (KOKKOSKERNELS_INST_OFFSET_SIZE_T)
KOKKOSSPARSE_GAUSS_SEIDEL_APPLY_ETI_SPEC_INST(Kokkos::complex<double>, int64_t, size_t, Kokkos::LayoutLeft, Kokkos::Cuda, Kokkos::CudaUVMSpace, Kokkos::CudaHostPinnedSpace)
#endif
} // Impl
} // KokkosSparse
Loading

0 comments on commit 856fe8b

Please sign in to comment.