pic_mpi_lib.F90 Source File


This file depends on

sourcefile~~pic_mpi_lib.f90~~EfferentGraph sourcefile~pic_mpi_lib.f90 pic_mpi_lib.F90 sourcefile~pic_mpi.f90 pic_mpi.f90 sourcefile~pic_mpi_lib.f90->sourcefile~pic_mpi.f90

Files dependent on this one

sourcefile~~pic_mpi_lib.f90~~AfferentGraph sourcefile~pic_mpi_lib.f90 pic_mpi_lib.F90 sourcefile~darrays.f90 darrays.f90 sourcefile~darrays.f90->sourcefile~pic_mpi_lib.f90 sourcefile~darrays_core.f90 darrays_core.f90 sourcefile~darrays.f90->sourcefile~darrays_core.f90 sourcefile~darrays_dlb.f90 darrays_dlb.f90 sourcefile~darrays.f90->sourcefile~darrays_dlb.f90 sourcefile~darrays_types.f90 darrays_types.f90 sourcefile~darrays.f90->sourcefile~darrays_types.f90 sourcefile~darrays_core.f90->sourcefile~pic_mpi_lib.f90 sourcefile~darrays_core.f90->sourcefile~darrays_types.f90 sourcefile~darrays_dlb.f90->sourcefile~pic_mpi_lib.f90 sourcefile~darrays_types.f90->sourcefile~pic_mpi_lib.f90

Source Code

!> Top-level MPI wrapper module with preprocessor selection
!!
!! This module provides a unified interface to MPI by selecting between
!! the modern mpi_f08 interface (pic_mpi_f08) and the legacy MPI interface
!! (pic_mpi) at compile time using the USE_LEGACY preprocessor flag.
!!
!! Usage:
!!   - Without USE_LEGACY: Uses modern mpi_f08 bindings (recommended)
!!   - With USE_LEGACY: Uses traditional integer-based MPI bindings
!!
!! Both implementations provide the same object-oriented API for consistency.
!!
!! @author Jorge Luis Galvez Vallejo
!! @date 2025
module pic_mpi_lib
#ifdef USE_LEGACY
   use pic_mpi !! Legacy MPI interface (integer handles)
#else
   use pic_mpi_f08 !! Modern MPI interface (mpi_f08)
#endif
   implicit none

end module pic_mpi_lib