Skip to content
Snippets Groups Projects
Verified Commit d81c7039 authored by baptiste.coudray's avatar baptiste.coudray
Browse files

Removed sanitize flags

parent d7562c5d
No related branches found
No related tags found
No related merge requests found
...@@ -4,10 +4,7 @@ project(game_of_life C) ...@@ -4,10 +4,7 @@ project(game_of_life C)
set(CMAKE_C_STANDARD 11) set(CMAKE_C_STANDARD 11)
if (CMAKE_BUILD_TYPE MATCHES Debug) if (CMAKE_BUILD_TYPE MATCHES Debug)
set(GCC_COMPILE_FLAGS "-Wall -Wextra -Wconversion -pedantic -fsanitize=address -fsanitize=null") set(GCC_COMPILE_FLAGS "-Wall -Wextra -Wconversion -pedantic")
if (CMAKE_SYSTEM_NAME MATCHES "Linux")
set(GCC_COMPILE_FLAGS "${GCC_COMPILE_FLAGS} -fsanitize=leak")
endif ()
elseif (CMAKE_BUILD_TYPE MATCHES Release) elseif (CMAKE_BUILD_TYPE MATCHES Release)
set(GCC_COMPILE_FLAGS "-O2") set(GCC_COMPILE_FLAGS "-O2")
endif () endif ()
...@@ -34,7 +31,7 @@ add_custom_command( ...@@ -34,7 +31,7 @@ add_custom_command(
add_custom_target(futhark_opencl DEPENDS gol.h gol.c) add_custom_target(futhark_opencl DEPENDS gol.h gol.c)
add_executable(game_of_life_opencl main.c gfx.h gfx.c gol.h gol.c) add_executable(game_of_life_opencl main.c gfx.h gfx.c gol.h gol.c)
# add_dependencies(game_of_life_opencl futhark_opencl) add_dependencies(game_of_life_opencl futhark_opencl)
if (CMAKE_SYSTEM_NAME MATCHES "Darwin") if (CMAKE_SYSTEM_NAME MATCHES "Darwin")
target_link_libraries(game_of_life_opencl "-framework OpenCL" SDL2 ${MPI_C_LIBRARIES}) target_link_libraries(game_of_life_opencl "-framework OpenCL" SDL2 ${MPI_C_LIBRARIES})
...@@ -43,8 +40,3 @@ endif () ...@@ -43,8 +40,3 @@ endif ()
if (CMAKE_SYSTEM_NAME MATCHES "Linux") if (CMAKE_SYSTEM_NAME MATCHES "Linux")
target_link_libraries(game_of_life_opencl OpenCL SDL2 m ${MPI_C_LIBRARIES}) target_link_libraries(game_of_life_opencl OpenCL SDL2 m ${MPI_C_LIBRARIES})
endif () endif ()
#add_custom_target(futhark_multicore DEPENDS gol.h gol.c)
#add_executable(game_of_life_multicore gol.c gol.h main.c)
#add_dependencies(game_of_life_multicore futhark_multicore)
#target_link_libraries(game_of_life_multicore m pthread SDL2 ${MPI_C_LIBRARIES})
...@@ -218,6 +218,10 @@ void chunkBoardToBoard(int8_t *board, int n, const int8_t *chunkBoard, int chunk ...@@ -218,6 +218,10 @@ void chunkBoardToBoard(int8_t *board, int n, const int8_t *chunkBoard, int chunk
} }
int main(int argc, char *argv[]) { int main(int argc, char *argv[]) {
if (argc < 2) {
printf("You need to specify an OpenCL device.\n");
exit(0);
}
int myRank; int myRank;
int nProc; int nProc;
...@@ -238,7 +242,7 @@ int main(int argc, char *argv[]) { ...@@ -238,7 +242,7 @@ int main(int argc, char *argv[]) {
/* Futhark Initialization */ /* Futhark Initialization */
struct futhark_context_config *contextConfig = futhark_context_config_new(); struct futhark_context_config *contextConfig = futhark_context_config_new();
futhark_context_config_set_device(contextConfig, "AMD"); futhark_context_config_set_device(contextConfig, argv[1]);
struct futhark_context *futharkContext = futhark_context_new(contextConfig); struct futhark_context *futharkContext = futhark_context_new(contextConfig);
/* GFX Initialization */ /* GFX Initialization */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment