Skip to content

Commit 9347ac7

Browse files
terdnerJoeOster
andauthored
Fix path to oneDPL for Beta10 (#224)
* initial commit of openMP example. Signed-off-by: todd.erdner <[email protected]> * Initial commit of the dpc_reduce Signed-off-by: todd.erdner <[email protected]> * added guid to sample.json Signed-off-by: todd.erdner <[email protected]> * fixed sample.json files. Signed-off-by: todd.erdner <[email protected]> * fixed the include files. Somehow I copied a slightly old repo and it still had <chrono> and the omp_common.hpp file. They have been removed. Signed-off-by: todd.erdner <[email protected]> * added license.txt file ran through formating tool one more time removed all calls to "std::endl" and replaced with " \n" Signed-off-by: todd.erdner <[email protected]> * renamed license.txt to License.txt Signed-off-by: todd.erdner <[email protected]> * added "ciTests" to the sample.json file. It passed the check. Signed-off-by: todd.erdner <[email protected]> * fixed make error Signed-off-by: todd.erdner <[email protected]> * fixed sample.json Signed-off-by: todd.erdner <[email protected]> * removed "2020" from the License.txt file due to update guidelines. Signed-off-by: todd.erdner <[email protected]> * added comment regarding where you can find dpc_common in both files per Paul's comments. Signed-off-by: todd.erdner <[email protected]> * Modified names of the functions to represent what they do (ie. calc_pi_*) per suggestion from Paul. Signed-off-by: todd.erdner <[email protected]> * initial check-in to the C++ repo Signed-off-by: todd.erdner <[email protected]> * put correct comment on dpc_common.hpp Signed-off-by: todd.erdner <[email protected]> * added commenting indicating where they can find corresponding include files. Signed-off-by: todd.erdner <[email protected]> * added comment line Signed-off-by: todd.erdner <[email protected]> * removed openMP repo from DPC++ as it will be moved to C++ directory * Update README.md * Update README.md * Update README.md * Update README.md * fixed category line in sample.json to match exact text expected. * removing openMP from the DPC directory. It has been moved to C++ directory. * fixed tf_init call Signed-off-by: todd.erdner <[email protected]> * removed all calls into PSTL internal logic. This is what was causing fails between beta08 and beta09. Signed-off-by: todd.erdner <[email protected]> * fixed env variable to run on CPU Signed-off-by: todd.erdner <[email protected]> * update Readme file to include information about setting env variable to allocate more memory for any runs on the cpu Signed-off-by: todd.erdner <[email protected]> * added option in Cmake file to support unnamed lambda option. You need this to compile if the environment doesn't have this set by default. Signed-off-by: todd.erdner <[email protected]> * path to output file from compile has changed. it no longer seems to create the src directory. * started to remove get_access and change it to accessor name() Signed-off-by: todd.erdner <[email protected]> * fixed remaining get_access Signed-off-by: todd.erdner <[email protected]> * removed commented out old code Signed-off-by: todd.erdner <[email protected]> * Fixed path in Cmakelists.txt to suport both beta10 and beta09. The location of the oneDPL library changed between the two releases. * Update CMakeLists.txt Co-authored-by: JoeOster <[email protected]>
1 parent 5318ed6 commit 9347ac7

File tree

2 files changed

+33
-24
lines changed

2 files changed

+33
-24
lines changed
Lines changed: 30 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,30 @@
1-
# required cmake version
2-
cmake_minimum_required(VERSION 3.5)
3-
4-
project (dpc_reduce)
5-
set(CMAKE_CXX_COMPILER "mpiicpc")
6-
7-
# Set default build type to RelWithDebInfo if not specified
8-
if (NOT CMAKE_BUILD_TYPE)
9-
message (STATUS "Default CMAKE_BUILD_TYPE not set using Release with Debug Info")
10-
set (CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE
11-
STRING "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel"
12-
FORCE)
13-
endif()
14-
15-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -fsycl -std=c++17 -fsycl-unnamed-lambda")
16-
17-
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -ltbb -lsycl")
18-
19-
add_executable (dpc_reduce src/main.cpp)
20-
21-
add_custom_target (run
22-
COMMAND CL_CONFIG_CPU_FORCE_PRIVATE_MEM_SIZE=16MB ./dpc_reduce
23-
WORKING_DIRECTORY ${CMAKE_PROJECT_DIR}
24-
)
1+
# required cmake version
2+
cmake_minimum_required(VERSION 3.5)
3+
4+
project (dpc_reduce)
5+
set(CMAKE_CXX_COMPILER "mpiicpc")
6+
7+
# Set default build type to RelWithDebInfo if not specified
8+
if (NOT CMAKE_BUILD_TYPE)
9+
message (STATUS "Default CMAKE_BUILD_TYPE not set using Release with Debug Info")
10+
set (CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE
11+
STRING "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel"
12+
FORCE)
13+
endif()
14+
15+
16+
# For beta10 and later due to change in location for dpl library.
17+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -fsycl -std=c++17 -I $ENV{ONEAPI_ROOT}/dpl/2021.1-beta10/linux/include -fsycl-unnamed-lambda")
18+
19+
# Beta 09
20+
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -fsycl -std=c++17 -fsycl-unnamed-lambda")
21+
22+
23+
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -ltbb -lsycl")
24+
25+
add_executable (dpc_reduce src/main.cpp)
26+
27+
add_custom_target (run
28+
COMMAND CL_CONFIG_CPU_FORCE_PRIVATE_MEM_SIZE=16MB ./dpc_reduce
29+
WORKING_DIRECTORY ${CMAKE_PROJECT_DIR}
30+
)

DirectProgramming/DPC++/ParallelPatterns/dpc_reduce/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ The include folder is located at `%ONEAPI_ROOT%\dev-utilities\latest\include` on
5757
If running a sample in the Intel DevCloud, remember that you must specify the compute node (CPU, GPU, FPGA) as well whether to run in batch or interactive mode. For more information see the Intel® oneAPI Base Toolkit Get Started Guide (https://devcloud.intel.com/oneapi/get-started/base-toolkit/)
5858

5959
### On a Linux* System
60+
NOTE: Location of some include files changed between Beta09 and Beta10.
61+
See the CMakeLists.txt and uncomment out line if you want Beta09 to build.
62+
6063
Perform the following steps:
6164
1. Build the program using the following 'cmake' commands
6265
export I_MPI_CXX=dpcpp

0 commit comments

Comments
 (0)