src/amuse/rfi/channel.py
def is_mpd_running():
    """
    Determine if the MPD daemon process is running.
    
    
    Needed for installations of AMUSE in a MPICH2 environment using
    the default MPD daemon. The MPD deamon must be
    running before the first MPI_COMN_SPAWN call is made.
    Returns True for other MPI vendors (OpenMPI)
    
    :returns: Boolean result of check whether MPD daemon is running.
    :rtype: bool
    
    
    >>> is_mpd_running()
    True
    
        
    """
    if not MpiChannel.is_supported():
        return True
    
    MpiChannel.ensure_mpi_initialized()
    
    name_of_the_vendor, version = MPI.get_vendor()
    if name_of_the_vendor == 'MPICH2':
        must_check_mpd = True
        if 'AMUSE_MPD_CHECK' in os.environ:
            must_check_mpd = os.environ['AMUSE_MPD_CHECK'] == '1'
        if 'PMI_PORT' in os.environ:
            must_check_mpd = False
        if 'PMI_RANK' in os.environ:
            must_check_mpd = False
        if 'HYDRA_CONTROL_FD' in os.environ:
            must_check_mpd = False
        
        if not must_check_mpd:
            return True
        try:
            process = Popen(['mpdtrace'], stdout=PIPE, stderr=PIPE)
            (output_string, error_string) = process.communicate()
            return not (process.returncode == 255)
        except OSError as ex:
            return True
    else:
        return True

    Determine if the MPD daemon process is running.
    
    
    Needed for installations of AMUSE in a MPICH2 environment using
    the default MPD daemon. The MPD deamon must be
    running before the first MPI_COMN_SPAWN call is made.
    Returns True for other MPI vendors (OpenMPI)
    
    :returns: Boolean result of check whether MPD daemon is running.
    :rtype: bool
    
    
    >>> is_mpd_running()
    True
    
        
    
Determine if the MPD daemon process is running.
Needed for installations of AMUSE in a MPICH2 environment using
the default MPD daemon. The MPD deamon must be
running before the first MPI_COMN_SPAWN call is made.
Returns True for other MPI vendors (OpenMPI)
Determine if the MPD daemon process is running . Needed for installations of AMUSE in a MPICH2 environment using the default MPD daemon . The MPD deamon must be running before the first MPI_COMN_SPAWN call is made . Returns True for other MPI vendors ( OpenMPI )
def is_mpd_running():
    if not MpiChannel.is_supported():
        return True
    MpiChannel.ensure_mpi_initialized()
    name_of_the_vendor, version = MPI.get_vendor()
    if name_of_the_vendor == 'MPICH2':
        must_check_mpd = True
        if 'AMUSE_MPD_CHECK' in os.environ:
            must_check_mpd = os.environ['AMUSE_MPD_CHECK'] == '1'
        if 'PMI_PORT' in os.environ:
            must_check_mpd = False
        if 'PMI_RANK' in os.environ:
            must_check_mpd = False
        if 'HYDRA_CONTROL_FD' in os.environ:
            must_check_mpd = False
        if not must_check_mpd:
            return True
        try:
            process = Popen(['mpdtrace'], stdout=PIPE, stderr=PIPE)
            (output_string, error_string) = process.communicate()
            return not (process.returncode == 255)
        except OSError as ex:
            return True
    else:
        return True
def is_mpd_running ( ) : if not MpiChannel . is_supported ( ) : return True MpiChannel . ensure_mpi_initialized ( ) name_of_the_vendor , version = MPI . get_vendor ( ) if name_of_the_vendor == 'MPICH2' : must_check_mpd = True if 'AMUSE_MPD_CHECK' in os . environ : must_check_mpd = os . environ [ 'AMUSE_MPD_CHECK' ] == '1' if 'PMI_PORT' in os . environ : must_check_mpd = False if 'PMI_RANK' in os . environ : must_check_mpd = False if 'HYDRA_CONTROL_FD' in os . environ : must_check_mpd = False if not must_check_mpd : return True try : process = Popen ( [ 'mpdtrace' ] , stdout = PIPE , stderr = PIPE ) ( output_string , error_string ) = process . communicate ( ) return not ( process . returncode == 255 ) except OSError as ex : return True else : return True
Determine if the MPD daemon process is running.
Determine if the MPD daemon process is running .
"""
    Determine if the MPD daemon process is running.
    
    
    Needed for installations of AMUSE in a MPICH2 environment using
    the default MPD daemon. The MPD deamon must be
    running before the first MPI_COMN_SPAWN call is made.
    Returns True for other MPI vendors (OpenMPI)
    
    :returns: Boolean result of check whether MPD daemon is running.
    :rtype: bool
    
    
    >>> is_mpd_running()
    True
    
        
    """
Boolean result of check whether MPD daemon is running.
Boolean result of check whether MPD daemon is running .
bool
>>> is_mpd_running()
True