Initialize the environment, should be the very first call in the program and includes the call of MPI_Init.
subroutine init_env()
! ---------------------------------------------------------------------------
integer :: iError
integer :: rank
! ---------------------------------------------------------------------------
call MPI_Init(iError)
!call mpi_type_create_f90_real(rk_prec, MPI_UNDEFINED, rk_mpi, iError)
!call mpi_type_create_f90_integer(long_prec, long_k_mpi, iError)
! Workaround shitty MPI-Implementations.
if( rk_prec == double_prec ) then
rk_mpi = mpi_double_precision
elseif( rk_prec == quad_prec ) then
rk_mpi = MPI_REAL16
else
write(*,*) 'unknown real type specified for mpi_type creation'
end if
long_k_mpi = MPI_INTEGER8
isLittleEndian = Sys_is_Little_Endian()
call MPI_Comm_rank(MPI_COMM_WORLD, rank, iError)
call init_random_seed( rank )
end subroutine init_env