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

Release 7.1.0 #149

Merged
merged 10 commits into from
May 16, 2019
Merged
Next Next commit
ROSS cleanup (#135)
This commit fixes warnings when building with -Wall and -Wextra.  In addition, removes old unused code related to prior pthread versions of ROSS as well as removing the ROSS_MEMORY related code, due to no longer being fully functional.

* fixing warnings when building with Wall, etc

* fixing warnings in buddy.c

* fixing warnings in the rest of ROSS core

* fixing warnings in instrumentation

* fixing warnings with phold

* fixing undefined reference causing linking error

* adding warning flags to Travis builds

* fixing some additional warnings that appear in release builds

* minor changes to travis builds

* removing old, unnecessary pthread related code

* fixing ifdefs for ROSS_MEMORY

* removing tw-memory related stuff for now

* removing some unused stuff and unnecessary function arguments

* lots of documentation for network-mpi and removing some unnecessary stuff

* keeping the ROSS models submodule from being used in Travis tests

* minor fix for C++ Travis build

* adding installing phold to bin

* adding some RPATH commands to CMakeLists.txt for Spack

* removed ROSS-Models and template model submodule

* update readme for submodule details

* rpath in pkg-config

* adding develop branch to Travis safelist
  • Loading branch information
caitlinross authored Apr 29, 2019

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit d70eab3aaab425170a86ec1b2124cadd9202d7d6
6 changes: 0 additions & 6 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
[submodule "models/template-model"]
path = models/template-model
url = https://github.com/ROSS-org/template-model.git
[submodule "models/ROSS-Models"]
path = models/ROSS-Models
url = https://github.com/carothersc/ROSS-Models
[submodule "damaris"]
path = core/damaris
url = https://github.com/caitlinross/ROSS-damaris
14 changes: 9 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -10,6 +10,8 @@ notifications:
on_failure: always
env:
- secure: "BbB1KVY0Yb6DJwxdfFDF1PJwSx9euNfNX94oDKftiH8LE0nEzfS6xZc2sBkWTWOThHml9ttBkDIx/NhxEThOjyVcX6uv4kibP6moV5EqxqC+kLoZSEZnVuAdTJfGRKBdzmRp66R5a/GiMzzz/F3+smdVFMb6XR06sPQa5TQZjEc="
git:
submodules: false
before_install:
- sudo apt-add-repository -y ppa:libreoffice/libreoffice-4-2
- sudo apt-get update -q
@@ -21,29 +23,31 @@ before_install:
- mpirun --version
script:
- mkdir cxx-build && cd cxx-build
- cmake -DCMAKE_BUILD_TYPE=Release ..
- cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS="-Wall -Wextra" ..
- export MPICH_CC=clang++
- make
- unset MPICH_CC
- cd ..
- mkdir release && cd release
- MPICH_CC=clang cmake -DCMAKE_BUILD_TYPE=Release -DROSS_BUILD_MODELS=ON ..
- MPICH_CC=clang cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS="-Wall -Wextra" -DROSS_BUILD_MODELS=ON ..
- make
- CTEST_OUTPUT_ON_FAILURE=1 make test
- cd ..
- mkdir build && cd build
- MPICH_CC=clang cmake -DCOVERALLS=ON -DCMAKE_BUILD_TYPE=Debug -DROSS_BUILD_MODELS=ON ..
- MPICH_CC=clang cmake -DCOVERALLS=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS="-Wall -Wextra" -DROSS_BUILD_MODELS=ON ..
- make
- CTEST_OUTPUT_ON_FAILURE=1 make test
- make coveralls
- cd ..
- mkdir build2 && cd build2
- MPICH_CC=clang cmake -DAVL_TREE=OFF -DCOVERALLS=ON -DCMAKE_BUILD_TYPE=Debug -DROSS_BUILD_MODELS=ON ..
- MPICH_CC=clang cmake -DAVL_TREE=OFF -DCOVERALLS=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS="-Wall -Wextra" -DROSS_BUILD_MODELS=ON ..
- make
- CTEST_OUTPUT_ON_FAILURE=1 make test
- make coveralls
branches:
only: master
only:
- master
- develop
after_success:
- bash <(curl -s https://codecov.io/bash)
- ## the following automatically builds the doxygen
29 changes: 29 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -10,6 +10,35 @@ INCLUDE(CTest)

LIST(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/core/cmake/")

# Follow section based on Spack doc:
# https://spack.readthedocs.io/en/latest/workflows.html#write-the-cmake-build
# enable @rpath in the install name for any shared library being built
# note: it is planned that a future version of CMake will enable this by default
set(CMAKE_MACOSX_RPATH 1)

# Always use full RPATH
# http://www.cmake.org/Wiki/CMake_RPATH_handling
# http://www.kitware.com/blog/home/post/510

# use, i.e. don't skip the full RPATH for the build tree
SET(CMAKE_SKIP_BUILD_RPATH FALSE)

# when building, don't use the install RPATH already
# (but later on when installing)
SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)

# add the automatically determined parts of the RPATH
# which point to directories outside the build tree to the install RPATH
SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)

# the RPATH to be used when installing, but only if it's not a system directory
LIST(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/lib" isSystemDir)
IF("${isSystemDir}" STREQUAL "-1")
SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
ENDIF("${isSystemDir}" STREQUAL "-1")

# end of spack-related addition

# We probably don't want this to run on every build.
option(COVERALLS "Generate coveralls data" OFF)

5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -46,9 +46,8 @@ Developed as Simplified ROSS ([gonsie/SR](http://github.com/gonsie/SR)), this ve
git submodule init
git submodule update
```
Currently, ROSS includes three submodules:
- [ROSS-Models](http://github.com/ROSS-org/ROSS-Models) is a set of existing models
- [template-model](http://github.com/ROSS-org/template-model) is a starting place for new models
Currently, ROSS includes one submodule:
- [damaris aka RISA](https://github.com/ROSS-org/RISA) ROSS In Situ Analysis

3. *Optional* Symlink your model to ROSS.
Please [this wiki page](https://github.com/ROSS-org/ROSS/wiki/Constructing-the-Model) for details about creating and integrating a model with ROSS.
1 change: 0 additions & 1 deletion core/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -18,7 +18,6 @@ ross-gvt.h
gvt/${GVT}.h
gvt/${GVT}.c

ross-network.h
network-${NETWORK}.h
network-${NETWORK}.c

10 changes: 5 additions & 5 deletions core/avl_tree.c
Original file line number Diff line number Diff line change
@@ -299,10 +299,10 @@ avlDelete(AvlTree *t, tw_event *key)

AvlTree avl_alloc(void)
{
AvlTree head = g_tw_pe[0]->avl_list_head;
g_tw_pe[0]->avl_list_head = head->next;
AvlTree head = g_tw_pe->avl_list_head;
g_tw_pe->avl_list_head = head->next;

if (g_tw_pe[0]->avl_list_head == NULL) {
if (g_tw_pe->avl_list_head == NULL) {
tw_error(TW_LOC,
"AVL tree out of memory.\nIncrease avl-size beyond %d\n",
(int)log2(g_tw_avl_node_count));
@@ -320,6 +320,6 @@ void avl_free(AvlTree t)
(t)->next = NULL;
(t)->key = NULL;
(t)->height = 0;
(t)->next = g_tw_pe[0]->avl_list_head;
g_tw_pe[0]->avl_list_head = t;
(t)->next = g_tw_pe->avl_list_head;
g_tw_pe->avl_list_head = t;
}
19 changes: 10 additions & 9 deletions core/buddy.c
Original file line number Diff line number Diff line change
@@ -44,9 +44,9 @@ int dump_buddy_table(buddy_list_bucket_t *buddy_master)
buddy_list_bucket_t *blbt = buddy_master;

while (1) {
int counter = 0;
unsigned int counter = 0;

printf("BLBT %p:\n", blbt);
printf("BLBT %p:\n", (void*)blbt);
printf(" Count: %d\n", blbt->count);
printf(" Order: %d\n", blbt->order);
if (blbt->is_valid == VALID)
@@ -58,10 +58,10 @@ int dump_buddy_table(buddy_list_bucket_t *buddy_master)
LIST_FOREACH(blt, &blbt->ptr, next_freelist) {
counter++;
if (blt->use == FREE)
printf(" %11p%8s%16d\n", blt, "FREE", blt->size);
printf(" %11p%8s%16d\n", (void*)blt, "FREE", blt->size);
else
printf(" %11p%8s%16d\n", blt, "USED", blt->size);
assert(next_power2(blt->size) == (1 << blbt->order));
printf(" %11p%8s%16d\n", (void*)blt, "USED", blt->size);
assert(next_power2(blt->size) == (unsigned int) (1 << blbt->order));
}
printf("\n");
assert(counter == blbt->count && "Count is incorrect!");
@@ -88,7 +88,7 @@ int buddy_try_merge(buddy_list_t *blt)
unsigned int size = blt->size + sizeof(buddy_list_t);
buddy_list_bucket_t *blbt = g_tw_buddy_master;
// Find the bucket we need
while (size > (1 << blbt->order)) {
while (size > (unsigned int)(1 << blbt->order)) {
blbt++;
}
// We need to normalize for the "buddy formula" to work
@@ -144,7 +144,7 @@ void buddy_free(void *ptr)

// Find the bucket we need
buddy_list_bucket_t *blbt = g_tw_buddy_master;
while (size > (1 << blbt->order)) {
while (size > (unsigned int)(1 << blbt->order)) {
blbt++;
}

@@ -161,7 +161,8 @@ void buddy_free(void *ptr)
assert(0 && "buddy with FREE status not in freelist");
}

int initial_count = blbt->count;
unsigned int initial_count = blbt->count;
(void) initial_count; // quiet compiler when building Release

// If there are no entries here, we can't have a buddy
if (blbt->count == 0) {
@@ -240,7 +241,7 @@ void *buddy_alloc(unsigned size)

// Find the bucket we need
buddy_list_bucket_t *blbt = g_tw_buddy_master;
while (size > (1 << blbt->order)) {
while (size > (unsigned int)(1 << blbt->order)) {
blbt++;
if (blbt->is_valid == INVALID) {
// Error: we're out of bound for valid BLBTs
1 change: 0 additions & 1 deletion core/config.h.in
Original file line number Diff line number Diff line change
@@ -11,7 +11,6 @@
#define ROSS_VERSION "${GIT_SHA1}"
#cmakedefine AVL_TREE 1
#cmakedefine USE_BGPM
#cmakedefine ROSS_MEMORY
#cmakedefine RAND_NORMAL
#cmakedefine ROSS_timing
#cmakedefine ROSS_runtime_checks
16 changes: 8 additions & 8 deletions core/gvt/mpi_allreduce.c
Original file line number Diff line number Diff line change
@@ -37,14 +37,14 @@ tw_gvt_start(void)
}

void
tw_gvt_force_update(tw_pe *me)
tw_gvt_force_update(void)
{
gvt_force++;
gvt_cnt = g_tw_gvt_interval;
}

void
tw_gvt_force_update_realtime(tw_pe *me)
tw_gvt_force_update_realtime(void)
{
gvt_force++;
g_tw_gvt_interval_start_cycles = 0; // reset to start of time
@@ -85,10 +85,10 @@ tw_gvt_step1_realtime(tw_pe *me)
( ((current_rt = tw_clock_read()) - g_tw_gvt_interval_start_cycles < g_tw_gvt_realtime_interval)
&& (tw_pq_minimum(me->pq) - me->GVT < g_tw_max_opt_lookahead)))
{
/* if( me->node == 0 ) */
/* if( me->id == 0 ) */
/* { */
/* printf("GVT Step 1 RT Rank %ld: found start_cycles at %llu, rt interval at %llu, current time at %llu \n", */
/* me->node, g_tw_gvt_interval_start_cycles, g_tw_gvt_realtime_interval, current_rt); */
/* me->id, g_tw_gvt_interval_start_cycles, g_tw_gvt_realtime_interval, current_rt); */

/* } */

@@ -139,7 +139,7 @@ tw_gvt_step2(tw_pe *me)
}

pq_min = tw_pq_minimum(me->pq);
net_min = tw_net_minimum(me);
net_min = tw_net_minimum();

lvt = me->trans_msg_ts;
if(lvt > pq_min)
@@ -203,12 +203,12 @@ tw_gvt_step2(tw_pe *me)
g_tw_synchronization_protocol == OPTIMISTIC_REALTIME )
{
start = tw_clock_read();
tw_pe_fossil_collect(me);
tw_pe_fossil_collect();
me->stats.s_fossil_collect += tw_clock_read() - start;
}

// do any necessary instrumentation calls
if ((g_st_engine_stats == GVT_STATS || g_st_engine_stats == ALL_STATS) &&
if ((g_st_engine_stats == GVT_STATS || g_st_engine_stats == ALL_STATS) &&
g_tw_gvt_done % g_st_num_gvt == 0 && gvt <= g_tw_ts_end)
{
#ifdef USE_DAMARIS
@@ -234,7 +234,7 @@ tw_gvt_step2(tw_pe *me)

if ((g_st_model_stats == GVT_STATS || g_st_model_stats == ALL_STATS) && g_tw_gvt_done % g_st_num_gvt == 0)
st_collect_model_data(me, (tw_stime)tw_clock_read() / g_tw_clock_rate, GVT_STATS);

st_inst_dump();
// done with instrumentation related stuff

4 changes: 2 additions & 2 deletions core/gvt/mpi_allreduce.h
Original file line number Diff line number Diff line change
@@ -25,7 +25,7 @@ gvt_print(tw_stime gvt)
printf("GVT #%d: simulation %d%% complete, max event queue size %u (",
g_tw_gvt_done,
(int) ROSS_MIN(100, floor(100 * (gvt/g_tw_ts_end))),
tw_pq_max_size(g_tw_pe[0]->pq));
tw_pq_max_size(g_tw_pe->pq));

if (gvt == DBL_MAX)
printf("GVT = %s", "MAX");
@@ -35,7 +35,7 @@ gvt_print(tw_stime gvt)
printf(").\n");

#ifdef AVL_TREE
printf("AVL tree size: %d\n", g_tw_pe[0]->avl_tree_size);
printf("AVL tree size: %d\n", g_tw_pe->avl_tree_size);
#endif

percent_complete += gvt_print_interval;
30 changes: 20 additions & 10 deletions core/hash-quadratic.c
Original file line number Diff line number Diff line change
@@ -3,13 +3,15 @@
#include "avl_tree.h"
#endif /* AVL_TREE */

#ifndef AVL_TREE
static void rehash(tw_hash * hash_t, int pe);
static int find_empty(tw_event ** hash_t, tw_event * event, int hash_size);
static int find_entry(tw_event ** hash_t, tw_event * event, int hash_size, int pe);
static void insert(tw_event ** hash_t, tw_event * event, int hash_size);
static int find_empty(tw_event ** hash_t, tw_event * event, int hash_size);
static int next_prime(int ptst);
static tw_event **allocate_table(int hash_size);
static int hash_(tw_eventid event_id, int hash_size);
static int next_prime(int ptst);
#endif
static int is_prime(int ptst);
tw_event *hash_search(tw_event ** hash_t, tw_event *evt, int size);

@@ -18,20 +20,22 @@ void hash_print(tw_hash * h);
static unsigned int ncpu = 1;
unsigned int g_tw_hash_size = 31;

#ifndef AVL_TREE
int
hash_(tw_eventid event_id, int hash_size)
{
return event_id % hash_size;
}
#endif

void *
tw_hash_create()
{
#ifdef AVL_TREE
int i;
unsigned int i;
AvlTree avl_list;

g_tw_pe[0]->avl_tree_size = 0;
g_tw_pe->avl_tree_size = 0;

g_tw_avl_node_count = 1 << g_tw_avl_node_count;
avl_list = (AvlTree) tw_calloc(TW_LOC, "avl tree", sizeof(struct avlNode), g_tw_avl_node_count);
@@ -41,7 +45,7 @@ tw_hash_create()
}
avl_list[i].next = NULL;

g_tw_pe[0]->avl_list_head = &avl_list[0];
g_tw_pe->avl_list_head = &avl_list[0];

return NULL;
#else
@@ -76,13 +80,15 @@ void
tw_hash_insert(void *h, tw_event * event, long pe)
{
#ifdef AVL_TREE
(void) h;
(void) pe;
tw_clock start;

g_tw_pe[0]->avl_tree_size++;
g_tw_pe->avl_tree_size++;

start = tw_clock_read();
avlInsert(&event->dest_lp->kp->avl_tree, event);
g_tw_pe[0]->stats.s_avl += tw_clock_read() - start;
g_tw_pe->stats.s_avl += tw_clock_read() - start;
#else
tw_hash *hash_t;

@@ -98,6 +104,7 @@ tw_hash_insert(void *h, tw_event * event, long pe)
#endif
}

#ifndef AVL_TREE
void
insert(tw_event ** hash_t, tw_event * event, int hash_size)
{
@@ -193,19 +200,22 @@ allocate_table(int hash_size)
{
return (tw_event **) tw_calloc(TW_LOC, "tw_hash", sizeof(tw_event *) * hash_size, 1);
}
#endif

tw_event *
tw_hash_remove(void *h, tw_event * event, long pe)
{
#if AVL_TREE
(void) h;
(void) pe;
tw_event *ret;
tw_clock start;

g_tw_pe[0]->avl_tree_size--;
g_tw_pe->avl_tree_size--;

start = tw_clock_read();
ret = avlDelete(&event->dest_lp->kp->avl_tree, event);
g_tw_pe[0]->stats.s_avl += tw_clock_read() - start;
g_tw_pe->stats.s_avl += tw_clock_read() - start;
return ret;
#else
tw_hash *hash_t = (tw_hash *) h;
@@ -295,7 +305,7 @@ hash_search(tw_event ** hash_t, tw_event *evt, int size)
void
hash_print(tw_hash * h)
{
int i, j, empty;
unsigned int i, j, empty;
unsigned int *sizes = h->hash_sizes;
int *stored = h->num_stored;
tw_event **hash_t;
Loading