def __init__(self, out='stdout'):
        super(DumpRecorder, self).__init__()
        self._parallel = True

        if isinstance(out, string_types):

            if out == 'stdout':
                out = sys.stdout

            elif out == 'stderr':
                out = sys.stderr

            else:
                # Dump to separate file for each process if we are under MPI
                if MPI:
                    if '.' in out:
                        parts = out.split('.')
                        parts[-2] += '_' + str(MPI.COMM_WORLD.rank)
                        out = '.'.join(parts)
                    else:
                        out += str(MPI.COMM_WORLD.rank)

                out = open(out, 'w')

        self.out = out
dataset/ETHPy150Open OpenMDAO/OpenMDAO/openmdao/recorders/dump_recorder.py/DumpRecorder.__init__/original