Skip to content

Commit

Permalink
Merge ed1f88e into 1c6046d
Browse files Browse the repository at this point in the history
  • Loading branch information
David Hollman committed Apr 17, 2018
2 parents 1c6046d + ed1f88e commit 2726f80
Show file tree
Hide file tree
Showing 14 changed files with 454 additions and 448 deletions.
412 changes: 0 additions & 412 deletions src/include/darma/impl/concurrent_region.h

This file was deleted.

19 changes: 10 additions & 9 deletions src/include/darma/impl/mpi/mpi_context.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,19 +52,20 @@
#include <tinympl/is_instantiation_of.hpp>

#include <darma/interface/backend/mpi_interop.h>
#include <darma/interface/app/keyword_arguments/index.h>
#include <darma/interface/app/keyword_arguments/indices.h>
#include <darma/interface/app/keyword_arguments/data.h>
#include <darma/interface/app/keyword_arguments/size.h>
#include <darma/interface/app/keyword_arguments/index_range.h>
#include <darma/interface/app/keyword_arguments/copy_callback.h>
#include <darma/interface/app/keyword_arguments/copy_back_callback.h>

#include <darma/keyword_arguments/parse.h>
#include <darma/keyword_arguments/macros.h>
#include <darma/impl/array/index_range.h>
#include <darma/impl/mpi/piecewise_acquired_collection.h>
#include <darma/impl/mpi/persistent_collection.h>

DeclareDarmaTypeTransparentKeyword(mpi_context, data);
DeclareDarmaTypeTransparentKeyword(mpi_context, size);
DeclareDarmaTypeTransparentKeyword(mpi_context, index);
DeclareDarmaTypeTransparentKeyword(mpi_context, indices);
DeclareDarmaTypeTransparentKeyword(mpi_context, index_range);
DeclareDarmaTypeTransparentKeyword(mpi_context, copy_callback);
DeclareDarmaTypeTransparentKeyword(mpi_context, copy_back_callback);

namespace darma_runtime {

Expand Down Expand Up @@ -579,7 +580,7 @@ class mpi_context {
using darma_runtime::keyword_tags_for_mpi_context::size;
using darma_runtime::keyword_tags_for_mpi_context::index;
using darma_runtime::keyword_tags_for_mpi_context::indices;
using darma_runtime::keyword_tags_for_mpi_context::index_range;
using darma_runtime::keyword_tags_for_create_concurrent_work::index_range;
using darma_runtime::keyword_tags_for_mpi_context::copy_callback;
using darma_runtime::keyword_tags_for_mpi_context::copy_back_callback;

Expand Down Expand Up @@ -647,7 +648,7 @@ class mpi_context {

using namespace darma_runtime::detail;
using darma_runtime::keyword_tags_for_mpi_context::size;
using darma_runtime::keyword_tags_for_mpi_context::index_range;
using darma_runtime::keyword_tags_for_create_concurrent_work::index_range;

using parser = kwarg_parser<
variadic_positional_overload_description<
Expand Down
14 changes: 7 additions & 7 deletions src/include/darma/impl/mpi/piecewise_acquired_collection.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,15 @@

#if _darma_has_feature(mpi_interop)

#include <darma/interface/app/keyword_arguments/index.h>
#include <darma/interface/app/keyword_arguments/copy_callback.h>
#include <darma/interface/app/keyword_arguments/copy_back_callback.h>

#include <darma/keyword_arguments/parse.h>
#include <darma/keyword_arguments/macros.h>
#include <darma/impl/task_collection/access_handle_collection.h>
#include <darma/interface/backend/mpi_interop.h>

DeclareDarmaTypeTransparentKeyword(piecewise_handle, index);
DeclareDarmaTypeTransparentKeyword(piecewise_handle, copy_callback);
DeclareDarmaTypeTransparentKeyword(piecewise_handle, copy_back_callback);

namespace darma_runtime {

namespace detail {
Expand Down Expand Up @@ -191,9 +191,9 @@ class PiecewiseCollectionHandle {
acquire_access(Args&&... args) const {

using namespace darma_runtime::detail;
using darma_runtime::keyword_tags_for_piecewise_handle::index;
using darma_runtime::keyword_tags_for_piecewise_handle::copy_callback;
using darma_runtime::keyword_tags_for_piecewise_handle::copy_back_callback;
using darma_runtime::keyword_tags_for_mpi_context::index;
using darma_runtime::keyword_tags_for_mpi_context::copy_callback;
using darma_runtime::keyword_tags_for_mpi_context::copy_back_callback;

using parser = kwarg_parser<
variadic_positional_overload_description<
Expand Down
11 changes: 8 additions & 3 deletions src/include/darma/interface/app/darma_region.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ _get_default_instance_token_ptr() {
return _rv;
}

auto&
inline auto&
get_default_instance_token() {
return *_get_default_instance_token_ptr<>().get();
}
Expand Down Expand Up @@ -129,9 +129,14 @@ darma_region(Callable&& callable) {
return done_future;
}

auto
inline auto
darma_initialize(int& argc, char**& argv) {
backend::initialize_runtime_arguments(argc, argv);
backend::initialize_with_arguments(argc, argv);
}

inline auto
darma_finalize() {
backend::finalize();
}

} // end namespace experimental
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,11 @@
#include <darma/interface/app/keyword_arguments/name.h>
#include <darma/interface/app/keyword_arguments/index_range.h>
#include <darma/interface/app/keyword_arguments/n_iterations.h>
#include <darma/interface/app/keyword_arguments/copy_back_callback.h>
#include <darma/interface/app/keyword_arguments/copy_callback.h>
#include <darma/interface/app/keyword_arguments/size.h>
#include <darma/interface/app/keyword_arguments/data.h>
#include <darma/interface/app/keyword_arguments/index.h>
#include <darma/interface/app/keyword_arguments/indices.h>

#endif //DARMA_INTERFACE_APP_KEYWORD_ARGUMENTS_ALL_KEYWORD_ARGUMENTS_H
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
/*
//@HEADER
// ************************************************************************
//
// copy_back_callback.h
// DARMA
// Copyright (C) 2017 NTESS, LLC
//
// Under the terms of Contract DE-NA-0003525 with NTESS, LLC,
// 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 darma@sandia.gov
//
// ************************************************************************
//@HEADER
*/

#ifndef DARMA_INTERFACE_APP_KEYWORD_ARGUMENTS_COPY_BACK_CALLBACK_H
#define DARMA_INTERFACE_APP_KEYWORD_ARGUMENTS_COPY_BACK_CALLBACK_H

#include <darma/keyword_arguments/macros.h>

DeclareDarmaTypeTransparentKeyword(mpi_context, copy_back_callback);

namespace darma_runtime {
namespace keyword_arguments_for_acquire_access {
AliasDarmaKeyword(mpi_context, copy_back_callback);
} // end namespace keyword_arguments_for_acquire_access

namespace keyword_arguments_for_piecewise_acquired_collection {
AliasDarmaKeyword(mpi_context, copy_back_callback);
} // end namespace keyword_arguments_for_piecewise_acquired_collection

namespace keyword_arguments_for_piecewise_handle {
AliasDarmaKeyword(mpi_context, copy_back_callback);
} // end namespace keyword_arguments_for_piecewise_handle
} // end namespace darma_runtime

DeclareStandardDarmaKeywordArgumentAliases(mpi_context, copy_back_callback);


#endif //DARMA_INTERFACE_APP_KEYWORD_ARGUMENTS_COPY_CALLBACK_H
69 changes: 69 additions & 0 deletions src/include/darma/interface/app/keyword_arguments/copy_callback.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
/*
//@HEADER
// ************************************************************************
//
// copy_callback.h
// DARMA
// Copyright (C) 2017 NTESS, LLC
//
// Under the terms of Contract DE-NA-0003525 with NTESS, LLC,
// 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 darma@sandia.gov
//
// ************************************************************************
//@HEADER
*/

#ifndef DARMA_INTERFACE_APP_KEYWORD_ARGUMENTS_COPY_CALLBACK_H
#define DARMA_INTERFACE_APP_KEYWORD_ARGUMENTS_COPY_CALLBACK_H

#include <darma/keyword_arguments/macros.h>

DeclareDarmaTypeTransparentKeyword(mpi_context, copy_callback);

namespace darma_runtime {
namespace keyword_arguments_for_acquire_access {
AliasDarmaKeyword(mpi_context, copy_callback);
} // end namespace keyword_arguments_for_acquire_access

namespace keyword_arguments_for_piecewise_acquired_collection {
AliasDarmaKeyword(mpi_context, copy_callback);
} // end namespace keyword_arguments_for_piecewise_acquired_collection

namespace keyword_arguments_for_piecewise_handle {
AliasDarmaKeyword(mpi_context, copy_callback);
} // end namespace keyword_arguments_for_piecewise_handle
} // end namespace darma_runtime

DeclareStandardDarmaKeywordArgumentAliases(mpi_context, copy_callback);


#endif //DARMA_INTERFACE_APP_KEYWORD_ARGUMENTS_COPY_CALLBACK_H
69 changes: 69 additions & 0 deletions src/include/darma/interface/app/keyword_arguments/data.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
/*
//@HEADER
// ************************************************************************
//
// data.h
// DARMA
// Copyright (C) 2017 NTESS, LLC
//
// Under the terms of Contract DE-NA-0003525 with NTESS, LLC,
// 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 darma@sandia.gov
//
// ************************************************************************
//@HEADER
*/

#ifndef DARMA_INTERFACE_APP_KEYWORD_ARGUMENTS_DATA_H
#define DARMA_INTERFACE_APP_KEYWORD_ARGUMENTS_DATA_H

#include <darma/keyword_arguments/macros.h>

DeclareDarmaTypeTransparentKeyword(mpi_context, data);

namespace darma_runtime {
namespace keyword_arguments_for_acquire_access {
AliasDarmaKeyword(mpi_context, data);
} // end namespace keyword_arguments_for_acquire_access

namespace keyword_arguments_for_piecewise_acquired_collection {
AliasDarmaKeyword(mpi_context, data);
} // end namespace keyword_arguments_for_piecewise_acquired_collection

namespace keyword_arguments_for_piecewise_handle {
AliasDarmaKeyword(mpi_context, data);
} // end namespace keyword_arguments_for_piecewise_handle
} // end namespace darma_runtime

DeclareStandardDarmaKeywordArgumentAliases(mpi_context, data);


#endif //DARMA_INTERFACE_APP_KEYWORD_ARGUMENTS_DATA_H
69 changes: 69 additions & 0 deletions src/include/darma/interface/app/keyword_arguments/index.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
/*
//@HEADER
// ************************************************************************
//
// index.h
// DARMA
// Copyright (C) 2017 NTESS, LLC
//
// Under the terms of Contract DE-NA-0003525 with NTESS, LLC,
// 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 darma@sandia.gov
//
// ************************************************************************
//@HEADER
*/

#ifndef DARMA_INTERFACE_APP_KEYWORD_ARGUMENTS_INDEX_H
#define DARMA_INTERFACE_APP_KEYWORD_ARGUMENTS_INDEX_H

#include <darma/keyword_arguments/macros.h>

DeclareDarmaTypeTransparentKeyword(mpi_context, index);

namespace darma_runtime {
namespace keyword_arguments_for_acquire_access {
AliasDarmaKeyword(mpi_context, index);
} // end namespace keyword_arguments_for_acquire_access

namespace keyword_arguments_for_piecewise_acquired_collection {
AliasDarmaKeyword(mpi_context, index);
} // end namespace keyword_arguments_for_piecewise_acquired_collection

namespace keyword_arguments_for_piecewise_handle {
AliasDarmaKeyword(mpi_context, index);
} // end namespace keyword_arguments_for_piecewise_handle
} // end namespace darma_runtime

DeclareStandardDarmaKeywordArgumentAliases(mpi_context, index);


#endif //DARMA_INTERFACE_APP_KEYWORD_ARGUMENTS_INDEX_H

0 comments on commit 2726f80

Please sign in to comment.