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
83b8d1a0
Verified
Commit
83b8d1a0
authored
3 years ago
by
baptiste.coudray
Browse files
Options
Downloads
Patches
Plain Diff
Fixed compilation
parent
f1eccfac
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
game_of_life/Makefile
+2
-0
2 additions, 0 deletions
game_of_life/Makefile
lattice_boltzmann/CMakeLists.txt
+23
-3
23 additions, 3 deletions
lattice_boltzmann/CMakeLists.txt
lattice_boltzmann/Makefile
+19
-0
19 additions, 0 deletions
lattice_boltzmann/Makefile
with
44 additions
and
3 deletions
game_of_life/Makefile
+
2
−
0
View file @
83b8d1a0
...
...
@@ -2,11 +2,13 @@ all: release debug
release
:
mkdir
-p
"cmake-build-release"
touch
gol.h gol.c
cmake
-DCMAKE_BUILD_TYPE
=
Release
-Bcmake-build-release
$(
MAKE
)
-C
cmake-build-release all
debug
:
mkdir
-p
"cmake-build-debug"
touch
gol.h gol.c
cmake
-DCMAKE_BUILD_TYPE
=
Debug
-Bcmake-build-debug
$(
MAKE
)
-C
cmake-build-release all
...
...
This diff is collapsed.
Click to expand it.
lattice_boltzmann/CMakeLists.txt
+
23
−
3
View file @
83b8d1a0
...
...
@@ -15,7 +15,7 @@ include_directories(${MPI_C_INCLUDE_PATH})
set
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
${
GCC_COMPILE_FLAGS
}
"
)
add_custom_command
(
OUTPUT
${
CMAKE_CURRENT_SOURCE_DIR
}
/lbm.h
${
CMAKE_CURRENT_SOURCE_DIR
}
/lbm.c
OUTPUT
${
CMAKE_CURRENT_SOURCE_DIR
}
/lbm
_seq
.h
${
CMAKE_CURRENT_SOURCE_DIR
}
/lbm
_seq
.c
COMMAND futhark c
${
CMAKE_CURRENT_SOURCE_DIR
}
/lbm.fut --library
DEPENDS lbm.fut
)
...
...
@@ -43,13 +43,33 @@ add_custom_command(
add_custom_target
(
futhark_lbm_multicore DEPENDS lbm_mc.h lbm_mc.c
)
########## Lattice-Boltzmann ##########
## Sequential
add_executable
(
lattice_boltzmann_seq main.c lbm.h lbm.c ../futhark_mpi/dispatch.h ../futhark_mpi/dispatch.c ../futhark_mpi/chunk_info.c ../futhark_mpi/chunk_info.h
)
add_dependencies
(
lattice_boltzmann_seq futhark_lbm_seq
)
target_link_libraries
(
lattice_boltzmann_seq m
${
MPI_C_LIBRARIES
}
)
## CUDA
if
(
CMAKE_SYSTEM_NAME MATCHES
"Linux"
)
add_executable
(
lattice_boltzmann_cuda main.c lbm.h lbm.c ../futhark_mpi/dispatch.h ../futhark_mpi/dispatch.c ../futhark_mpi/chunk_info.c ../futhark_mpi/chunk_info.h
)
add_dependencies
(
lattice_boltzmann_cuda futhark_lbm_cuda
)
target_link_libraries
(
lattice_boltzmann_cuda cuda cudart nvrtc m
${
MPI_C_LIBRARIES
}
)
endif
()
## OpenCL
add_executable
(
lattice_boltzmann_opencl main.c lbm.h lbm.c ../futhark_mpi/dispatch.h ../futhark_mpi/dispatch.c ../futhark_mpi/chunk_info.c ../futhark_mpi/chunk_info.h
)
add_dependencies
(
lattice_boltzmann_opencl futhark_lbm_opencl
)
if
(
CMAKE_SYSTEM_NAME MATCHES
"Darwin"
)
target_link_libraries
(
lattice_boltzmann_opencl
"-framework OpenCL"
SDL2
${
MPI_C_LIBRARIES
}
)
target_link_libraries
(
lattice_boltzmann_opencl
"-framework OpenCL"
m
${
MPI_C_LIBRARIES
}
)
endif
()
if
(
CMAKE_SYSTEM_NAME MATCHES
"Linux"
)
target_link_libraries
(
lattice_boltzmann_opencl OpenCL
SDL2
m
${
MPI_C_LIBRARIES
}
)
target_link_libraries
(
lattice_boltzmann_opencl OpenCL m
${
MPI_C_LIBRARIES
}
)
endif
()
## Multicore
add_executable
(
lattice_boltzmann_mc main.c lbm.h lbm.c ../futhark_mpi/dispatch.h ../futhark_mpi/dispatch.c ../futhark_mpi/chunk_info.c ../futhark_mpi/chunk_info.h
)
add_dependencies
(
lattice_boltzmann_mc futhark_lbm_multicore
)
target_link_libraries
(
lattice_boltzmann_mc pthread m
${
MPI_C_LIBRARIES
}
)
This diff is collapsed.
Click to expand it.
lattice_boltzmann/Makefile
0 → 100644
+
19
−
0
View file @
83b8d1a0
all
:
release debug
release
:
mkdir
-p
"cmake-build-release"
touch
lbm.h lbm.c
cmake
-DCMAKE_BUILD_TYPE
=
Release
-Bcmake-build-release
$(
MAKE
)
-C
cmake-build-release all
debug
:
mkdir
-p
"cmake-build-debug"
touch
lbm.h lbm.c
cmake
-DCMAKE_BUILD_TYPE
=
Debug
-Bcmake-build-debug
$(
MAKE
)
-C
cmake-build-release all
clean
:
$(
MAKE
)
-C
cmake-build-release clean
$(
MAKE
)
-C
cmake-build-release clean
.PHONY
:
release debug clean
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