Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
La programmation parallèle pour les gens
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
baptiste.coudray
La programmation parallèle pour les gens
Commits
d81c7039
Verified
Commit
d81c7039
authored
3 years ago
by
baptiste.coudray
Browse files
Options
Downloads
Patches
Plain Diff
Removed sanitize flags
parent
d7562c5d
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
futmpi/CMakeLists.txt
+2
-10
2 additions, 10 deletions
futmpi/CMakeLists.txt
futmpi/main.c
+5
-1
5 additions, 1 deletion
futmpi/main.c
with
7 additions
and
11 deletions
futmpi/CMakeLists.txt
+
2
−
10
View file @
d81c7039
...
@@ -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})
This diff is collapsed.
Click to expand it.
futmpi/main.c
+
5
−
1
View file @
d81c7039
...
@@ -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 */
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment