| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
| |
Just moved the *scan++ line up before the recursive call. Otherwise,
infinite recursion occurs and leads to a segmentation fault.
llvm-svn: 250729
|
|
|
|
|
|
|
|
| |
Without this fix, cancellation requests in one parallel region cause
cancellation of the second region even though the second one was
not intended to be cancelled.
llvm-svn: 250727
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
warnings similar to the following:
runtime/src/kmp_global.c:117:35: warning: implicit conversion from
'unsigned long' to 'int' changes value from 18446744073709551615 to -1
[-Wconstant-conversion]
int __kmp_sys_max_nth = KMP_MAX_NTH;
~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~
runtime/src/kmp.h:849:34: note: expanded from macro 'KMP_MAX_NTH'
# define KMP_MAX_NTH PTHREAD_THREADS_MAX
^~~~~~~~~~~~~~~~~~~
Clamp KMP_MAX_NTH to INT_MAX to avoid these warnings. Also use INT_MAX
whenever PTHREAD_THREADS_MAX is not defined at all.
Differential Revision: http://reviews.llvm.org/D13827
llvm-svn: 250708
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fix implements the following OMPT events for the API locking routines:
* ompt_event_acquired_lock
* ompt_event_acquired_nest_lock_first
* ompt_event_acquired_nest_lock_next
* ompt_event_init_lock
* ompt_event_init_nest_lock
* ompt_event_destroy_lock
* ompt_event_destroy_nest_lock
For the acquired events the depths of the locks ist required, so a return value
was added similiar to the return values we already have for the release lock
routines.
Patch by Tim Cramer
Differential Revision: http://reviews.llvm.org/D13689
llvm-svn: 250526
|
|
|
|
| |
llvm-svn: 250198
|
|
|
|
|
|
|
|
|
|
|
| |
* Avoid computing state needed only by OMPT unless the ompt_enabled flag is set.
* Properly handle a corner case in OMPT where team == NULL.
Patch by John Mellor-Crummey
Differential Revision: http://reviews.llvm.org/D13502
llvm-svn: 249857
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Because __kmp_task_init_ompt is called for every initial task in each thread
and always generated task ids, this was a big performance issue on bigger
systems even without any tool attached. After changing the initialization
interface to ompt_tool, we can now rely on already knowing whether a tool is
attached and OMPT is enabled at this point.
Patch by Jonas Hahnfeld
Differential Revision: http://reviews.llvm.org/D13494
llvm-svn: 249855
|
|
|
|
| |
llvm-svn: 249725
|
|
|
|
|
|
|
| |
These changes improve/update the trace messages and debug asserts related to
the previous wait/release checkin.
llvm-svn: 249717
|
|
|
|
|
|
|
|
|
|
| |
These changes improve the wait/release mechanism for threads spinning in
barriers that are handling tasks while spinnin by providing feedback to the
barriers about any task stealing that occurs.
Differential Revision: http://reviews.llvm.org/D13353
llvm-svn: 249711
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Added (optional) sockets to the syntax of the KMP_PLACE_THREADS environment variable.
Some limitations:
* The number of sockets and then optional offset should be specified first (before other parameters).
* The letter designation is mandatory for sockets and then for other parameters.
* If number of cores is specified first, then the number of sockets is defaulted to all sockets on the machine; also, the old syntax is partially supported if sockets are skipped.
* If number of threads per core is specified first, then the number of sockets and cores per socket are defaulted to all sockets and all cores per socket respectively.
* The number of cores per socket cannot be specified before sockets or after threads per core.
* The number of threads per core can be specified before or after core-offset (old syntax required it to be before core-offset);
* Parameters delimiter can be: empty, comma, lower-case x;
* Spaces are allowed around numbers, around letters, around delimiter.
Approximate shorthand specification:
KMP_PLACE_THREADS="[num_sockets(S|s)[[delim]offset(O|o)][delim]][num_cores_per_socket(C|c)[[delim]offset(O|o)][delim]][num_threads_per_core(T|t)]"
Differential Revision: http://reviews.llvm.org/D13175
llvm-svn: 249708
|
|
|
|
|
|
|
|
| |
This patch adjusts the buffer size when reducing the buffer used for printing.
This solves the memory corruption in Windows debug library, and potential
memory corruption in other builds.
llvm-svn: 248588
|
|
|
|
| |
llvm-svn: 248500
|
|
|
|
|
|
|
|
| |
This change removes the KMP_STATS_ENABLED macro inside kmp_stats.cpp since it
is only compiled anyways when LIBOMP_STATS=on. Also, include kmp_config.h in
kmp_stats.h to ensure KMP_STATS_ENABLED is defined.
llvm-svn: 248494
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change introduces a check-libomp target which is based upon llvm's lit
test infrastructure. Each test (generated from the University of Houston's
OpenMP testsuite) is compiled and then run. For each test, an exit status of 0
indicates success and non-zero indicates failure. This way, FileCheck is not
needed. I've added a bit of logic to generate symlinks (libiomp5 and libgomp)
in the build tree so that gcc can be tested as well. When building out-of-
tree builds, the user will have to provide llvm-lit either by specifying
-DLIBOMP_LLVM_LIT_EXECUTABLE or having llvm-lit in their PATH.
Differential Revision: http://reviews.llvm.org/D11821
llvm-svn: 248211
|
|
|
|
| |
llvm-svn: 248209
|
|
|
|
| |
llvm-svn: 248204
|
|
|
|
|
|
| |
simplify conditional.
llvm-svn: 248199
|
|
|
|
|
|
| |
Unix-like systems can follow the same code path.
llvm-svn: 248198
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Prior to this change, OMPT had a status flag ompt_status, which could take
several values. This was due to an earlier OMPT design that had several levels
of enablement (ready, disabled, tracking state, tracking callbacks). The
current OMPT design has OMPT support either on or off.
This revision replaces ompt_status with a boolean flag ompt_enabled, which
simplifies the runtime logic for OMPT.
Patch by John Mellor-Crummey
Differential Revision: http://reviews.llvm.org/D12999
llvm-svn: 248189
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The OMPT specification has changed. This revision brings the LLVM OpenMP
implementation up to date.
Technical overview of changes:
Previously, a public weak symbol ompt_initialize was called after the OpenMP
runtime is initialized. The new interface calls a global weak symbol ompt_tool
prior to initialization. If a tool is present, ompt_tool returns a pointer to
a function that matches the signature for ompt_initialize. After OpenMP is
initialized the function pointer is called to initialize a tool.
Knowing that OMPT will be enabled before initialization allows OMPT support to
be initialized as part of initialization instead of back patching
initialization of OMPT support after the fact.
Post OpenMP initialization support has been generalized moves from
ompt-specific.c into ompt-general.c, since the OMPT initialization logic is no
longer implementation specific.
Patch by John Mellor-Crummey
Differential Revision: http://reviews.llvm.org/D12998
llvm-svn: 248187
|
|
|
|
|
|
|
|
|
|
|
| |
This change adds guards to the code in places where they are missing to enable
the OpenMP 3.0 build.
Patch by Diego Caballero and Johnny Peyton
Mailing List: http://lists.llvm.org/pipermail/openmp-dev/2015-September/000935.html
llvm-svn: 248178
|
|
|
|
|
|
|
|
|
|
|
| |
An ifdef for OMPT_TRACE needs to be OMPT_BLAME so that both instances of a
callback are controlled by the same ifdef.
Patch by John Mellor-Crummey
Differential Revision: http://reviews.llvm.org/D12911
llvm-svn: 248001
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change deletes the Makefile+Perl build system and all files used by it
which aren't used by the CMake build system. This included many Perl files,
*.mk files, iomp* files. This change also updates the README's and
index.html to instruct the user to use the CMake build system. All mentioning
of the Perl+Makefile based system are removed.
Differential Revision: http://reviews.llvm.org/D12331
llvm-svn: 247583
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
shutdown
This only triggered when built in debug mode with OMPT enabled:
__kmp_wait_template expected the state of the current thread to be either
ompt_state_idle or ompt_state_wait_barrier{,_implicit,_explicit}.
Patch by Jonas Hahnfeld
Differential Revision: http://reviews.llvm.org/D12754
llvm-svn: 247339
|
|
|
|
|
|
|
|
|
|
|
| |
This is a follow up to the hierarchy cleanup patch.
Added some clarifying comments to hierarchy_info.
Fixed a bug with the depth field not being updated cleanly during a resize.
Fixed resize to first check capacity as determined by maxLevels before actually doing the full resize.
Differential Revision: http://reviews.llvm.org/D12562
llvm-svn: 247333
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some of this is improvement to code suggested by Hal Finkel. Four changes here:
1.Cleanup of hierarchy code to handle all hierarchy cases whether affinity is available or not
2.Separated this and other classes and common functions out to a header file
3.Added a destructor-like fini function for the hierarchy (and call in __kmp_cleanup)
4.Remove some redundant code that is hopefully no longer needed
Differential Revision: http://reviews.llvm.org/D12449
llvm-svn: 247326
|
|
|
|
|
|
|
|
|
|
| |
The fix is to make b_arrived flag 64 bit in both structures - kmp_balign_team_t
and kmp_balign_t. Otherwise when flag in kmp_balign_team_t wrapped over
UINT_MAX the library hangs.
Differential Revision: http://reviews.llvm.org/D12563
llvm-svn: 247320
|
|
|
|
|
|
|
| |
The th.th_team_nproc is assigned in __kmp_allocate_thread() just 3 lines above,
so there is no need to assign the same value again.
llvm-svn: 246703
|
|
|
|
|
|
|
|
|
| |
Conditionally include the fork_context parameter to __kmp_join_call()
only if OMPT_SUPPORT=1
Differential Revision: http://reviews.llvm.org/D12495
llvm-svn: 246460
|
|
|
|
|
|
|
| |
The CMAKE_CURRENT_BINARY_DIR is only necessary on the DEPENDS part of
the add_custom_command to build the Fortran Modules.
llvm-svn: 246448
|
|
|
|
| |
llvm-svn: 246434
|
|
|
|
| |
llvm-svn: 246426
|
|
|
|
|
|
|
| |
In r246314 (Removing expand-vars.pl) patch, I forgot to add kmp_config.h.cmake
This patch just adds it.
llvm-svn: 246317
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, the libomp CMake build system uses a Perl script to configure files
(tools/expand-vars.pl). This patch replaces the use of the Perl script by using
CMake's configure_file() function. The major changes include:
1. *.var has every $KMP_* variable changed to @LIBOMP_*@
2. kmp_config.h.cmake is a new file which contains all the feature macros and
#cmakedefine lines
3. Most of the -D lines have been moved from LibompDefinitions.cmake but some
OS specific MACROs (e.g., _GNU_SOURCE) remain.
4. All expand-vars.pl related logic is removed from the CMake files.
One important note about this change is that it breaks the old Perl+Makefile
build system because it can't create kmp_config.h properly.
Differential Review: http://reviews.llvm.org/D12211
llvm-svn: 246314
|
|
|
|
|
|
|
| |
These variables are only used in the TRACE macros and
so don't need to be defined unless compiling in debug mode.
llvm-svn: 246067
|
|
|
|
|
|
|
|
| |
This change just removes the variables created solely for KMP_DEBUG_ASSERT statements
and puts the definition of the removed variables inside the KMP_DEBUG_ASSERT
statements.
llvm-svn: 246065
|
|
|
|
|
|
|
| |
There is a thr variable with the same definition at the top of this function
as the thr variable inside the if block.
llvm-svn: 246064
|
|
|
|
|
|
| |
z_Windows_NT_util.c
llvm-svn: 246059
|
|
|
|
|
|
|
|
|
|
|
| |
This patch fixes a bug when eliminating layers in the machine topology (namely
cores, and threads). Before this patch, if a user specifies using only one
thread per socket, then affinity is not set properly due to bad topology
pruning.
Differential Revision: http://reviews.llvm.org/D11158
llvm-svn: 245966
|
|
|
|
|
|
|
|
| |
z_Linux_asm.s can use the KMP_OS_* / KMP_MIC macros instead of the predefined
compiler macro checks. The macro logic to determine KMP_MIC is moved from
kmp_os.h to kmp_platform.h.
llvm-svn: 245602
|
|
|
|
| |
llvm-svn: 245286
|
|
|
|
| |
llvm-svn: 245209
|
|
|
|
|
|
| |
omp_set_num_threads
llvm-svn: 245206
|
|
|
|
|
|
|
| |
This macro and the small amount of code along with it are unused and
can be removed. The macro is never defined in any build script or source file.
llvm-svn: 244899
|
|
|
|
|
|
| |
There was a missing implicit task init for the ICV PUSH case in hierarchical barrier.
llvm-svn: 244807
|
|
|
|
| |
llvm-svn: 244799
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This removes some statistics counters and timers which were not used,
adds new counters and timers for some language features that were not
monitored previously and separates the counters and timers into those
which are of interest for investigating user code and those which are
only of interest to the developer of the runtime itself.
The runtime developer statistics are now ony collected if the
additional #define KMP_DEVELOPER_STATS is set.
Additional user statistics which are now collected include:
* Count of nested parallelism (omp parallel inside a parallel region)
* Count of omp distribute occurrences
* Count of omp teams occurrences
* Counts of task related statistics (taskyield, task execution, task
cancellation, task steal)
* Values passed to omp_set_numtheads
* Time spent in omp single and omp master
None of this affects code compiled without stats gathering enabled,
which is the normal library build mode.
This also fixes the CMake build by linking to the standard c++ library
when building the stats library as it is a requirement. The normal library
does not have this requirement and its link phase is left alone.
Differential Revision: http://reviews.llvm.org/D11759
llvm-svn: 244677
|
|
|
|
|
|
|
|
| |
Two symbols for the external debugger support were incorrectly exported when LIBOMP_USE_DEBUGGER=off.
Differential Revision: http://reviews.llvm.org/D11763
llvm-svn: 244217
|
|
|
|
| |
llvm-svn: 244034
|