Skip to content

Commit

Permalink
Merge branch 'master' into add_checkpoint
Browse files Browse the repository at this point in the history
Updating add_checkpoint branch
  • Loading branch information
aserio committed Sep 28, 2017
2 parents d8c3f69 + f032046 commit 7acb184
Show file tree
Hide file tree
Showing 240 changed files with 7,773 additions and 4,999 deletions.
2 changes: 1 addition & 1 deletion docs/authors.txt
Expand Up @@ -7,7 +7,7 @@ akemp = Andrew Kemp <akemp@cct.lsu.edu>
aserio = Adrian Serio <aserio@cct.lsu.edu>
atabbal = Alex Tabbal <atabbal@cct.lsu.edu>
atandon = Anshul Tandon <atandon@cct.lsu.edu>
blelbach = Bryce Adelstein-Lelbach <blelbach@cct.lsu.edu>
blelbach = Bryce Adelstein Lelbach <brycelelbach@gmail.com>
cdekate = Chirag Dekate <cdekate@cct.lsu.edu>
dkogler = Daniel Kogler <dkogler@cct.lsu.edu>
dstark = Dylan Stark <dstark@cct.lsu.edu>
Expand Down
4 changes: 4 additions & 0 deletions docs/hpx.idx
Expand Up @@ -343,6 +343,10 @@ parallel::uninitialized_move_n "uninitialized_move_n" "hpx\.parallel\.v1\
parallel::uninitialized_value_construct "uninitialized_value_construct" "hpx\.parallel\.v1\.uninitialized_val_id.*"
parallel::uninitialized_value_construct_n "uninitialized_value_construct_n" "hpx\.parallel\.v1\.uninitialized_val_id.*"

# hpx/parallel/algorithms/uninitialized_value_construct.hpp
parallel::unique "unique" "hpx\.parallel\.v1\.unique_id.*"
parallel::unique_copy "unique_copy" "hpx\.parallel\.v1\.unique_copy_id.*"

# hpx/runtime/components/colocating_distribution_policy.hpp
colocating_distribution_policy "" "hpx\.components\.colocating_distri_id.*"
colocated "" "hpx\.components\.colocated.*"
Expand Down
3 changes: 2 additions & 1 deletion docs/hpx.qbk
Expand Up @@ -70,7 +70,8 @@
[def __unlv__ [@http://www.unlv.edu University of Nevada, Las Vegas]]
[def __cscs__ [@http://www.cscs.ch Swiss National Supercomputing Centre]]
[def __ou__ [@http://uoregon.edu/ University of Oregon]]
[def __lbnl__ [@http://www.lbl.gov/ Lawrence Berkley National Laboratory (LBNL)]]
[def __lbnl__ [@http://www.lbl.gov/ Lawrence Berkeley National Laboratory (LBNL)]]
[def __nvidia__ [@http://nvidia.com/ NVIDIA]]

[def __gsoc__ [@https://developers.google.com/open-source/soc/ Google Summer of Code]]

Expand Down
Binary file added docs/html/images/emails/atrantan.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/html/images/emails/balelbach.png
Binary file not shown.
Binary file added docs/html/images/emails/blelbach.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 9 additions & 2 deletions docs/manual/parallel_algorithms.qbk
Expand Up @@ -330,8 +330,15 @@ __hpx__ provides implementations of the following parallel algorithms:
[`<hpx/include/parallel_transform.hpp>`]
[[cpprefalgodocs transform]]
]
[[ [algoref unique_copy] ]
[Applies a function to a range of elements.]
[[ [algoref unique_copy] ]
[Eliminates all but the first element from every consecutive group of
equivalent elements from a range.]
[`<hpx/include/parallel_unique.hpp>`]
[[cpprefalgodocs unique]]
]
[[ [algoref unique_copy] ]
[Eliminates all but the first element from every consecutive group of
equivalent elements from a range.]
[`<hpx/include/parallel_unique.hpp>`]
[[cpprefalgodocs unique_copy]]
]
Expand Down
31 changes: 24 additions & 7 deletions docs/manual/vector.qbk
Expand Up @@ -252,7 +252,9 @@ variable as a first parameter.
}
HPX_PLAIN_ACTION(bulk_function, bulk_action);

[note In the following paragraphs, we will use the term "image" several times. An image is defined as a lightweight process whose the entry point is a function provided by the user. It's an "image of the function".]
[note In the following paragraphs, we will use the term "image" several times.
An image is defined as a lightweight process whose the entry point is a
function provided by the user. It's an "image of the function".]

The `spmd_block` class contains the following methods:

Expand Down Expand Up @@ -336,8 +338,11 @@ indicating the number of images per locality to create.

return 0;
}
[note In principle, the user should never call the `spmd_block` constructor. The `define_spmd_block` function is responsible of instantiating `spmd_block` objects and broadcasting them to each created image.
]

[note In principle, the user should never call the `spmd_block` constructor.
The `define_spmd_block` function is responsible of instantiating
`spmd_block` objects and broadcasting them to each created image.]

[endsect]

[section:spmd_views SPMD Multidimensionnal Views]
Expand Down Expand Up @@ -377,7 +382,10 @@ because without convention, each of the images invoked will race to execute
the statement. For this reason, our views are not only multi-dimensional
but also "spmd-aware".

[note Spmd-awareness: The convention is simple. If an assignment statement contains a view subscript as an l-value, it is only and only the image holding the r-value who is evaluating the statement. (In MPI sense, it is called a Put operation)]
[note SPMD-awareness: The convention is simple. If an assignment statement
contains a view subscript as an l-value, it is only and only the image
holding the r-value who is evaluating the statement. (In MPI sense, it is
called a Put operation)]

[section:Subscripts Subscript-based operations]
Here are some examples of using subscripts in the 2-D view case:
Expand Down Expand Up @@ -413,6 +421,7 @@ Here are some examples of using subscripts in the 2-D view case:
// assignment : oops! race between all participating images.
vv(2,3) = std::vector<double>(4,1.0);
}

[endsect]

[section:ViewIterators Iterator-based operations]
Expand Down Expand Up @@ -506,6 +515,7 @@ owned by the current image :
}

}

[endsect]

[section:SubViews Instanciating Sub-views]
Expand Down Expand Up @@ -551,16 +561,21 @@ sub-view.
}

}
[note The last parameter of the subview constructor is the size of the original view. If one would like to create a subview of the subview and so on, this parameter should stay unchanged. (`{N,N}` for the above example)]

[note The last parameter of the subview constructor is the size of the original
view. If one would like to create a subview of the subview and so on, this
parameter should stay unchanged. (`{N,N}` for the above example)]

[endsect]
[endsect]
[endsect]

[section C++ Co-Arrays]
Fortran has extended its scalar element indexing approach to reference each
segment of a distributed array. In this extension, a segment is attributed a
co-index and lives in a specific locality. A co-index provides the application
?co-index? and lives in a specific locality. A co-index provides the application
with enough information to retrieve the corresponding data reference. In C++,
containers present themselves as a smarter alternative of Fortran arrays but
containers present themselves as a ?smarter? alternative of Fortran arrays but
there are still no corresponding standardized features similar to the Fortran
co-indexing approach. We present here an implementation of such features in __hpx__.

Expand Down Expand Up @@ -661,5 +676,7 @@ Here is an example of using local subscripts :
`hpx::container::placeholders::_`, local subscript (and not global subscript)
is used. It is equivalent to a global subscript used with a
"last dimension index" equal to the value returned by `block.this_image()`.]

[endsect]
[endsect]
[endsect]
14 changes: 6 additions & 8 deletions docs/people.qbk
Expand Up @@ -70,15 +70,13 @@ our tables below.
[[John Biddiscombe] [__cscs__] [[$./images/emails/biddisco.png]]]
[[Anton Bikineev] [__cct__, __lsu__] [[$./images/emails/antbikineev.png]]]
[[Martin Stumpf] [__inf3__, __fau__] [[$./images/emails/martinhstumpf.png]]]
[[Bryce Adelstein-Lelbach] [__lbnl__] [[$./images/emails/balelbach.png]]]
[[Bryce Adelstein Lelbach] [__nvidia__] [[$./images/emails/blelbach.png]]]
[[Shuangyang Yang] [__cct__, __lsu__] [[$./images/emails/syang16.png]]]
[[Jeroen Habraken] [__tue__] [[$./images/emails/vexocide.png]]]
[[Steven Brandt] [__cct__, __lsu__] [[$./images/emails/sbrandt.png]]]
[[Andrew Kemp] [__cct__, __lsu__] [[$./images/emails/akemp.png]]]
[[Antoine Tran Tan] [__cct__, __lsu__] [[$./images/emails/atrantan.png]]]
[[Adrian Serio] [__cct__, __lsu__] [[$./images/emails/aserio.png]]]
[[Maciej Brodowicz] [__crest__, __iu__] [[$./images/emails/mbrodowicz.png]]]
[[Matthew Anderson] [__crest__, __iu__] [[$./images/emails/manderson.png]]]
[[Dylan Stark] [__sandia__] [[$./images/emails/dstark.png]]]
]

[heading Contributors to this Document]
Expand All @@ -87,7 +85,7 @@ our tables below.
[[Name] [Institution] [email]]
[[Hartmut Kaiser] [__cct__, __lsu__] [[$./images/emails/hkaiser.png]]]
[[Thomas Heller] [__inf3__, __fau__] [[$./images/emails/theller.png]]]
[[Bryce Adelstein-Lelbach] [__lbnl__] [[$./images/emails/balelbach.png]]]
[[Bryce Adelstein Lelbach] [__nvidia__] [[$./images/emails/blelbach.png]]]
[[Vinay C Amatya] [__cct__, __lsu__] [[$./images/emails/vamatya.png]]]
[[Steven Brandt] [__cct__, __lsu__] [[$./images/emails/sbrandt.png]]]
[[Maciej Brodowicz] [__crest__, __iu__] [[$./images/emails/mbrodowicz.png]]]
Expand Down Expand Up @@ -208,9 +206,9 @@ the project through discussions, pull requests, documentation patches, etc.
* Praveen Velliengiri, Element-126, ShmuelLevine, Aalekh Nigam,
HadrienG2, Prayag Verma, and
Avyav Kumar who improved the documentation.
* J. F. Bastien, Christopher Hinz, Brandon Kohn, hendrx, Dekken, and
woodmeister123 who contributed to the
general improvement of __hpx__
* J. F. Bastien, Christopher Hinz, Brandon Kohn, hendrx, Dekken,
woodmeister123, Andrew Kemp, Dylan Stark, and Matthew Anderson who
contributed to the general improvement of __hpx__

In addition to the people who worked directly with __hpx__ development we would
like to acknowledge the NSF, DoE, DARPA, __cct__, and __inf3__ who fund and
Expand Down
1 change: 0 additions & 1 deletion examples/1d_stencil/1d_stencil_4_repart.cpp
Expand Up @@ -22,7 +22,6 @@
#include <hpx/include/performance_counters.hpp>

#include <boost/range/irange.hpp>
#include <boost/format.hpp>

#include <algorithm>
#include <cstddef>
Expand Down
6 changes: 2 additions & 4 deletions examples/1d_stencil/1d_stencil_4_throttle.cpp
Expand Up @@ -16,6 +16,7 @@

#include <hpx/hpx_init.hpp>
#include <hpx/hpx.hpp>
#include <hpx/util/format.hpp>

#include <hpx/include/parallel_algorithm.hpp>
#include <boost/range/irange.hpp>
Expand All @@ -25,8 +26,6 @@
#include <hpx/include/actions.hpp>
#include <hpx/include/util.hpp>

#include <boost/format.hpp>

#include <cstddef>
#include <cstdint>
#include <iostream>
Expand All @@ -49,8 +48,7 @@ hpx::naming::id_type counter_id;
id_type get_counter_id() {
// Resolve the GID of the performances counter using it's symbolic name.
std::uint32_t const prefix = hpx::get_locality_id();
boost::format active_threads(counter_name);
id_type id = get_counter(boost::str(active_threads % prefix));
id_type id = get_counter(hpx::util::format(counter_name, prefix));
return id;
}

Expand Down
42 changes: 21 additions & 21 deletions examples/1d_stencil/print_time_results.hpp
Expand Up @@ -7,7 +7,7 @@
#ifndef HPX_STENCIL_PRINT_TIME_HPP
#define HPX_STENCIL_PRINT_TIME_HPP

#include <boost/format.hpp>
#include <hpx/util/format.hpp>

#include <cstdint>
#include <iostream>
Expand All @@ -30,15 +30,15 @@ void print_time_results(
"Points_per_Partition,Partitions,Time_Steps\n"
<< std::flush;

std::string const locs_str = boost::str(boost::format("%u,") % num_localities);
std::string const threads_str = boost::str(boost::format("%lu,") % num_os_threads);
std::string const nx_str = boost::str(boost::format("%lu,") % nx);
std::string const np_str = boost::str(boost::format("%lu,") % np);
std::string const nt_str = boost::str(boost::format("%lu ") % nt);
std::string const locs_str = hpx::util::format("%u,", num_localities);
std::string const threads_str = hpx::util::format("%lu,", num_os_threads);
std::string const nx_str = hpx::util::format("%lu,", nx);
std::string const np_str = hpx::util::format("%lu,", np);
std::string const nt_str = hpx::util::format("%lu ", nt);

std::cout << ( boost::format("%-6s %-6s %.14g, %-21s %-21s %-21s\n")
% locs_str % threads_str % (elapsed / 1e9) %nx_str % np_str
% nt_str) << std::flush;
hpx::util::format_to(std::cout, "%-6s %-6s %.14g, %-21s %-21s %-21s\n",
locs_str, threads_str, elapsed / 1e9, nx_str, np_str,
nt_str) << std::flush;
}

///////////////////////////////////////////////////////////////////////////////
Expand All @@ -56,14 +56,14 @@ void print_time_results(
"Points_per_Partition,Partitions,Time_Steps\n"
<< std::flush;

std::string const threads_str = boost::str(boost::format("%lu,") % num_os_threads);
std::string const nx_str = boost::str(boost::format("%lu,") % nx);
std::string const np_str = boost::str(boost::format("%lu,") % np);
std::string const nt_str = boost::str(boost::format("%lu ") % nt);
std::string const threads_str = hpx::util::format("%lu,", num_os_threads);
std::string const nx_str = hpx::util::format("%lu,", nx);
std::string const np_str = hpx::util::format("%lu,", np);
std::string const nt_str = hpx::util::format("%lu ", nt);

std::cout << ( boost::format("%-21s %.14g, %-21s %-21s %-21s\n")
% threads_str % (elapsed / 1e9) %nx_str % np_str
% nt_str) << std::flush;
hpx::util::format_to(std::cout, "%-21s %.14g, %-21s %-21s %-21s\n",
threads_str, elapsed / 1e9, nx_str, np_str,
nt_str) << std::flush;
}

void print_time_results(
Expand All @@ -79,12 +79,12 @@ void print_time_results(
"Grid_Points,Time_Steps\n"
<< std::flush;

std::string const threads_str = boost::str(boost::format("%lu,") % num_os_threads);
std::string const nx_str = boost::str(boost::format("%lu,") % nx);
std::string const nt_str = boost::str(boost::format("%lu ") % nt);
std::string const threads_str = hpx::util::format("%lu,", num_os_threads);
std::string const nx_str = hpx::util::format("%lu,", nx);
std::string const nt_str = hpx::util::format("%lu ", nt);

std::cout << ( boost::format("%-21s %10.12s, %-21s %-21s\n")
% threads_str % (elapsed / 1e9) %nx_str % nt_str) << std::flush;
hpx::util::format_to(std::cout, "%-21s %10.12s, %-21s %-21s\n",
threads_str, elapsed / 1e9, nx_str, nt_str) << std::flush;
}

#endif
2 changes: 0 additions & 2 deletions examples/allgather/ag/server/allgather.cpp
Expand Up @@ -10,8 +10,6 @@

#include "allgather.hpp"

#include <boost/format.hpp>

#include <cstddef>
#include <fstream>
#include <iostream>
Expand Down
2 changes: 0 additions & 2 deletions examples/allgather/ag/server/allgather_and_gate.cpp
Expand Up @@ -12,8 +12,6 @@

#include "allgather_and_gate.hpp"

#include <boost/format.hpp>

#include <cstddef>
#include <fstream>
#include <iostream>
Expand Down
6 changes: 2 additions & 4 deletions examples/apex/apex_balance.cpp
Expand Up @@ -9,8 +9,8 @@

#include <hpx/hpx_init.hpp>
#include <hpx/include/actions.hpp>
#include <hpx/include/util.hpp>
#include <hpx/include/lcos.hpp>
#include <hpx/include/util.hpp>

#include <apex_api.hpp>

Expand All @@ -21,8 +21,6 @@
#include <random>
#include <vector>

#include <boost/format.hpp>

double do_work(std::uint64_t n);

HPX_PLAIN_ACTION(do_work, do_work_action);
Expand Down Expand Up @@ -87,7 +85,7 @@ int hpx_main(boost::program_options::variables_map& vm)


char const* fmt = "elapsed time: %1% [s]\n";
std::cout << (boost::format(fmt) % t.elapsed());
hpx::util::format_to(std::cout, fmt, t.elapsed());

return hpx::finalize(); // Handles HPX shutdown
}
Expand Down
4 changes: 1 addition & 3 deletions examples/apex/apex_fibonacci.cpp
Expand Up @@ -17,8 +17,6 @@
#include <iostream>
#include <set>

#include <boost/format.hpp>

///////////////////////////////////////////////////////////////////////////////
//[fib_action
// forward declaration of the Fibonacci function
Expand Down Expand Up @@ -69,7 +67,7 @@ int hpx_main(boost::program_options::variables_map& vm)
std::uint64_t r = fib(hpx::find_here(), n);

char const* fmt = "fibonacci(%1%) == %2%\nelapsed time: %3% [s]\n";
std::cout << (boost::format(fmt) % n % r % t.elapsed());
hpx::util::format_to(std::cout, fmt, n, r, t.elapsed());
}

return hpx::finalize(); // Handles HPX shutdown
Expand Down
16 changes: 7 additions & 9 deletions examples/apex/apex_policy_engine_active_thread_count.cpp
Expand Up @@ -8,19 +8,17 @@
// Naive SMP version implemented with futures.

#include <hpx/hpx_init.hpp>
#include <hpx/include/performance_counters.hpp>
#include <hpx/include/actions.hpp>
#include <hpx/include/util.hpp>
#include <hpx/include/async.hpp>
#include <hpx/include/lcos.hpp>
#include <hpx/include/performance_counters.hpp>
#include <hpx/include/util.hpp>

#include <apex_api.hpp>

#include <cstdint>
#include <iostream>

#include <boost/format.hpp>

///////////////////////////////////////////////////////////////////////////////
// forward declaration of the Fibonacci function
std::uint64_t fibonacci(std::uint64_t n);
Expand Down Expand Up @@ -65,11 +63,11 @@ id_type get_counter_id() {
// Resolve the GID of the performances counter using it's symbolic name.
std::uint32_t const prefix = hpx::get_locality_id();
/*
boost::format
active_threads("/threads{locality#%d/total}/count/instantaneous/active");
id_type id = get_counter(hpx::util::format(
"/threads{locality#%d/total}/count/instantaneous/active",
prefix));
*/
boost::format active_threads(counter_name);
id_type id = get_counter(boost::str(active_threads % prefix));
id_type id = get_counter(hpx::util::format(counter_name, prefix));
return id;
}

Expand Down Expand Up @@ -107,7 +105,7 @@ int hpx_main(boost::program_options::variables_map& vm)
std::uint64_t r = fib(hpx::find_here(), n);

char const* fmt = "fibonacci(%1%) == %2%\nelapsed time: %3% [s]\n";
std::cout << (boost::format(fmt) % n % r % t.elapsed());
hpx::util::format_to(std::cout, fmt, n, r, t.elapsed());
}

return hpx::finalize(); // Handles HPX shutdown
Expand Down

0 comments on commit 7acb184

Please sign in to comment.