Skip to content

Commit

Permalink
Merge pull request #54 from STEllAR-GROUP/master
Browse files Browse the repository at this point in the history
Merge master to release
  • Loading branch information
tianyizhangcs authored May 9, 2019
2 parents 61af2cb + 74c2eb5 commit 3013e25
Show file tree
Hide file tree
Showing 20 changed files with 621 additions and 274 deletions.
7 changes: 6 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ if(HPXMP_WITH_OMPT)
src/ompt-internal.h)
endif()

set(HPXMP_WITH_OMP_50_ENABLED OFF CACHE BOOL "enable openmp 5.0 features in hpxmp")
if(HPXMP_WITH_OMP_50_ENABLED)
add_definitions(-DHPXMP_HAVE_OMP_50_ENABLED)
endif()

#decide whether debug or release build
set(RELEASE_BUILD FALSE)
string(TOLOWER "${CMAKE_BUILD_TYPE}" libhpxmp_build_type_lowercase)
Expand Down Expand Up @@ -74,7 +79,7 @@ if(NOT HPX_WITH_HPXMP)
target_link_libraries(hpxmp PRIVATE -L${dir})
endforeach()

target_link_libraries(hpxmp PRIVATE ${HPX_LIBRARIES})
target_link_libraries(hpxmp PRIVATE ${HPX_LIBRARIES} hpx_preprocessor)

else()

Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,7 @@ Please refer to [Usage Examples](doc/usecases.md) for simple use examples.
Please refer to [dones and todos](doc/done-todo.md) for information about
what has been implemented in hpxMP and what needs to be done.

# Credit

Please cite as
Jeremy Kemp, Tianyi Zhang, Bryce Adelstein, Shahrzad Shirzad, Hartmut Kaiser, Parsa Amini, & Bibek Wagle. (2018, November 1). hpxMP (Version 0.1.0). Zenodo. http://doi.org/10.5281/zenodo.2662481
9 changes: 7 additions & 2 deletions doc/done-todo.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,14 @@ The following pragmas and clauses are tested in hpxMP.

*#pragma omp task untied

*#pragma omp taskgroup task_reduction(+:sum)

*#pragma omp task in_reduction(+:sum)

*#pragma omp taskwait

**Note**: Directives not implemented in hpxMP:
cancellation, taskgroup, threadprivate, copyprivate, and copyin
cancellation, threadprivate, copyprivate, and copyin

# Compiler Support
hpxMP works wich clang/gcc,
Expand All @@ -84,5 +88,6 @@ A list of callbacks to be supported can be found [here](ompt-priorities.txt).

**Note**: Currently Mandatory Events are under control, but they needs to be
reviewed and improved. Currently, OMPT does not work with gcc.
Other events are not implemented yet.
Other events are not implemented yet.


6 changes: 3 additions & 3 deletions src/gcc_hpxMP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -698,7 +698,7 @@ xexpand(KMP_API_NAME_GOMP_PARALLEL)(void (*task)(void *), void *data, unsigned n
#endif
start_backend();
//__kmpc_push_num_threads
omp_task_data * my_data = hpx_backend->get_task_data();
auto my_data = hpx_backend->get_task_data();
my_data->set_threads_requested(num_threads);

__kmp_GOMP_fork_call(task,(microtask_t )__kmp_GOMP_microtask_wrapper, 2, task, data);
Expand All @@ -714,7 +714,7 @@ xexpand(KMP_API_NAME_GOMP_PARALLEL_SECTIONS)(void (*task) (void *), void *data,
//from gomp parallel
start_backend();
//from __kmpc_push_num_threads
omp_task_data * my_data = hpx_backend->get_task_data();
auto my_data = hpx_backend->get_task_data();
my_data->set_threads_requested(num_threads);

__kmp_GOMP_fork_call(task,
Expand All @@ -730,7 +730,7 @@ xexpand(KMP_API_NAME_GOMP_PARALLEL_SECTIONS)(void (*task) (void *), void *data,
long ub, long str, long chunk_sz, unsigned flags) \
{ \
start_backend(); \
omp_task_data *my_data = hpx_backend->get_task_data(); \
auto my_data = hpx_backend->get_task_data(); \
my_data->set_threads_requested(num_threads); \
__kmp_GOMP_fork_call(task, \
(microtask_t) __kmp_GOMP_parallel_microtask_wrapper, 9, task, \
Expand Down
Loading

0 comments on commit 3013e25

Please sign in to comment.