Skip to content

Commit

Permalink
Merge branch 'dma' into dma-merge
Browse files Browse the repository at this point in the history
Conflicts:
	runtime/lowlevel_disk.cc
  • Loading branch information
gshipman committed Aug 6, 2015
2 parents 4c5aff1 + 48dbd05 commit 40cefc4
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 24 deletions.
17 changes: 4 additions & 13 deletions runtime/channel.h
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,6 @@ namespace LegionRuntime{
delete pir;
delete lsi;
// trigger complete event
printf("XD: trigger complete event\n");
get_runtime()->get_genevent_impl(complete_event)->trigger(complete_event.gen, gasnet_mynode());
}

Expand Down Expand Up @@ -931,7 +930,7 @@ namespace LegionRuntime{
}
};
//typedef std::priority_queue<XferDes*, std::vector<XferDes*>, CompareXferDes> PriorityXferDesQueue;
typedef std::set<XferDes*, CompareXferDes> PriorityXferDesQueue;
typedef std::multiset<XferDes*, CompareXferDes> PriorityXferDesQueue;

class XferDesQueue;
class DMAThread {
Expand Down Expand Up @@ -1032,16 +1031,9 @@ namespace LegionRuntime{
pthread_mutex_lock(&queues_lock);
std::map<Channel*, PriorityXferDesQueue*>::iterator it2;
it2 = queues.find(xd->channel);
if (it2 == queues.end()) {
// nothing with this channel, create a new one
PriorityXferDesQueue* pq = new PriorityXferDesQueue;
pq->insert(xd);
queues[xd->channel] = pq;
}
else {
// push ourself into the priority queue
it2->second->insert(xd);
}
assert(it2 != queues.end());
// push ourself into the priority queue
it2->second->insert(xd);
pthread_mutex_unlock(&queues_lock);
if (dma_thread->sleep) {
dma_thread->sleep = false;
Expand All @@ -1066,7 +1058,6 @@ namespace LegionRuntime{
}
}

// Note that getting the XferDes doesn't remove it from priority queue
bool dequeue_xferDes(DMAThread* dma_thread, bool wait_on_empty) {
pthread_mutex_lock(&dma_thread->enqueue_lock);
std::map<Channel*, PriorityXferDesQueue*>::iterator it;
Expand Down
1 change: 0 additions & 1 deletion runtime/lowlevel.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
#include "arrays.h"
#include "layouts.h"
#include "lowlevel_config.h"

#ifdef USE_HDF
#include <hdf5.h>
#endif
Expand Down
12 changes: 4 additions & 8 deletions runtime/lowlevel_disk.cc
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ namespace LegionRuntime {
bool read_only)

{
RegionInstance inst = create_instance_local(is,
RegionInstance i = create_instance_local(is,
linearization_bits, bytes_needed,
block_size, element_size, field_sizes, redopid,
list_size, reqs, parent_inst);
Expand All @@ -206,16 +206,12 @@ namespace LegionRuntime {
int rc = pthread_rwlock_init(&new_hdf->dataset_rwlocks[idx], NULL);
assert(rc==0);
}
std::cout << "in HDFMemory::create_instance(..) inst.id: " <<
inst.id << " hdf_metadata.size(): " << hdf_metadata_vec.size() <<
std::endl;

if (inst.id < hdf_metadata_vec.size())
hdf_metadata_vec[inst.id] = new_hdf;
if (ID(i).index_l() < hdf_metadata_vec.size())
hdf_metadata_vec[ID(i).index_l()] = new_hdf;
else
hdf_metadata_vec.push_back(new_hdf);
pthread_rwlock_unlock(&this->rwlock);
return inst;
return i;
}

void HDFMemory::destroy_instance(RegionInstance i,
Expand Down
2 changes: 1 addition & 1 deletion test/hdf_attach_subregion_parallel/runme.sh
Original file line number Diff line number Diff line change
@@ -1 +1 @@
GASNET_BACKTRACE=1 GASNET_MASTERIP='127.0.0.1' GASNET_SPAWN=-L SSH_SERVERS=localhost amudprun -np 1 $@
GASNET_BACKTRACE=1 GASNET_MASTERIP='127.0.0.1' GASNET_SPAWN=-L SSH_SERVERS="localhost localhost" amudprun -np 2 $@
2 changes: 1 addition & 1 deletion test/hdf_attach_subregion_parallel/tester_io.cc
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ void check_task(const Task *task,
task->regions[0].region.get_index_space());
Rect<2> rect = dom.get_rect<2>();

for(unsigned i = 0; i < task->regions[0].instance_fields.size(); i++) {
for(int i = 0; i < task->regions[0].instance_fields.size(); i++) {
RegionAccessor<AccessorType::Generic, double> acc_src =
regions[0].get_field_accessor(i).typeify<double>();
RegionAccessor<AccessorType::Generic, double> acc_dst =
Expand Down

0 comments on commit 40cefc4

Please sign in to comment.