@staticmethod
def create_ports(port, mpi, rank):
    """create a list of ports for the current rank"""
    if port == 'random' or port is None:
        ports = {}
    else:
        port = int(port)
        ports = {'REQ': port + 0, 'PUSH': port + 1, 'SUB': port + 2}
    if mpi == 'all':
        for port in ports:
            ports[port] += rank * 3
    return ports
