Skip to content

Commit

Permalink
these need to go back to original
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolemarsaglia committed Aug 10, 2023
1 parent 53c2208 commit 0581ee7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 59 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1140,8 +1140,6 @@ VTKHGhostStripper::execute()
return;
}
std::shared_ptr<VTKHCollection> collection = data_object->as_vtkh_collection();
set_output<DataObject>(data_object);
return;

// ask what topology this field is associated with and
// get the right data set
Expand Down Expand Up @@ -1170,19 +1168,18 @@ VTKHGhostStripper::execute()
stripper.SetMaxValue(max_val);
stripper.SetMinValue(min_val);

//stripper.Update();
stripper.Update();

vtkh::DataSet *stripper_output = new vtkh::DataSet;// = stripper.GetOutput();
vtkh::DataSet *stripper_output = stripper.GetOutput();

// we need to pass through the rest of the topologies, untouched,
// and add the result of this operation
//VTKHCollection *new_coll = collection->copy_without_topology(topo_name);
//new_coll->add(*stripper_output, topo_name);
//// re wrap in data object
//DataObject *res = new DataObject(new_coll);
VTKHCollection *new_coll = collection->copy_without_topology(topo_name);
new_coll->add(*stripper_output, topo_name);
// re wrap in data object
DataObject *res = new DataObject(new_coll);
delete stripper_output;
set_output<DataObject>(data_object);
//set_output<DataObject>(res);
set_output<DataObject>(res);
}
else
{
Expand Down
50 changes: 1 addition & 49 deletions src/utilities/replay/replay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#include <ascent.hpp>
#include <flow_timer.hpp>
#include <ascent_hola.hpp>
#include <runtimes/expressions/ascent_memory_manager.hpp>

#include <fstream>
#include <vector>
Expand All @@ -22,50 +21,6 @@
#include <mpi.h>
#endif

void copy_imporant_stuff_to_gpu(const conduit::Node &src,
conduit::index_t device_alloc_id,
conduit::Node &dest)
{
bool has_children = src.number_of_children() > 0;

if(has_children)
{
conduit::NodeConstIterator itr = src.children();
while(itr.has_next())
{
const conduit::Node &src_child = itr.next();
std::string src_child_name = itr.name();
if(src.dtype().is_object())
{
// recurse
copy_imporant_stuff_to_gpu(src_child, device_alloc_id,
dest[src_child_name]);
}
else if(src.dtype().is_list()) // nameless children
{
// recurse
copy_imporant_stuff_to_gpu(src_child,device_alloc_id,dest.append());
}
else // should be object or list!
{
// YIKES!
}
}
}
else if(src.dtype().is_number() &&
src.dtype().number_of_elements() >= 42 ) // this is a crazy heuristic for bigger than small
{
dest.set_allocator(device_alloc_id);
dest.set(src);
}
else // general leaf, just copy
{
dest.set(src);
// or
// dest.set_external(src);
}
}

void usage()
{
std::cout<<"replay usage:\n";
Expand Down Expand Up @@ -262,10 +217,7 @@ int main (int argc, char *argv[])
float load_time = load.elapsed();

flow::Timer publish;
conduit::Node gpu_replay_data;
copy_imporant_stuff_to_gpu(replay_data,ascent::AllocationManager::conduit_device_allocator_id(),gpu_replay_data);
// ascent.publish(replay_data);
ascent.publish(gpu_replay_data);
ascent.publish(replay_data);
#ifdef REPLAY_MPI
MPI_Barrier(MPI_COMM_WORLD);
#endif
Expand Down

0 comments on commit 0581ee7

Please sign in to comment.