Skip to content

Commit

Permalink
Removed un-used code
Browse files Browse the repository at this point in the history
  • Loading branch information
dmarce1 committed Jun 14, 2017
1 parent 6aec8ce commit 336e35d
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 63 deletions.
1 change: 1 addition & 0 deletions src/defs.hpp
Expand Up @@ -22,6 +22,7 @@
#endif

#define REGRID_CHECK
#define CHANNEL_CHECK
//#define OCTOTIGER_HAVE_RADIATION

#ifdef OCTOTIGER_HAVE_RADIATION
Expand Down
4 changes: 0 additions & 4 deletions src/node_server.hpp
Expand Up @@ -320,9 +320,6 @@ class node_server: public hpx::components::managed_component_base<node_server> {
void rho_move(real);
HPX_DEFINE_COMPONENT_ACTION(node_server,rho_move, rho_move_action);

void check_channels() const;
HPX_DEFINE_COMPONENT_ACTION(node_server,check_channels, check_channels_action);

void run_scf(std::string const& data_dir);

#ifdef RADIATION
Expand Down Expand Up @@ -421,7 +418,6 @@ HPX_REGISTER_ACTION_DECLARATION(node_server::get_ptr_action);
HPX_REGISTER_ACTION_DECLARATION(node_server::diagnostics_action);
HPX_REGISTER_ACTION_DECLARATION(node_server::timestep_driver_ascend_action);
HPX_REGISTER_ACTION_DECLARATION(node_server::scf_params_action);
HPX_REGISTER_ACTION_DECLARATION(node_server::check_channels_action);

#ifdef RADIATION
HPX_REGISTER_ACTION_DECLARATION(node_server::send_rad_boundary_action);
Expand Down
60 changes: 1 addition & 59 deletions src/node_server_actions_3.cpp
Expand Up @@ -11,59 +11,6 @@

extern options opts;

typedef node_server::check_channels_action check_channels_action_type;
HPX_REGISTER_ACTION(check_channels_action_type);

hpx::future<void> node_client::check_channels() const {
return hpx::async<typename node_server::check_channels_action>(get_unmanaged_gid());
}

void node_server::check_channels() const {
std::vector<hpx::future<void>> futs;
#ifdef CHANNEL_CHECK
if (is_refined) {
for (integer c = 0; c != NCHILD; ++c) {
futs.push_back(children[c].check_channels());
}
}
for (auto& c : sibling_hydro_channels) {
if (c.message_count() > 0) {
printf("SIBLING HYDRO CHANNEL FAILURE\n");
abort();
}
}
for (auto& c : neighbor_gravity_channels) {
if (c.message_count() > 0) {
printf("NEIGHBOR GRAVITY CHANNEL FAILURE\n");
abort();
}
}
for (auto& c : child_hydro_channels) {
if (c.message_count() > 0) {
printf("CHILD_HYDRO CHANNEL FAILURE\n");
abort();
}
}
for (auto& c : child_gravity_channels) {
if (c.message_count() > 0) {
printf("CHILD GRAVITY CHANNEL FAILURE\n");
abort();
}
}
for (auto i = 0; i != NFACE; ++i) {
for (auto& c : niece_hydro_channels[i]) {
if (c.message_count() > 0) {
printf("NIECE HYDRO CHANNEL FAILURE\n");
abort();
}
}
}
for( auto& f : futs ) {
f.get();
}
#endif
}

typedef node_server::send_gravity_boundary_action send_gravity_boundary_action_type;
HPX_REGISTER_ACTION (send_gravity_boundary_action_type);

Expand Down Expand Up @@ -773,12 +720,7 @@ hpx::future<std::pair<real, diagnostics_t> > node_client::step_with_diagnostics(
hpx::future<std::pair<real, diagnostics_t> > node_server::step_with_diagnostics(integer steps,
const std::pair<space_vector, space_vector>& axis, const std::pair<real, real>& l1, real c1, real c2)
{
#ifdef CHANNEL_CHECK
if( my_location.level() == 0 ) {
check_channels();
}
#endif
if (is_refined)
if (is_refined)
{
std::array<hpx::future<std::pair<real, diagnostics_t> >, NCHILD> child_futs;
for (integer ci = 0; ci != NCHILD; ++ci) {
Expand Down

0 comments on commit 336e35d

Please sign in to comment.