tem_connect_toNull Subroutine

public subroutine tem_connect_toNull(null_unit)

Arguments

Type IntentOptional AttributesName
integer, intent(out) :: null_unit

Calls

proc~~tem_connect_tonull~~CallsGraph proc~tem_connect_tonull tem_connect_toNull proc~newunit newunit proc~tem_connect_tonull->proc~newunit

Called by

proc~~tem_connect_tonull~~CalledByGraph proc~tem_connect_tonull tem_connect_toNull proc~tem_logging_init_logger tem_logging_init_logger proc~tem_logging_init_logger->proc~tem_connect_tonull interface~tem_logging_init tem_logging_init interface~tem_logging_init->proc~tem_logging_init_logger proc~tem_logging_init_primary tem_logging_init_primary interface~tem_logging_init->proc~tem_logging_init_primary proc~tem_logging_init_primary->proc~tem_logging_init_logger proc~tem_logging_load tem_logging_load proc~tem_logging_load->proc~tem_logging_init_logger proc~tem_logging_load->proc~tem_logging_init_primary program~tem_spacetime_fun_test tem_spacetime_fun_test program~tem_spacetime_fun_test->interface~tem_logging_init proc~tem_logging_load_primary tem_logging_load_primary proc~tem_logging_load_primary->proc~tem_logging_init_primary proc~tem_logging_load_primary->proc~tem_logging_load proc~tem_load_debug tem_load_debug proc~tem_load_debug->interface~tem_logging_init proc~tem_load_debug->proc~tem_logging_load program~derivedtype_memalloc derivedType_memAlloc program~derivedtype_memalloc->interface~tem_logging_init program~tem_variable_evaltype_test tem_variable_evaltype_test program~tem_variable_evaltype_test->interface~tem_logging_init program~tem_varsys_stfunvar_test tem_varSys_stfunVar_test program~tem_varsys_stfunvar_test->interface~tem_logging_init program~elem_memalloc elem_memAlloc program~elem_memalloc->interface~tem_logging_init program~tem_variable_extract_test tem_variable_extract_test program~tem_variable_extract_test->interface~tem_logging_init program~tem_variable_combine_test tem_variable_combine_Test program~tem_variable_combine_test->interface~tem_logging_init program~tem_varsys_opvar_test tem_varSys_opVar_test program~tem_varsys_opvar_test->interface~tem_logging_init proc~load_env load_env proc~load_env->proc~tem_logging_load_primary program~tem_sparta_test tem_sparta_test program~tem_sparta_test->proc~tem_logging_load_primary proc~check_serial_multilevel_facedesc check_serial_multilevel_faceDesc proc~check_serial_multilevel_facedesc->proc~tem_logging_load_primary proc~tem_debug_load_main tem_debug_load_main proc~tem_debug_load_main->proc~tem_load_debug

Contents

Source Code


Source Code

  subroutine tem_connect_toNull(null_unit)
    integer, intent(out) :: null_unit

    logical :: null_connected

    inquire(file=trim(null_device), opened=null_connected)
    if (null_connected) then
      inquire(file=trim(null_device), number=null_unit)
      ! Some MPI implementations might connect stdin to the null device.
      ! Need to check if this is the case and attempt to open it again
      ! with a different unit to make it writable.
      if (null_unit == input_unit) then
        null_unit = newUnit()
        open(file=trim(null_device), unit=null_unit)
      end if
    else
      null_unit = newUnit()
      open(file=trim(null_device), unit=null_unit)
    end if

  end subroutine tem_connect_toNull