Skip to content

Commit

Permalink
Merge pull request #405 from jdinan/pr/release-updates
Browse files Browse the repository at this point in the history
Updates for v1.3.3rc1 release
  • Loading branch information
davidozog authored Jun 8, 2017
2 parents 6bcf56c + 8708984 commit 105fc67
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 6 deletions.
12 changes: 12 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@

Sandia OpenSHMEM NEWS -- history of user-visible changes.

v1.3.3rc1
---------
- Fixed dissemination barrier race that could lead to incorrect synchronization.
- Improved collect and all-to-all collectives performance.
- Improved error reporting and debugging output.
- Added support for proposed bitwise atomics (see shmemx.h).
- Added shmemx_pcontrol function to profiling interface extension (see shmemx.h).
- Added symbol hiding support in SHMEM library.
- Fixed symmetric heap corruption bug in GUPS benchmark (see test/apps/gups.c).
- Added target-side measurement and asymmetric configuration support to
performance suite benchmarks.

v1.3.2
------
- Improved support for proposed multithreading extension (see shmemx.h),
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

dnl Init Autoconf/Automake/Libtool

AC_INIT([Sandia OpenSHMEM], [1.3.2], [https://github.com/Sandia-OpenSHMEM/SOS])
AC_INIT([Sandia OpenSHMEM], [1.3.3rc1], [https://github.com/Sandia-OpenSHMEM/SOS])
AC_PREREQ([2.60])
AC_CONFIG_AUX_DIR([config])
AC_CONFIG_MACRO_DIR([config])
Expand Down
35 changes: 31 additions & 4 deletions src/symmetric_heap_c.c
Original file line number Diff line number Diff line change
Expand Up @@ -302,9 +302,13 @@ shmem_free(void *ptr)

shmem_internal_barrier_all();

SHMEM_MUTEX_LOCK(shmem_internal_mutex_alloc);
dlfree(ptr);
SHMEM_MUTEX_UNLOCK(shmem_internal_mutex_alloc);
/* It's fine to call dlfree with NULL, but better to avoid unnecessarily
* taking the mutex in the threaded case. */
if (ptr != NULL) {
SHMEM_MUTEX_LOCK(shmem_internal_mutex_alloc);
dlfree(ptr);
SHMEM_MUTEX_UNLOCK(shmem_internal_mutex_alloc);
}
}


Expand All @@ -321,7 +325,12 @@ shmem_realloc(void *ptr, size_t size)
shmem_internal_barrier_all();

SHMEM_MUTEX_LOCK(shmem_internal_mutex_alloc);
ret = dlrealloc(ptr, size);
if (size == 0 && ptr != NULL) {
dlfree(ptr);
ret = NULL;
} else {
ret = dlrealloc(ptr, size);
}
SHMEM_MUTEX_UNLOCK(shmem_internal_mutex_alloc);

shmem_internal_barrier_all();
Expand All @@ -337,6 +346,24 @@ shmem_align(size_t alignment, size_t size)

SHMEM_ERR_CHECK_INITIALIZED();

/* Alignment must be at least sizeof(void*) */
if (alignment < sizeof(void*))
return NULL;

/* Round alignment up to the nearest power of two if
* not already a power of two */
if ((alignment & (alignment-1)) != 0) {
size_t c, log2_alignment = 0;

for (c = alignment >> 1; c; c >>= 1)
log2_alignment++;

DEBUG_MSG("Alignment was rounded up from %zu to %zu\n",
alignment, (size_t) 1 << (log2_alignment + 1));

alignment = 1 << (log2_alignment + 1);
}

SHMEM_MUTEX_LOCK(shmem_internal_mutex_alloc);
ret = dlmemalign(alignment, size);
SHMEM_MUTEX_UNLOCK(shmem_internal_mutex_alloc);
Expand Down
2 changes: 1 addition & 1 deletion test/unit/shmemalign.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ main(int argc, char **argv)
for(l=0; l < loops; l++)
{
/* align 2**2 ... 2**23; 24 exceeds symetric heap max */
for(j=0,c=2; j < 23; j++,c<<=1)
for(j=0,c=8; j < 21; j++,c<<=1)
{
target_sz = nWords * sizeof(DataType);
if (!(target = (DataType *)shmem_align(c,target_sz))) {
Expand Down

0 comments on commit 105fc67

Please sign in to comment.