Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix dist tests #147

Merged
merged 44 commits into from
May 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
c44e5b0
turning back on dist tests(?)
l-hoang Apr 23, 2020
e517595
made bc tests consistent; made bc_mr test shorter
l-hoang Apr 24, 2020
5ec32f6
removing hybrid cuts from disttests, cutting thread usage by a third
l-hoang Apr 24, 2020
68d7d18
no division for numthreads for dist test; set upper bound
l-hoang Apr 24, 2020
2e53d46
Add BFS and PageRank in cython using Galois libraries
Mar 27, 2020
cf33042
Package cython bindings
ddn0 Apr 14, 2020
c5b3d38
Update BFS and PageRank in Cython
Apr 21, 2020
748a6f6
pangolin: Use standard CMake build
ddn0 Apr 23, 2020
9efc67c
pangolin: Prefix include directories
ddn0 Apr 23, 2020
ca27285
Move SPRoute to lonestar. Allow warnings there for now.
insertinterestingnamehere Apr 24, 2020
2540298
Move First_SepInOut_Graph out of experimental and update its naming.
insertinterestingnamehere Apr 24, 2020
a3abf3b
Move aigRewriting to Lonestar.
insertinterestingnamehere Apr 24, 2020
706aebd
Fix compilation errors due to a header not being found.
insertinterestingnamehere Apr 25, 2020
1581c42
Temporarily allow warnings in aigRewriting.
insertinterestingnamehere Apr 25, 2020
5db158d
Fix warnings in Morph_SepInOut_Graph header.
insertinterestingnamehere Apr 25, 2020
6612000
Fix some warnings and formatting issues in aigRewriting.
insertinterestingnamehere Apr 25, 2020
0bcbd57
Fix clang compilation errors in aigRewriting.
insertinterestingnamehere Apr 25, 2020
d5e56b7
Fix clang compilation errors in SPRoute.
insertinterestingnamehere Apr 25, 2020
7b4fc19
Remove survey propagation
ddn0 Apr 25, 2020
ae090e1
Remove gtuple
ddn0 Apr 25, 2020
029c68d
build: Disable inline warning with icc
ddn0 Apr 25, 2020
681bed0
Simplify Reducible
ddn0 Apr 22, 2020
ad72078
dist verify case issue: OUTPUT->output for CMakeLists
l-hoang Apr 24, 2020
1253ea4
GALOIS_LOW_MEMORY CMAKE option
l-hoang Apr 28, 2020
c903e49
CI testing: add low mem flag
l-hoang Apr 28, 2020
e76833b
fixing dist tc compilation error due to moderngpu
Apr 25, 2020
c7e50ff
fix namespace and cmake
Apr 28, 2020
ce78fe5
corrected the implementation of leiden clustering
Apr 28, 2020
72bc380
checking alloc in per thread storage to make sure memory is actually
l-hoang Apr 28, 2020
083897d
Roshan's dist stats hanging fix; sync up stats so start at same time
l-hoang Apr 29, 2020
168562c
Revert "CI testing: add low mem flag"
l-hoang Apr 29, 2020
50376f0
Revert "GALOIS_LOW_MEMORY CMAKE option";
l-hoang Apr 29, 2020
04c79b5
untested: huge page allocation for per thread
l-hoang Apr 29, 2020
ebe0a02
remove mem.h include
l-hoang Apr 29, 2020
1ac7eec
including pagealloc call in perthreadstorage
l-hoang Apr 29, 2020
31b2577
allocsize in pts name conflict; change to ptAlloc
l-hoang Apr 29, 2020
5fd7bac
fix warnings in AIG rewriting except for signed comparison & unused f…
Apr 28, 2020
17e1aff
fix warnings in aigRewriting; only unused functions and veriables use…
Apr 28, 2020
367c346
Merge branch 'master' into fix_dist_tests
l-hoang Apr 30, 2020
06c4286
dist test processor limits to 8 + half total
l-hoang May 1, 2020
48159f5
hybrid cut tests reintroduced
l-hoang May 1, 2020
ba0bc71
removed wrong comment in cmake lists
l-hoang May 1, 2020
d5bd749
pts: remove mem hack, prefault pages
l-hoang May 1, 2020
79ff6ca
Merge branch 'master' into fix_dist_tests
l-hoang May 2, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion libdist/include/galois/DTerminationDetector.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class DGTerminator {

void reinitialize() {
prev_snapshot = 0;
snapshot = 1;
snapshot = 1;
global_snapshot = 1;
work_done = false;
}
Expand Down Expand Up @@ -184,6 +184,11 @@ class DGTerminator {
initiate_snapshot();
} else {
galois::gDebug("[", net.ID, "] terminating ", snapshot);
// an explicit barrier may be required here
// so that the next async phase begins on all hosts at the same time
// however, this may add overheads when it is not required
// (depending on when the next async phase actually begins), so
// ASSUME: caller will call getHostBarrier().wait() if required
reinitialize(); // for next async phase
return true;
}
Expand Down
10 changes: 7 additions & 3 deletions libdist/src/DistStats.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -284,21 +284,25 @@ void DistStatManager::combineAtHost_0(void) {
receiveAtHost_0_helper();
}
};

galois::DGTerminator<unsigned int> td2;
// explicit barrier after logical barrier is required
// as next async phase begins immediately
getHostBarrier().wait();

// host 0 reads stats from Base class
// other hosts send stats to host 0
combineAtHost_0_helper2();
getSystemNetworkInterface().flush();

// barrier
while (td2.reduce()) {
while (td.reduce()) {
if (getHostID() == 0) {
// receive from other hosts
receiveAtHost_0_helper2();
}
};
// explicit barrier after logical barrier is required
// as next async phase begins immediately
getHostBarrier().wait();
}

bool DistStatManager::printingHostVals(void) {
Expand Down
32 changes: 15 additions & 17 deletions libgalois/src/PerThreadStorage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
*/

#include "galois/substrate/PerThreadStorage.h"
#include "galois/substrate/PageAlloc.h"

//#include "galois/runtime/Mem.h"
#include "galois/gIO.h"
#include <mutex>

Expand All @@ -37,17 +37,15 @@ galois::substrate::PerBackend& galois::substrate::getPPSBackend() {
return b;
}

#define MORE_MEM_HACK
#ifdef MORE_MEM_HACK
const size_t allocSize =
16 * (2 << 20); // galois::runtime::MM::hugePageSize * 16;
inline void* alloc() { return malloc(allocSize); }

#else
const size_t allocSize = galois::runtime::MM::hugePageSize;
inline void* alloc() { return galois::substrate::MM::pageAlloc(); }
#endif
#undef MORE_MEM_HACK
const size_t ptAllocSize = galois::substrate::allocSize();
inline void* alloc() {
// alloc a single page, don't prefault
void* toReturn = galois::substrate::allocPages(1, true);
if (toReturn == nullptr) {
GALOIS_DIE("Out of memory in per thread storage allocation");
}
return toReturn;
}

unsigned galois::substrate::PerBackend::nextLog2(unsigned size) {
unsigned i = MIN_SIZE;
Expand All @@ -61,11 +59,11 @@ unsigned galois::substrate::PerBackend::nextLog2(unsigned size) {
}

unsigned galois::substrate::PerBackend::allocOffset(const unsigned sz) {
unsigned retval = allocSize;
unsigned retval = ptAllocSize;
unsigned ll = nextLog2(sz);
unsigned size = (1 << ll);

if ((nextLoc + size) <= allocSize) {
if ((nextLoc + size) <= ptAllocSize) {
// simple path, where we allocate bump ptr style
retval = __sync_fetch_and_add(&nextLoc, size);
} else if (!invalid) {
Expand Down Expand Up @@ -101,7 +99,7 @@ unsigned galois::substrate::PerBackend::allocOffset(const unsigned sz) {
}
}

assert(retval != allocSize);
assert(retval != ptAllocSize);

return retval;
}
Expand Down Expand Up @@ -137,7 +135,7 @@ void galois::substrate::PerBackend::initCommon(unsigned maxT) {
char* galois::substrate::PerBackend::initPerThread(unsigned maxT) {
initCommon(maxT);
char* b = heads[ThreadPool::getTID()] = (char*)alloc();
memset(b, 0, allocSize);
memset(b, 0, ptAllocSize);
return b;
}

Expand All @@ -147,7 +145,7 @@ char* galois::substrate::PerBackend::initPerSocket(unsigned maxT) {
unsigned leader = ThreadPool::getLeader();
if (id == leader) {
char* b = heads[id] = (char*)alloc();
memset(b, 0, allocSize);
memset(b, 0, ptAllocSize);
return b;
} else {
// wait for leader to fix up socket
Expand Down
15 changes: 11 additions & 4 deletions lonestardist/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ function(add_test_dist_and_verify app input type part N np)
set(suffix "-${app}-${type}-${input}-${part}-${np}")
if (EXISTS ${output})
add_test(run${suffix} mpiexec --bind-to none -n ${np} ./${app} ${X_UNPARSED_ARGUMENTS} -t=${t} -partition=${part} -verify)
add_test(verify${suffix} python ${RESULT_CHECKER} -t=0.01 -sort=1 -delete=1 ${OUTPUT} output_${HOSTNAME}_*.log)
add_test(verify${suffix} python ${RESULT_CHECKER} -t=0.01 -sort=1 -delete=1 ${output} output_${HOSTNAME}_*.log)
else()
add_test(run-${app}-${type}-${input}-${part}-${np} mpiexec --bind-to none -n ${np} ./${app} ${X_UNPARSED_ARGUMENTS} -t=${t} -partition=${part})
endif()
Expand All @@ -98,16 +98,23 @@ function(add_test_dist_and_verify app input type part N np)
endif()


# Don't run dist tests in CI since they are broken in too many cases right now.
return()

if (NOT ${X_NOT_QUICK})
set_tests_properties(run${suffix}
PROPERTIES ENVIRONMENT GALOIS_DO_NOT_BIND_THREADS=1 LABELS quick)
endif()
endfunction()

function(add_test_dist_for_partitions app input type num_threads num_gpus part)
# cut threads in system in half first
if (${num_threads} GREATER 1)
math(EXPR num_threads "${num_threads} / 2")
endif()

# spawn at most 8 processes/use at most 8 threads during testing
if (${num_threads} GREATER 8)
set(num_threads 8)
endif()

set(partitions ${num_threads})
set(thr ${num_threads})
while (${thr} GREATER 1)
Expand Down
4 changes: 2 additions & 2 deletions lonestardist/bc/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
app_dist(bc_level)
add_test_dist(bc_level rmat15 NO_ASYNC ${BASEINPUT}/scalefree/rmat15.gr -graphTranspose=${BASEINPUT}/scalefree/transpose/rmat15.tgr -singleSource)
add_test_dist(bc_level rmat15 NO_ASYNC ${BASEINPUT}/scalefree/rmat15.gr -graphTranspose=${BASEINPUT}/scalefree/transpose/rmat15.tgr -numOfSources=4)

app_dist(bc_mr NO_GPU)
add_test_dist(bc_mr rmat15 NO_ASYNC NO_GPU ${BASEINPUT}/scalefree/rmat15.gr -graphTranspose=${BASEINPUT}/scalefree/transpose/rmat15.tgr -numOfSources=128 -numRoundSources=32)
add_test_dist(bc_mr rmat15 NO_ASYNC NO_GPU ${BASEINPUT}/scalefree/rmat15.gr -graphTranspose=${BASEINPUT}/scalefree/transpose/rmat15.tgr -numOfSources=4 -numRoundSources=4)
#add_test_dist(bc_mr rmat15all NO_ASYNC NO_GPU NOT_QUICK ${BASEINPUT}/scalefree/rmat15.gr -graphTranspose=${BASEINPUT}/scalefree/transpose/rmat15.tgr -numRoundSources=4096)