On the other hand, extra memory is very cheap...

On 22 September 2016 at 17:09, Ham, David A <david.ham@imperial.ac.uk> wrote:
Hi Floriane,

I'm afraid that you're not going to be able to run very large problems on a machine with only 6G of RAM. You could attempt to shut down running processes to free more memory, but in reality you're really just asking too much of your hardware. Similarly, tweaking preconditioners to reduce memory usage might help a bit, but you're still going to be very close to the line.

Regards,

David

On Thu, 22 Sep 2016 at 16:55 Floriane Gidel [RPG] <mmfg@leeds.ac.uk> wrote:

Dear David,


Indeed, I have less than 5G memory available:

MemTotal:        5941348 kB
MemFree:         1429500 kB
MemAvailable:    2994648 kB

Is there a way for me to free some memory?

Thank you,
Floriane


Envoyé : jeudi 22 septembre 2016 16:30:14

À : firedrake
Objet : Re: [firedrake] (no subject)
Dear Floriane,

I've run your code and it runs without error on current master for me. Looking at your last error message, it appears that you have run out of memory. How much memory does your machine have? For me, that problem peaks at a bit over 5G of memory.

If that is the problem, there may be solver options we can set which might use less memory, or perhaps you need a larger machine.

As an aside, running that problem in parallel is effective. On 8 processors I get about a 3x speedup.

Regards,

David



On Thu, 22 Sep 2016 at 14:56 Floriane Gidel [RPG] <mmfg@leeds.ac.uk> wrote:

Dear David,


Sorry about that. You should be able to access my code on that link: https://bitbucket.org/Floriane_Gidel/test_bl .


Thank you,
Floriane



Envoyé : jeudi 22 septembre 2016 10:32:07

À : firedrake
Objet : Re: [firedrake] (no subject)
Hi Floriane,

Sorry for taking a couple of days to get on to this. Unfortunately those files are not attached, they are on a University of Leeds sharepoint which my Imperial microsoft account cannot access. Could you please provide the files via an open route.

Thanks,

David

On Tue, 20 Sep 2016 at 11:14 Floriane Gidel [RPG] <mmfg@leeds.ac.uk> wrote:
Floriane Gidel [RPG] a partagé des fichiers OneDrive Entreprise avec vous. Pour les afficher, cliquez sur les liens ci-dessous.

Dear David,


Attached is the "short" piece of code (BL.py), together with the mesh file (horizontal.msh). When running it, I get the error below. However, if I remove the weak formulations for eta(n+1) and phi(n+1) and solve only phi_solver_half and q_solver_half, then the error is for the line q_solver_half.solve(). If I also remove the solver for q_half and keeps only phi_solver_half, then it works. 

Thank you,

Floriane


Traceback (most recent call last):
  File "BL.py", line 69, in <module>
    phi_solver_half.solve()
  File "/home/fgidel/firedrake/lib/python2.7/site-packages/firedrake/variational_solver.py", line 198, in solve

    self.snes.solve(None, v)
  File "PETSc/SNES.pyx", line 537, in petsc4py.PETSc.SNES.solve (src/petsc4py.PETSc.c:170168)
  File "PETSc/petscsnes.pxi", line 294, in petsc4py.PETSc.SNES_Jacobian (src/petsc4py.PETSc.c:33847)
  File "/home/fgidel/firedrake/lib/python2.7/site-packages/firedrake/solving_utils.py", line 261, in form_jacobian
    ctx._jacs[lvl].force_evaluation()
  File "/home/fgidel/firedrake/lib/python2.7/site-packages/firedrake/matrix.py", line 248, in force_evaluation
    self.assemble()
  File "<decorator-gen-283>", line 2, in assemble

  File "/home/fgidel/firedrake/lib/python2.7/site-packages/firedrake/utils.py", line 62, in wrapper
    return f(*args, **kwargs)
  File "/home/fgidel/firedrake/lib/python2.7/site-packages/firedrake/matrix.py", line 191, in assemble
    self._assembly_callback(self.bcs)
  File "/home/fgidel/firedrake/lib/python2.7/site-packages/firedrake/assembly_cache.py", line 357, in inner
    r = thunk(bcs)
  File "/home/fgidel/firedrake/lib/python2.7/site-packages/firedrake/assemble.py", line 279, in thunk
    zero_tensor()
  File "/home/fgidel/firedrake/lib/python2.7/site-packages/firedrake/assemble.py", line 219, in <lambda>
    zero_tensor = lambda: tensor.zero()
  File "<decorator-gen-300>", line 2, in zero
  File "/home/fgidel/firedrake/lib/python2.7/site-packages/pyop2/versioning.py", line 126, in zeroes
    _force_copies(self)
  File "/home/fgidel/firedrake/lib/python2.7/site-packages/pyop2/versioning.py", line 104, in _force_copies
    c._cow_actual_copy(obj)
  File "/home/fgidel/firedrake/lib/python2.7/site-packages/pyop2/petsc_base.py", line 687, in _cow_actual_copy
    self.handle = src.handle.duplicate(copy=True)
  File "PETSc/Mat.pyx", line 617, in petsc4py.PETSc.Mat.duplicate (src/petsc4py.PETSc.c:119330)
petsc4py.PETSc.Error: error code 1
[0] SNESSolve() line 4060 in /tmp/pip-xbPEGV-build/src/snes/interface/snes.c
[0] SNESSolve_NEWTONLS() line 228 in /tmp/pip-xbPEGV-build/src/snes/impls/ls/ls.c
[0] SNESComputeJacobian() line 2365 in /tmp/pip-xbPEGV-build/src/snes/interface/snes.c
[0] MatDuplicate() line 4389 in /tmp/pip-xbPEGV-build/src/mat/interface/matrix.c
[0] MatDuplicate_SeqAIJ() line 4126 in /tmp/pip-xbPEGV-build/src/mat/impls/aij/seq/aij.c
[0] MatDuplicateNoCreate_SeqAIJ() line 4053 in /tmp/pip-xbPEGV-build/src/mat/impls/aij/seq/aij.c
[0] MatDuplicateNoCreate_SeqAIJ() line 4053 in /tmp/pip-xbPEGV-build/src/mat/impls/aij/seq/aij.c
[0] Out of memory. Allocated: 0, Used by process: 3556626432
[0] Memory requested 422967946



De : firedrake-bounces@imperial.ac.uk <firedrake-bounces@imperial.ac.uk> de la part de David Ham <David.Ham@imperial.ac.uk>
Envoyé : mardi 20 septembre 2016 10:13:20

À : firedrake
Objet : Re: [firedrake] (no subject)
Dear Floriane,

Please provide a minimal failing example so we can see what is going on. By a minimal failing example, we mean that you remove everything from the example that is not related to the failure. Often this requires some trial and error. The objective is to produce a very short piece of code which illustrates the problem so that we can (a) check if we can reproduce it and if so (b) find the problem easily.

Regards,

David

On Tue, 20 Sep 2016 at 09:46 Floriane Gidel [RPG] <mmfg@leeds.ac.uk> wrote:

Dear all,


Some of my codes do not work either since I updated firedrake. I have run firedrake-clean but still have the same error when calling the nonlinear solvers. The error is pasted below.

Any idea of what I could do ?

Thanks,

Floriane



Traceback (most recent call last):
  File "3D_NL.py", line 232, in <module>
    wf1_solver = NonlinearVariationalSolver(wf1_problem)
  File "/home/fgidel/firedrake/lib/python2.7/site-packages/firedrake/variational_solver.py", line 137, in __init__
    appctx=appctx)
  File "/home/fgidel/firedrake/lib/python2.7/site-packages/firedrake/solving_utils.py", line 138, in __init__
    for J, problem, ctx in zip(self.Js, problems, appctxs))
  File "/home/fgidel/firedrake/lib/python2.7/site-packages/firedrake/solving_utils.py", line 138, in <genexpr>
    for J, problem, ctx in zip(self.Js, problems, appctxs))
  File "/home/fgidel/firedrake/lib/python2.7/site-packages/firedrake/assemble.py", line 81, in assemble

    inverse=inverse, mat_type=mat_type, appctx=appctx)
  File "<decorator-gen-295>", line 2, in _assemble
  File "/home/fgidel/firedrake/lib/python2.7/site-packages/firedrake/utils.py", line 62, in wrapper
    return f(*args, **kwargs)
  File "/home/fgidel/firedrake/lib/python2.7/site-packages/firedrake/assemble.py", line 120, in _assemble
    inverse=inverse)
  File "/home/fgidel/firedrake/lib/python2.7/site-packages/firedrake/tsfc_interface.py", line 189, in compile_form
    number_map).kernels
  File "/home/fgidel/firedrake/lib/python2.7/site-packages/pyop2/caching.py", line 198, in __new__
    obj = make_obj()
  File "/home/fgidel/firedrake/lib/python2.7/site-packages/pyop2/caching.py", line 188, in make_obj
    obj.__init__(*args, **kwargs)
  File "/home/fgidel/firedrake/lib/python2.7/site-packages/firedrake/tsfc_interface.py", line 119, in __init__
    kernels.append(KernelInfo(kernel=Kernel(ast, ast.name, opts=opts),
  File "/home/fgidel/firedrake/lib/python2.7/site-packages/pyop2/backends.py", line 118, in __call__
    return t(*args, **kwargs)
  File "/home/fgidel/firedrake/lib/python2.7/site-packages/pyop2/caching.py", line 198, in __new__
    obj = make_obj()
  File "/home/fgidel/firedrake/lib/python2.7/site-packages/pyop2/caching.py", line 188, in make_obj
    obj.__init__(*args, **kwargs)
  File "/home/fgidel/firedrake/lib/python2.7/site-packages/pyop2/base.py", line 3778, in __init__
    self._code = self._ast_to_c(self._ast, opts)
  File "/home/fgidel/firedrake/lib/python2.7/site-packages/pyop2/host.py", line 60, in _ast_to_c
    ast_handler.plan_cpu(self._opts)
  File "/home/fgidel/firedrake/lib/python2.7/site-packages/coffee/plan.py", line 119, in plan_cpu
    loop_opt.rewrite(rewrite)
  File "/home/fgidel/firedrake/lib/python2.7/site-packages/coffee/optimizer.py", line 142, in rewrite
    merged_loops = SSALoopMerger(self.expr_graph).merge(self.header)
  File "/home/fgidel/firedrake/lib/python2.7/site-packages/coffee/scheduler.py", line 181, in merge
    merged, l_dims, m_dims = self._merge_loops(parent, l, merging_in)
  File "/home/fgidel/firedrake/lib/python2.7/site-packages/coffee/scheduler.py", line 74, in _merge_loops
    while isinstance(loop_b.children[0], (Block, For)):
IndexError: list index out of range
Exception AttributeError: "'NonlinearVariationalSolver' object has no attribute '_parameters'" in <bound method NonlinearVariationalSolver.__del__ of <firedrake.variational_solver.NonlinearVariationalSolver object at 0x595a250>> ignored


De : firedrake-bounces@imperial.ac.uk <firedrake-bounces@imperial.ac.uk> de la part de Fabio Luporini <f.luporini12@imperial.ac.uk>
Envoyé : jeudi 15 septembre 2016 14:14:44
À : firedrake
Objet : Re: [firedrake] (no subject)
 
Hi Will,

Could you just try a firedrake-clean and run it again ? it should then work

Thanks

-- Fabio

2016-09-15 14:07 GMT+02:00 William Booker <scwb@leeds.ac.uk>:

Hi firedrakers,

I had this script working on an older version of firedrake (24th Aug), but when I updated today I now get the following error when I try to run it:
 
Traceback (most recent call last):
  File "compressible_stratified.py", line 77, in <module>
    solve ( a_u_project == L_u_project , dHdu0 , solver_parameters={'ksp_rtol': 1e-14} )
  File "/usr/not-backed-up/firedrake/2016-09-15/firedrake/lib/python2.7/site-packages/firedrake/solving.py", line 119, in solve
    _solve_varproblem(*args, **kwargs)
  File "/usr/not-backed-up/firedrake/2016-09-15/firedrake/lib/python2.7/site-packages/firedrake/solving.py", line 147, in _solve_varproblem
    solver.solve()
  File "/usr/not-backed-up/firedrake/2016-09-15/firedrake/lib/python2.7/site-packages/firedrake/variational_solver.py", line 198, in solve
    self.snes.solve(None, v)
  File "PETSc/SNES.pyx", line 537, in petsc4py.PETSc.SNES.solve (src/petsc4py.PETSc.c:170168)
  File "PETSc/petscsnes.pxi", line 261, in petsc4py.PETSc.SNES_Function (src/petsc4py.PETSc.c:33322)
  File "/usr/not-backed-up/firedrake/2016-09-15/firedrake/lib/python2.7/site-packages/firedrake/solving_utils.py", line 216, in form_function
    form_compiler_parameters=problem.form_compiler_parameters)
  File "/usr/not-backed-up/firedrake/2016-09-15/firedrake/lib/python2.7/site-packages/firedrake/assemble.py", line 81, in assemble
    inverse=inverse, mat_type=mat_type, appctx=appctx)
  File "<decorator-gen-295>", line 2, in _assemble
  File "/usr/not-backed-up/firedrake/2016-09-15/firedrake/lib/python2.7/site-packages/firedrake/utils.py", line 62, in wrapper
    return f(*args, **kwargs)
  File "/usr/not-backed-up/firedrake/2016-09-15/firedrake/lib/python2.7/site-packages/firedrake/assemble.py", line 444, in _assemble
    return thunk(bcs)
  File "/usr/not-backed-up/firedrake/2016-09-15/firedrake/lib/python2.7/site-packages/firedrake/assembly_cache.py", line 357, in inner
    r = thunk(bcs)
  File "/usr/not-backed-up/firedrake/2016-09-15/firedrake/lib/python2.7/site-packages/firedrake/assemble.py", line 394, in thunk
    op2.par_loop(*args, **kwargs)
  File "<decorator-gen-269>", line 2, in par_loop
  File "/usr/not-backed-up/firedrake/2016-09-15/firedrake/lib/python2.7/site-packages/pyop2/versioning.py", line 154, in modifies_arguments
    retval = func(*args, **kwargs)
  File "/usr/not-backed-up/firedrake/2016-09-15/firedrake/lib/python2.7/site-packages/pyop2/op2.py", line 269, in par_loop
    return backends._BackendSelector._backend.par_loop(kernel, iterset, *args, **kwargs)
  File "/usr/not-backed-up/firedrake/2016-09-15/firedrake/lib/python2.7/site-packages/pyop2/base.py", line 4369, in par_loop
    return _make_object('ParLoop', kernel, it_space, *args, **kwargs).enqueue()
  File "/usr/not-backed-up/firedrake/2016-09-15/firedrake/lib/python2.7/site-packages/pyop2/backends.py", line 72, in _make_object
    return _BackendSelector._backend.__dict__[obj](*args, **kwargs)
  File "<decorator-gen-262>", line 2, in __init__
  File "/usr/not-backed-up/firedrake/2016-09-15/firedrake/lib/python2.7/site-packages/pyop2/utils.py", line 130, in wrapper
    return f(*args, **kwargs)
  File "/usr/not-backed-up/firedrake/2016-09-15/firedrake/lib/python2.7/site-packages/pyop2/base.py", line 3999, in __init__
    fundecl = kernel._attached_info['fundecl']
TypeError: 'bool' object has no attribute '__getitem__'


What needs to be changed to get it to compile again?

Thanks 
Will


 





--
http://www.imperial.ac.uk/people/colin.cotter

www.cambridge.org/9781107663916