#!/usr/bin/env python2 From petsc4py import PETSc import sys try: profile except NameError: def profile(f): return f @profile def foo(size=128,ndim=3,dof=1): da = PETSc.DA().create(sizes=[size]*ndim,dof=dof) q1 = da.createGlobalVec() q2 = da.createGlobalVec() q3 = da.createGlobalVec() if __name__ == '__main__': PETSc.Options() foo(int(sys.argv[1]),int(sys.argv[2]),int(sys.argv[3]))