init_env Subroutine

public subroutine init_env()

Initialize the environment, should be the very first call in the program and includes the call of MPI_Init.

Arguments

None

Calls

proc~~init_env~~CallsGraph proc~init_env init_env mpi_comm_rank mpi_comm_rank proc~init_env->mpi_comm_rank mpi_init mpi_init proc~init_env->mpi_init proc~init_random_seed init_random_seed proc~init_env->proc~init_random_seed proc~sys_is_little_endian Sys_is_Little_Endian proc~init_env->proc~sys_is_little_endian

Called by

proc~~init_env~~CalledByGraph proc~init_env init_env proc~tem_start tem_start proc~tem_start->proc~init_env

Source Code

  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