-
Notifications
You must be signed in to change notification settings - Fork 17
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 #119 from titoiride/fix_mpi
Change cmake and MPI
- Loading branch information
Showing
19 changed files
with
331 additions
and
340 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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,12 @@ | ||
add_subdirectory(cpp_lib) | ||
add_subdirectory(diagnostics) | ||
add_subdirectory(dynamics) | ||
add_subdirectory(fft) | ||
add_subdirectory(fields) | ||
add_subdirectory(grid) | ||
add_subdirectory(ionization) | ||
add_subdirectory(IO) | ||
add_subdirectory(parallel) | ||
add_subdirectory(particles) | ||
add_subdirectory(start) | ||
add_subdirectory(work) |
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,9 @@ | ||
target_sources( | ||
ALaDyn | ||
PRIVATE init_beam_part_distrib.f90 | ||
init_laser_field.f90 | ||
init_part_distrib.f90 | ||
pic_in.f90 | ||
pic_out_util.f90 | ||
pic_out.f90 | ||
psolve.f90) |
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,23 @@ | ||
add_library(cpp_folder_tree STATIC cpp_folder_tree.cpp) | ||
add_library(find_last_addr STATIC find_last_addr.cpp) | ||
add_library(enable_gdb_attach STATIC enable_gdb_attach.cpp) | ||
|
||
target_link_libraries(ALaDyn PRIVATE cpp_folder_tree find_last_addr | ||
enable_gdb_attach) | ||
|
||
option(USE_GDB_ATTACH "Enable GDB attach to debug while running" OFF) | ||
|
||
if(NOT WIN32 AND USE_GDB_ATTACH) | ||
target_compile_definitions(enable_gdb_attach PUBLIC USE_GDB_ATTACH) | ||
endif() | ||
|
||
if(NOT WIN32) | ||
find_package(Boost COMPONENTS system filesystem) | ||
if(Boost_FOUND) | ||
target_compile_definitions(cpp_folder_tree PUBLIC USE_BOOST) | ||
target_include_directories(cpp_folder_tree PUBLIC ${Boost_INCLUDE_DIR}) | ||
target_link_libraries(cpp_folder_tree PUBLIC ${Boost_LIBRARIES}) | ||
else() | ||
target_compile_definitions(cpp_folder_tree PUBLIC USE_FILESYSTEM) | ||
endif() | ||
endif() |
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 @@ | ||
target_sources(ALaDyn PRIVATE diag_part_and_fields.f90 run_data_info.f90) |
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,4 @@ | ||
target_sources( | ||
ALaDyn | ||
PRIVATE boris_push.f90 curr_and_fields_util.f90 env_evolve_in_time.f90 | ||
fluid_density_momenta.f90 pic_evolve_in_time.f90 window.f90) |
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 @@ | ||
target_sources(ALaDyn PRIVATE legacy_fft_lib.F90 modern_fft_lib.F90 prl_fft.f90) |
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 @@ | ||
target_sources(ALaDyn PRIVATE grid_field_param.f90 grid_fields.f90 | ||
init_grid_fields.f90) |
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 @@ | ||
target_sources(ALaDyn PRIVATE grid_param.f90 set_grid_param.f90 | ||
stretched_grid.f90) |
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 @@ | ||
target_sources(ALaDyn PRIVATE ionize.f90 ionz_data.f90) |
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,28 @@ | ||
target_sources(ALaDyn PRIVATE mpi_var.F90) | ||
|
||
if(WIN32 AND CMAKE_CXX_COMPILER_ID STREQUAL "PGI") | ||
find_package(MPI REQUIRED COMPONENTS C) | ||
if(MPI_FOUND) | ||
set(FORCE_OLD_MPI | ||
ON | ||
CACHE BOOL "Forcing old mpif.h linking" FORCE) | ||
message(STATUS "ALaDyn: MPI libraries are linked against mpif.h") | ||
target_compile_definitions(ALaDyn PRIVATE FORCE_OLD_MPI) | ||
target_include_directories(ALaDyn PRIVATE ${MPI_INCLUDE_PATH}) | ||
target_link_libraries(ALaDyn PRIVATE ${MPI_LIBRARIES}) | ||
endif() | ||
else() | ||
find_package(MPI REQUIRED COMPONENTS Fortran) | ||
if(MPI_FOUND) | ||
target_include_directories(ALaDyn PRIVATE ${MPI_INCLUDE_PATH} | ||
${MPI_Fortran_INCLUDE_PATH}) | ||
target_link_libraries(ALaDyn PRIVATE ${MPI_LIBRARIES}) | ||
endif() | ||
endif() | ||
|
||
if(MPI_FOUND) | ||
target_sources( | ||
ALaDyn PRIVATE mpi_curr_interface.f90 mpi_field_interface.f90 | ||
mpi_part_interface.f90 parallel.F90) | ||
target_compile_definitions(ALaDyn PRIVATE ALaDyn_USE_MPI) | ||
endif() |
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
Oops, something went wrong.