Commit 390d2533 authored by Nikos Nikoloutsakos's avatar Nikos Nikoloutsakos
Browse files

pddp2means: Added CMakeLists.txt

 Changes to be committed:
	modified:   ../CMakeLists.txt
	new file:   CMakeLists.txt
	modified:   README.md
parent bd8f59bd
......@@ -33,6 +33,7 @@ add_subdirectory(lud/cublas)
add_subdirectory(lud/cusolver)
add_subdirectory(lud/cublas_mkl)
add_subdirectory(lud/cusolver_mkl)
add_subdirectory(pddp2means)
# ==================================================================================================
......
# ==================================================================================================
# This file is part of the CodeVault project. The project is licensed under Apache Version 2.0.
# CodeVault is part of the EU-project PRACE-4IP (WP7.3.C).
#
# Author(s):
# Nikos Nikoloutsakos <nikoloutsa@admin.grnet.gr>
#
# ==================================================================================================
cmake_minimum_required(VERSION 2.8.7 FATAL_ERROR)
include(${CMAKE_CURRENT_SOURCE_DIR}/../../cmake/common.cmake)
# ==================================================================================================
if ("${DWARF_PREFIX}" STREQUAL "")
set(DWARF_PREFIX 1_dense)
endif()
set(NAME_ICC ${DWARF_PREFIX}_pddp2means_omp)
set(NAME_GNU ${DWARF_PREFIX}_pddp2means_gnu)
set(NAME_MIC ${DWARF_PREFIX}_pddp2means_mic)
find_package(Common)
find_package(OpenMP)
enable_language (C)
# ==================================================================================================
# Check for Intel Compilers
if("${CMAKE_C_COMPILER_ID}" STREQUAL "Intel")
set(C_FLAGS "${C_FLAGS} -no-offload")
if (OPENMP_FOUND)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
add_executable(${NAME_ICC} src/pddp_2means.c )
install(TARGETS ${NAME_ICC} DESTINATION bin)
message("** Enabling '${NAME_ICC}': with OpenMP")
else()
message("## Skipping '${NAME_ICC}': no OpenMP support found")
dummy_install(${NAME_ICC} "OpenMP")
endif()
if (MIC_FOUND)
set(C_FLAGS "${C_FLAGS} -offload")
add_executable(${NAME_MIC} src/pddp_2means.c )
install(TARGETS ${NAME_MIC} DESTINATION bin)
message("** Enabling '${NAME_MIC}': with Offload")
else()
message("## Skipping '${NAME_MIC}': no MIC support found")
#dummy_install(${NAME_MIC} "MIC")
endif()
# Else use GNU
else()
endif()
# ==================================================================================================
......@@ -57,27 +57,18 @@ OpenMP
Intel Xeon Phi - Offload Mode
# 9. Level of the code sample complexity
Sample data example demonstrating the use of pddp-2means clustering in a small data set.
Advanced.
# 10. Instructions on how to compile the code
Use the Makefile included in the src/ directory.
Enable compilation on targets without Xeon Phi device
select offload compilation enable/disable
```
icc -offload
```
```
icc -no-offload
```
Please use intel compilers to enable Xeon Phi Offload mode
CC=icc cmake ..
# 11. Instructions on how to run the code
Usage:
./pddp_2means <input_file> <output_file> <clusters>
./<exe> <input_file> <output_file> <clusters>
Sample input example:
./pddp_2means ../data/40k.csv pddp_2means.out 19
./pddp_2means_omp ../data/40k.csv pddp_2means.out 19
# 12. Sample input(s)
Input-data is included in the data/ folder
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment