Skip to content

Commit

Permalink
Merge pull request #163 from shintaro-iwasaki/FixMiscBugs
Browse files Browse the repository at this point in the history
Fix miscellaneous bugs
  • Loading branch information
shintaro-iwasaki authored Mar 31, 2020
2 parents 0e6228f + 02b42d2 commit b617d77
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 7 deletions.
15 changes: 11 additions & 4 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -415,9 +415,14 @@ fi

# --enable-perf-opt: set CFLAGS for the performance optimization
if test "x$enable_perf_opt" = "xyes"; then
CFLAGS="$CFLAGS -O3 -ftls-model=initial-exec"
CXXFLAGS="$CXXFLAGS -O3 -ftls-model=initial-exec"
CCASFLAGS="$CCASFLAGS -O3 -ftls-model=initial-exec"
CFLAGS="$CFLAGS -O3"
CXXFLAGS="$CXXFLAGS -O3"
CCASFLAGS="$CCASFLAGS -O3"
if test "$CC" != "xlc"; then
CFLAGS="$CFLAGS -ftls-model=initial-exec"
CXXFLAGS="$CXXFLAGS -ftls-model=initial-exec"
CCASFLAGS="$CCASFLAGS -ftls-model=initial-exec"
fi
if test "$CC" = "icc"; then
CFLAGS="$CFLAGS -ipo"
CXXFLAGS="$CFLAGS -ipo"
Expand Down Expand Up @@ -628,7 +633,9 @@ AC_TRY_COMPILE(
[have_atomic_builtin=yes],
[have_atomic_builtin=no]
)
if test "x$have_atomic_builtin" = "xyes" ; then
# __atomic is broken in XLC-16.1.1, so use __sync as a fallback
# See https://github.com/pmodels/argobots/issues/162 for details.
if test "$CC" != "xlc" -a "x$have_atomic_builtin" = "xyes" ; then
AC_DEFINE(ABT_CONFIG_HAVE_ATOMIC_BUILTIN, 1,
[Define if __atomic builtins are supported])
fi
Expand Down
2 changes: 1 addition & 1 deletion src/arch/fcontext/jump_ppc64_sysv_elf_gas.S
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ jump_fcontext:
mtfsf 0xff, %f0 # restore FPSCR
#ifdef __VSX__
li %r10, 144
lvx %v19, %r10, %r1 # load VSCR vector
lvx %v19, %r10, %r1 # load VSCR
mtvscr %v19 # restore VSCR. Only the last 32 bits are used
li %r14, 160
lvx %v20, %r14, %r1 # restore V20
Expand Down
2 changes: 1 addition & 1 deletion src/arch/fcontext/take_ppc64_sysv_elf_gas.S
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ take_fcontext:
mtfsf 0xff, %f0 # restore FPSCR
#ifdef __VSX__
li %r10, 144
lvx %v19, %r10, %r1 # load VSCR vector
lvx %v19, %r10, %r1 # load VSCR
mtvscr %v19 # restore VSCR. Only the last 32 bits are used
li %r14, 160
lvx %v20, %r14, %r1 # restore V20
Expand Down
1 change: 1 addition & 0 deletions src/include/abti_thread.h
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ static inline void ABTI_thread_context_switch_sched_to_thread_internal(
}
}
}
ABTI_LOG_SET_SCHED(p_old);
return;
}
#endif
Expand Down
2 changes: 1 addition & 1 deletion src/thread.c
Original file line number Diff line number Diff line change
Expand Up @@ -1828,7 +1828,7 @@ int ABTI_thread_set_ready(ABTI_local *p_local, ABTI_thread *p_thread)
* scheduled by another scheduler if it is pushed to a shared pool. */
while (ABTD_atomic_acquire_load_uint32(&p_thread->request) &
ABTI_THREAD_REQ_BLOCK)
;
ABTD_atomic_pause();

LOG_EVENT("[U%" PRIu64 ":E%d] set ready\n", ABTI_thread_get_id(p_thread),
p_thread->p_last_xstream->rank);
Expand Down

0 comments on commit b617d77

Please sign in to comment.