-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #196 from maelk3/fix-cmake-openmpi-comm-type-share…
…d-check CMake: fix check for MPI_COMM_SHARED_TYPE using openMPI
- Loading branch information
Showing
6 changed files
with
66 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
include(CheckCSourceCompiles) | ||
function(check_mpicommshared) | ||
|
||
set(CMAKE_REQUIRED_LIBRARIES MPI::MPI_C) | ||
|
||
check_c_source_compiles( | ||
" | ||
#include <mpi.h> | ||
int main(void) { | ||
int temp = MPI_COMM_TYPE_SHARED; | ||
return 0; | ||
} | ||
" | ||
SC_ENABLE_MPICOMMSHARED) | ||
|
||
endfunction() | ||
|
||
check_mpicommshared() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
include(CheckCSourceCompiles) | ||
function(check_mpithread) | ||
|
||
set(CMAKE_REQUIRED_LIBRARIES MPI::MPI_C) | ||
|
||
check_c_source_compiles( | ||
" | ||
#include <mpi.h> | ||
int main(int argc, char** argv) { | ||
int thread_support_provided; | ||
MPI_Init_thread(&argc, &argv, MPI_THREAD_MULTIPLE, &thread_support_provided); | ||
return 0; | ||
} | ||
" | ||
SC_ENABLE_MPITHREAD) | ||
|
||
endfunction() | ||
|
||
check_mpithread() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
include(CheckCSourceCompiles) | ||
function(check_mpiwinshared) | ||
|
||
set(CMAKE_REQUIRED_LIBRARIES MPI::MPI_C) | ||
|
||
check_c_source_compiles( | ||
" | ||
#include <mpi.h> | ||
int main(void) { | ||
int* window_buffer; | ||
MPI_Win window; | ||
MPI_Win_allocate_shared(sizeof(int), sizeof(int), MPI_INFO_NULL, MPI_COMM_WORLD, &window_buffer, &window); | ||
return 0; | ||
} | ||
" | ||
SC_ENABLE_MPIWINSHARED) | ||
|
||
endfunction() | ||
|
||
check_mpiwinshared() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
I place my contributions to libsc under the FreeBSD license. | ||
Mael Karembe (mael.karembe@dlr.de) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters