Skip to content

Instantly share code, notes, and snippets.

View eikehmueller's full-sized avatar

Eike Hermann Mueller eikehmueller

View GitHub Profile
Started atTue Oct 7 16:58:33 BST 2014
Running helmholtz
PBS_JOBID = 2454494.sdb
Tue Oct 7 16:58:38 2014: [PE_37]: cpumask set to 1 cpu on nid02837, cpumask = 000000000000000000000000000000000010000000000000
Tue Oct 7 16:58:38 2014: [PE_0]: cpumask set to 1 cpu on nid02836, cpumask = 000000000000000000000000000000000000000000000001
Tue Oct 7 16:58:38 2014: [PE_9]: cpumask set to 1 cpu on nid02836, cpumask = 000000000000000000000000000000000000001000000000
Tue Oct 7 16:58:38 2014: [PE_1]: cpumask set to 1 cpu on nid02836, cpumask = 000000000000000000000000000000000000000000000010
Traceback (most recent call last):
File "driver.py", line 123, in <module>
param_grid['ref_count_coarse'])
File "/work/n02/n02/eike/firedrake/firedrake/mesh.py", line 1141, in __init__
super(UnitIcosahedralSphereMesh, self).__init__(1, refinement_level, reorder
=reorder) File "/work/n02/n02/eike/firedrake/firedrake/mesh.py", line 1131, in __init__
super(IcosahedralSphereMesh, self).__init__(self.name, plex=plex, dim=3, reorder=reorder) File "<string>", line 2, in __init__ File "/work/y07/y07/fdrake/PyOP2/lib/python2.7/site-packages/PyOP2-0.11.0_99_g54eb9ea_dirty-py2.7-linux-x86_64.egg/pyop2/profiling.py", line 197, in wrapper return f(*args, **kwargs) File "/work/n02/n02/eike/firedrake/firedrake/mesh.py", line 245, in __init__ distribute=distribute) File "/work/n02/n02/eike/firedrake/firedrake/mesh.py", line 287, in _from_dmplex dmplex.label_facets(self._plex, label_boundary=label_boundary)
TypeError: label_facets() takes no keyword arguments
#!/bin/bash --login
#PBS -N %(jobname)s
#PBS -l walltime=%(walltime)s:0
#PBS -l select=%(nodes)d
#PBS -A n02-NEJ005576
#PBS -M e.mueller@bath.ac.uk
#PBS -q %(queue)s
# Make sure any symbolic links are resolved to absolute path
#PBS -l select=1
#PBS -A n02-NEJ005576
#PBS -q debug
#PBS -M e.mueller@bath.ac.uk
# Make sure any symbolic links are resolved to absolute path
export PBS_O_WORKDIR=$(readlink -f $PBS_O_WORKDIR)
echo Running in $PBS_O_WORKDIR
cd $PBS_O_WORKDIR
File "driver.py", line 127, in <module>
mesh_hierarchy = MeshHierarchy(coarse_mesh,param_grid['nlevel'])
File "/Users/eikemueller/PostDocBath/EllipticSolvers/firedrake/firedrake/multigrid.py", line 45, in __init__
dmplex.filter_exterior_facet_labels(rdm)
File "dmplex.pyx", line 512, in firedrake.dmplex.filter_exterior_facet_labels (firedrake/dmplex.c:8150)
RuntimeError: 62
def apply(self,phi):
'''Apply operator.
Apply the operator :math:`H` to a field :math:`phi` in a matrix free way by
applying the individual components in turn and return the result :math:`H\phi`.
:arg phi: Pressure field :math:`phi` to apply the operator to
'''
# Calculate action of B
B_phi = assemble(div(self.w)*phi*self.dx)
# divide by lumped velocity mass matrix
mat = PETSc.Mat().create()
mat.setType(mat.Type.PYTHON)
func = Function(self.operator.V_pressure)
nrow = func.dof_dset.size * func.dof_dset.cdim
ncol = func.dof_dset.size * func.dof_dset.cdim
mat.setSizes(((nrow,None),(ncol,None)))
mat.setPythonContext(self.operator)
self.sor = PETSc.PC().create()
self.sor.setType(self.sor.Type.SOR)
self.sor.setOperators(mat)
Traceback (most recent call last):
File "driver.py", line 35, in <module>
hmesh = MeshHierarchy(mesh,refinement_levels)
File "/Users/eikemueller/PostDocBath/EllipticSolvers/firedrake/firedrake/multigrid.py", line 39, in __init__
for i, dm in enumerate(dm_hierarchy)]
File "/Users/eikemueller/PostDocBath/EllipticSolvers/firedrake/firedrake/mesh.py", line 244, in __init__
distribute=distribute)
File "/Users/eikemueller/PostDocBath/EllipticSolvers/firedrake/firedrake/mesh.py", line 341, in _from_dmplex
(self.num_vertices(), geometric_dim))
File "dmplex.pyx", line 506, in firedrake.dmplex.reordered_coords (firedrake/dmplex.c:7958)
w = TestFunction(self.V_velocity)
self.data = Function(self.V_velocity)
SBR_x = Function(self.V_velocity).project(Expression(('0','-x[2]','x[1]')))
SBR_y = Function(self.V_velocity).project(Expression(('x[2]','0','-x[0]')))
SBR_z = Function(self.V_velocity).project(Expression(('-x[1]','x[0]','0')))
M_SBR_x = assemble(dot(w,SBR_x)*dx)
M_SBR_y = assemble(dot(w,SBR_y)*dx)
M_SBR_z = assemble(dot(w,SBR_z)*dx)
kernel_code = '''void lump_SBR(double *data,
double *SBR_x,
from firedrake import *
mesh = UnitIcosahedralSphereMesh(refinement_level=0)
V_u = FunctionSpace(mesh,'RT',1,name='RT1')
phi = Function(V_u)
phi.assign(0.0)
kernel = 'for(int i=0; i<phi.dofs; i++) { phi[i][0] += 1; }'
for facet in (ds,dS):