Exemple #1
0
def getprocessorinfo():
    try:
        name = os.uname()[1]
    except:
        import platform
        name = platform.uname()[1]
    from petsc4py.PETSc import COMM_WORLD
    rank = COMM_WORLD.getRank()
    return (rank, name)
Exemple #2
0
    def _repr_latex_(self):

        # don't print if we aren't process 0
        # this causes there to still be some awkward white space,
        # but at least it doesn't print the tex a zillion times
        if COMM_WORLD.getRank() != 0:
            return ''

        return '$' + self.build_tex(signs='-') + '$'
Exemple #3
0
def getprocessorinfo():
    from petsc4py.PETSc import COMM_WORLD
    rank = COMM_WORLD.getRank()
    name = os.uname()[1]
    return (rank, name)
Exemple #4
0
def getprocessorinfo():
    from petsc4py.PETSc import COMM_WORLD
    rank = COMM_WORLD.getRank()
    name =  os.uname()[1]
    return (rank, name)