This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

RANS-models (cbc.pdesys) demos "instant.recompile" problem for new installation

0 votes

Hi,

I am new to fenics (latest 1.4) and just trying to work with demo's. I have also installed the CBC.PDESYS application from launchpad.

I am having trouble even when trying to execute the demo turbulent_channel.py inside /cbc/cfd/ransmodels/. I get the following error (I have attached two links for the different outputs in concern)

In instant.recompile: The module did not compile with command 'make VERBOSE=1', see 
'/home/doom/.instant/error/dolfin_compile_code_5c477b54fbffad56c7b98b0312cc85d0/
compile.log'

Python Error output
Compiler.log

I have so far tried:

 instant-clean and re-run turbulent_channel.py

 Re-installing fenics with dorsal

I am not sure if the code is correct because, many of the demo applications are not updated
and continue to use some deprecated terms as per dolfin (1.4).

Anyways, can anyone please let me know if they have found any solution for such a problem. ??

asked Jun 30, 2014 by kipintouch FEniCS Novice (270 points)

1 Answer

+1 vote

Hi, the error you get is coming from compilation of C++ code in /cbc/cfd/tools/Wall.py, specifically

code = \
"""
#include "dolfin.h"

namespace dolfin{

void allow_nonzero_allocation(GenericMatrix* A)
{
  #ifdef HAS_PETSC
  if (A && has_type<PETScMatrix>(*A))
  {
    PETScMatrix& petsc_A = A->down_cast<PETScMatrix>();
    MatSetOption(*petsc_A.mat(), MAT_NEW_NONZERO_ALLOCATION_ERR, PETSC_FALSE);
  }
  #endif
}
}
"""
compiled_module = compile_extension_module(code=code)

Method petsc_A.mat() now returns a pointer so the code should be modified into

MatSetOption(petsc_A.mat(), MAT_NEW_NONZERO_ALLOCATION_ERR, PETSC_FALSE);  
answered Jul 2, 2014 by MiroK FEniCS Expert (80,920 points)
...