problem with new installation
Hi,
Today I made a fresh unstable installation of fenics using dorsal. I cleaned out all the old garbage like I use to and typed dorsal.sh in the terminal. It ran through the entire installation with no problems. However, no my dolfin seems to be broken? Could anyone else with a newly installed dolfin from trunk try the following code and see if there's weirdness?
from dolfin import *
mesh = UnitSquare(4, 4)
V = VectorFunctionS
Q = FunctionSpace(mesh, 'CG', 1)
bc1 = DirichletBC(V, (1., 0.), "std::abs(x[1] - 1.) < DOLFIN_EPS && on_boundary")
bc2 = DirichletBC(Q, (1.), "std::abs(x[1] - 1.) < DOLFIN_EPS && on_boundary")
u_ = Function(V)
p_ = Function(Q)
bc1.apply(
bc2.apply(
plot(u_)
plot(p_)
interactive()
The dirichlet condition is not applied only to the dofs on the top at x[1] = 1. The condition is actually applied to 6 dofs, not 4, and not only on the top. Does anyone else get this? I've really made an effort to clean out all previous stuff, even in .bashrc, before making the new install.
Mikael
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- DOLFIN Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Revision history for this message
|
#1 |
On Thu, Nov 24, 2011 at 09:11:04AM -0000, Mikael Mortensen wrote:
> New question #179849 on DOLFIN:
> https:/
>
> Hi,
>
> Today I made a fresh unstable installation of fenics using dorsal. I cleaned out all the old garbage like I use to and typed dorsal.sh in the terminal. It ran through the entire installation with no problems. However, no my dolfin seems to be broken? Could anyone else with a newly installed dolfin from trunk try the following code and see if there's weirdness?
>
> from dolfin import *
>
> mesh = UnitSquare(4, 4)
> V = VectorFunctionS
> Q = FunctionSpace(mesh, 'CG', 1)
> bc1 = DirichletBC(V, (1., 0.), "std::abs(x[1] - 1.) < DOLFIN_EPS && on_boundary")
> bc2 = DirichletBC(Q, (1.), "std::abs(x[1] - 1.) < DOLFIN_EPS && on_boundary")
> u_ = Function(V)
> p_ = Function(Q)
> bc1.apply(
> bc2.apply(
> plot(u_)
> plot(p_)
> interactive()
>
> The dirichlet condition is not applied only to the dofs on the top at x[1] = 1. The condition is actually applied to 6 dofs, not 4, and not only on the top. Does anyone else get this? I've really made an effort to clean out all previous stuff, even in .bashrc, before making the new install.
>
> Mikael
Works fine or me.
instant-clean?
--
Anders
Revision history for this message
|
#2 |
Brief update. Reverting dolfin to -r 6450 and the error is still there,
reverting to 6430 and the problem goes away. Seems to me like a bug?
Mikael
On 24 November 2011 10:11, Mikael Mortensen <
<email address hidden>> wrote:
> New question #179849 on DOLFIN:
> https:/
>
> Hi,
>
> Today I made a fresh unstable installation of fenics using dorsal. I
> cleaned out all the old garbage like I use to and typed dorsal.sh in the
> terminal. It ran through the entire installation with no problems. However,
> no my dolfin seems to be broken? Could anyone else with a newly installed
> dolfin from trunk try the following code and see if there's weirdness?
>
> from dolfin import *
>
> mesh = UnitSquare(4, 4)
> V = VectorFunctionS
> Q = FunctionSpace(mesh, 'CG', 1)
> bc1 = DirichletBC(V, (1., 0.), "std::abs(x[1] - 1.) < DOLFIN_EPS &&
> on_boundary")
> bc2 = DirichletBC(Q, (1.), "std::abs(x[1] - 1.) < DOLFIN_EPS &&
> on_boundary")
> u_ = Function(V)
> p_ = Function(Q)
> bc1.apply(
> bc2.apply(
> plot(u_)
> plot(p_)
> interactive()
>
> The dirichlet condition is not applied only to the dofs on the top at x[1]
> = 1. The condition is actually applied to 6 dofs, not 4, and not only on
> the top. Does anyone else get this? I've really made an effort to clean out
> all previous stuff, even in .bashrc, before making the new install.
>
> Mikael
>
>
>
>
>
> --
> You received this question notification because you asked the question.
>
Revision history for this message
|
#3 |
I'm not sure what to look for but this is what I get with DOLFIN revision 6466 (from the fenics-dev PPA):
http://
http://
Revision history for this message
|
#4 |
On Thu, Nov 24, 2011 at 10:41:11AM -0000, Johannes Ring wrote:
> Question #179849 on DOLFIN changed:
> https:/
>
> Johannes Ring posted a new comment:
> I'm not sure what to look for but this is what I get with DOLFIN
> revision 6466 (from the fenics-dev PPA):
>
> http://
> http://
Same as I get.
--
Anders
Revision history for this message
|
#5 |
That's exactly the plots I get with dolfin revision 6430. Here are the
plots I get from 6450 though. And I've done instant-clean. But if I'm the
only one with this problem I'll investigate some more before filing a bug
report. Has anyone tried a completely fresh install of everything?
M
On 24 November 2011 12:15, Anders Logg <<email address hidden>
> wrote:
> Your question #179849 on DOLFIN changed:
> https:/
>
> Status: Open => Answered
>
> Anders Logg proposed the following answer:
> On Thu, Nov 24, 2011 at 10:41:11AM -0000, Johannes Ring wrote:
> > Question #179849 on DOLFIN changed:
> > https:/
> >
> > Johannes Ring posted a new comment:
> > I'm not sure what to look for but this is what I get with DOLFIN
> > revision 6466 (from the fenics-dev PPA):
> >
> > http://
> > http://
>
> Same as I get.
>
> --
> Anders
>
> --
> If this answers your question, please go to the following page to let us
> know that it is solved:
> https:/
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https:/
>
> You received this question notification because you asked the question.
>
Revision history for this message
|
#6 |
Does it work for you with revision 6449? Try to figure out in which revision this fails and run bzr diff to see the difference between this and the working revision (for instance bzr diff -r 6449..6450).
It works for me both on Ubuntu 10.04 and 11.10 but that is with the binary packages built from trunk, not by Dorsal.
Revision history for this message
|
#7 |
I'll look into it, but it will probably take some time.
M
On 24 November 2011 14:35, Johannes Ring <
<email address hidden>> wrote:
> Your question #179849 on DOLFIN changed:
> https:/
>
> Johannes Ring posted a new comment:
> Does it work for you with revision 6449? Try to figure out in which
> revision this fails and run bzr diff to see the difference between this
> and the working revision (for instance bzr diff -r 6449..6450).
>
> It works for me both on Ubuntu 10.04 and 11.10 but that is with the
> binary packages built from trunk, not by Dorsal.
>
> --
> You received this question notification because you asked the question.
>
Revision history for this message
|
#8 |
Last revision that works for me is 6446. It looks from the diff between
6446 and 6447 that mainly assert is changed to dolfin_assert. Could that be
significant here?
M
On 24 November 2011 15:01, Mikael Mortensen <
<email address hidden>> wrote:
> Your question #179849 on DOLFIN changed:
> https:/
>
> You gave more information on the question:
> I'll look into it, but it will probably take some time.
>
> M
>
> On 24 November 2011 14:35, Johannes Ring <
> <email address hidden>> wrote:
>
> > Your question #179849 on DOLFIN changed:
> > https:/
> >
> > Johannes Ring posted a new comment:
> > Does it work for you with revision 6449? Try to figure out in which
> > revision this fails and run bzr diff to see the difference between this
> > and the working revision (for instance bzr diff -r 6449..6450).
> >
> > It works for me both on Ubuntu 10.04 and 11.10 but that is with the
> > binary packages built from trunk, not by Dorsal.
> >
> > --
> > You received this question notification because you asked the question.
> >
>
> --
> You received this question notification because you asked the question.
>
Revision history for this message
|
#9 |
Ideas:
Try building dolfin with and without whatever flag turns off dolfin_assert.
Look for assert calls with side effects.
Revision history for this message
|
#10 |
On Thu, Nov 24, 2011 at 04:10:57PM -0000, Martin Sandve Alnæs wrote:
> Question #179849 on DOLFIN changed:
> https:/
>
> Martin Sandve Alnæs posted a new comment:
> Ideas:
>
> Try building dolfin with and without whatever flag turns off
> dolfin_assert.
It's the DEBUG flag.
> Look for assert calls with side effects.
Sounds like a difficult task. My suggestion would be to print stuff
from within dolfin/
wrong.
--
Anders
Revision history for this message
|
#11 |
Hi,
My problems disappear when I modify log.h like this:
// Assertion, only active if DEBUG is defined
//#ifdef DEBUG
#define dolfin_
do { \
if (!(check)) \
{ \
dolfin:
\
} \
} while (false)
//#else
//#define dolfin_
//#endif
What's actually the procedure for compiling dolfin with the DEBUG flag?
CMAKE_CXX_FLAGS?
Mikael
On 24 November 2011 18:01, Anders Logg <<email address hidden>
> wrote:
> Your question #179849 on DOLFIN changed:
> https:/
>
> Status: Open => Answered
>
> Anders Logg proposed the following answer:
> On Thu, Nov 24, 2011 at 04:10:57PM -0000, Martin Sandve Alnæs wrote:
> > Question #179849 on DOLFIN changed:
> > https:/
> >
> > Martin Sandve Alnæs posted a new comment:
> > Ideas:
> >
> > Try building dolfin with and without whatever flag turns off
> > dolfin_assert.
>
> It's the DEBUG flag.
>
> > Look for assert calls with side effects.
>
> Sounds like a difficult task. My suggestion would be to print stuff
> from within dolfin/
> wrong.
>
> --
> Anders
>
> --
> If this answers your question, please go to the following page to let us
> know that it is solved:
> https:/
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https:/
>
> You received this question notification because you asked the question.
>
Revision history for this message
|
#12 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 11/25/2011 06:25 PM, Mikael Mortensen wrote:
> Question #179849 on DOLFIN changed:
> https:/
>
> Status: Answered => Open
>
> Mikael Mortensen is still having a problem: Hi,
>
> My problems disappear when I modify log.h like this:
>
> // Assertion, only active if DEBUG is defined //#ifdef DEBUG
> #define dolfin_
> dolfin:
> \ } \ } while (false) //#else //#define dolfin_
> //#endif
>
> What's actually the procedure for compiling dolfin with the DEBUG
> flag? CMAKE_CXX_FLAGS?
It should be something like
cmake -DCMAKE_
when you run the cmake configuring process. It sets the proper debug
flags among them -DDEBUG.
HTH
- --
Andre
>
> Mikael
>
> On 24 November 2011 18:01, Anders Logg
> <<email address hidden>
>> wrote:
>
>> Your question #179849 on DOLFIN changed:
>> https:/
>>
>> Status: Open => Answered
>>
>> Anders Logg proposed the following answer: On Thu, Nov 24, 2011
>> at 04:10:57PM -0000, Martin Sandve Alnæs wrote:
>>> Question #179849 on DOLFIN changed:
>>> https:/
>>>
>>> Martin Sandve Alnæs posted a new comment: Ideas:
>>>
>>> Try building dolfin with and without whatever flag turns off
>>> dolfin_assert.
>>
>> It's the DEBUG flag.
>>
>>> Look for assert calls with side effects.
>>
>> Sounds like a difficult task. My suggestion would be to print
>> stuff from within dolfin/
>> what goes wrong.
>>
>> -- Anders
>>
>> -- If this answers your question, please go to the following page
>> to let us know that it is solved:
>> https:/
>>
>>
>>
If you still need help, you can reply to this email or go to the
>> following page to enter your feedback:
>> https:/
>>
>> You received this question notification because you asked the
>> question.
>>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://
iQEcBAEBAgAGBQJ
eR4xYNmaHFFYwnr
3xPwAsgL84MLP9A
6bLfoVpft1cI96D
DJgAm3OZTr8oWge
cQKOK9sgY1m0N/
=71x7
-----END PGP SIGNATURE-----
Revision history for this message
|
#13 |
Then it looks like you are building DOLFIN *without* the DEBUG flag
and the macro is not correctly defined in the #else case.
So something goes wrong with this macro somewhere in the code:
#define dolfin_
Does it help if you change back to how they were and then replace the
above line with
#define dolfin_
?
--
Anders
On Fri, Nov 25, 2011 at 05:25:44PM -0000, Mikael Mortensen wrote:
> Question #179849 on DOLFIN changed:
> https:/
>
> Status: Answered => Open
>
> Mikael Mortensen is still having a problem:
> Hi,
>
> My problems disappear when I modify log.h like this:
>
> // Assertion, only active if DEBUG is defined
> //#ifdef DEBUG
> #define dolfin_
> do { \
> if (!(check)) \
> { \
> dolfin:
> \
> } \
> } while (false)
> //#else
> //#define dolfin_
> //#endif
>
> What's actually the procedure for compiling dolfin with the DEBUG flag?
> CMAKE_CXX_FLAGS?
>
> Mikael
>
> On 24 November 2011 18:01, Anders Logg <<email address hidden>
> > wrote:
>
> > Your question #179849 on DOLFIN changed:
> > https:/
> >
> > Status: Open => Answered
> >
> > Anders Logg proposed the following answer:
> > On Thu, Nov 24, 2011 at 04:10:57PM -0000, Martin Sandve Alnæs wrote:
> > > Question #179849 on DOLFIN changed:
> > > https:/
> > >
> > > Martin Sandve Alnæs posted a new comment:
> > > Ideas:
> > >
> > > Try building dolfin with and without whatever flag turns off
> > > dolfin_assert.
> >
> > It's the DEBUG flag.
> >
> > > Look for assert calls with side effects.
> >
> > Sounds like a difficult task. My suggestion would be to print stuff
> > from within dolfin/
> > wrong.
> >
> >
> >
> > If you still need help, you can reply to this email or go to the
> > following page to enter your feedback:
> > https:/
> >
> > You received this question notification because you asked the question.
> >
>
Revision history for this message
|
#14 |
On 25 November 2011 19:45, Anders Logg <<email address hidden>
> wrote:
> Your question #179849 on DOLFIN changed:
> https:/
>
> Anders Logg proposed the following answer:
> Then it looks like you are building DOLFIN *without* the DEBUG flag
> and the macro is not correctly defined in the #else case.
>
> So something goes wrong with this macro somewhere in the code:
>
> #define dolfin_
>
> Does it help if you change back to how they were and then replace the
> above line with
>
> #define dolfin_
>
Nope, this does not help. (Can't believe I'm still the only one with this
problem)
M
>
> ?
>
> --
> Anders
>
>
> On Fri, Nov 25, 2011 at 05:25:44PM -0000, Mikael Mortensen wrote:
> > Question #179849 on DOLFIN changed:
> > https:/
> >
> > Status: Answered => Open
> >
> > Mikael Mortensen is still having a problem:
> > Hi,
> >
> > My problems disappear when I modify log.h like this:
> >
> > // Assertion, only active if DEBUG is defined
> > //#ifdef DEBUG
> > #define dolfin_
> > do { \
> > if (!(check)) \
> > { \
> > dolfin:
> > \
> > } \
> > } while (false)
> > //#else
> > //#define dolfin_
> > //#endif
> >
> > What's actually the procedure for compiling dolfin with the DEBUG flag?
> > CMAKE_CXX_FLAGS?
> >
> > Mikael
> >
> > On 24 November 2011 18:01, Anders Logg <
> <email address hidden>
> > > wrote:
> >
> > > Your question #179849 on DOLFIN changed:
> > > https:/
> > >
> > > Status: Open => Answered
> > >
> > > Anders Logg proposed the following answer:
> > > On Thu, Nov 24, 2011 at 04:10:57PM -0000, Martin Sandve Alnæs wrote:
> > > > Question #179849 on DOLFIN changed:
> > > > https:/
> > > >
> > > > Martin Sandve Alnæs posted a new comment:
> > > > Ideas:
> > > >
> > > > Try building dolfin with and without whatever flag turns off
> > > > dolfin_assert.
> > >
> > > It's the DEBUG flag.
> > >
> > > > Look for assert calls with side effects.
> > >
> > > Sounds like a difficult task. My suggestion would be to print stuff
> > > from within dolfin/
> > > wrong.
> > >
> > >
> > >
> > > If you still need help, you can reply to this email or go to the
> > > following page to enter your feedback:
> > > https:/
> > >
> > > You received this question notification because you asked the question.
> > >
> >
>
> --
> If this answers your question, please go to the following page to let us
> know that it is solved:
> https:/
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https:/
>
> You received this question notification because you asked the question.
>
Revision history for this message
|
#15 |
On Fri, Nov 25, 2011 at 06:45:48PM -0000, Anders Logg wrote:
> Question #179849 on DOLFIN changed:
> https:/
>
> Anders Logg proposed the following answer:
> Then it looks like you are building DOLFIN *without* the DEBUG flag
> and the macro is not correctly defined in the #else case.
>
> So something goes wrong with this macro somewhere in the code:
>
> #define dolfin_
>
> Does it help if you change back to how they were and then replace the
> above line with
>
> #define dolfin_
>
> ?
Very strange...
I just rebuilt DOLFIN without -DDEBUG (setting CMAKE_BUILD_TYPE to
Release and verifying using make VERBOSE=1 that the -DDEBUG option is
not present) but it still works fine here.
Is anyone else seeing this?
--
Anders
Revision history for this message
|
#16 |
Looks like an optimization error. I reduced the optimization flag to -O1
and the problem is gone, even without the DEBUG flag. With -O2 the problem
returns.
M
On 26 November 2011 10:31, Anders Logg <<email address hidden>
> wrote:
> Your question #179849 on DOLFIN changed:
> https:/
>
> Status: Open => Answered
>
> Anders Logg proposed the following answer:
> On Fri, Nov 25, 2011 at 06:45:48PM -0000, Anders Logg wrote:
> > Question #179849 on DOLFIN changed:
> > https:/
> >
> > Anders Logg proposed the following answer:
> > Then it looks like you are building DOLFIN *without* the DEBUG flag
> > and the macro is not correctly defined in the #else case.
> >
> > So something goes wrong with this macro somewhere in the code:
> >
> > #define dolfin_
> >
> > Does it help if you change back to how they were and then replace the
> > above line with
> >
> > #define dolfin_
> >
> > ?
>
> Very strange...
>
> I just rebuilt DOLFIN without -DDEBUG (setting CMAKE_BUILD_TYPE to
> Release and verifying using make VERBOSE=1 that the -DDEBUG option is
> not present) but it still works fine here.
>
> Is anyone else seeing this?
>
> --
> Anders
>
> --
> If this answers your question, please go to the following page to let us
> know that it is solved:
> https:/
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https:/
>
> You received this question notification because you asked the question.
>
Revision history for this message
|
#17 |
It works fine for me also with optimization. I'm setting the CMake
build type to Release which removes the DEBUG flag and sets -O3.
Here are the flags I'm using:
cd /home/logg/
/usr/bin/c++ -Ddo\
lfin_EXPORTS -DBOOST_
-DHAS_PETSC -DHAS_\
UMFPACK -DHAS_CHOLMOD -DHAS_SCOTCH -DHAS_PARMETIS -DHAS_CGAL
-DHAS_ZLIB -DHAS_C\
PPUNIT -DHAS_MPI -DMPICH_
-DDOLFIN_
1+\" -frounding-math -fopenmp -O3 -DNDEBUG -fPIC
-I/home/
in/1.0.x-logg -I/usr/
-I/home/
e/logg/
-I/usr/lib/o\
penmpi/include -I/usr/
-I/usr/
/usr/include/scotch -I/usr/
CMakeFiles/
ty/adapt.cpp.o -c
/home/logg/
apt.cpp
--
Anders
On Sat, Nov 26, 2011 at 12:50:48PM -0000, Mikael Mortensen wrote:
> Question #179849 on DOLFIN changed:
> https:/
>
> Status: Answered => Open
>
> Mikael Mortensen is still having a problem:
> Looks like an optimization error. I reduced the optimization flag to -O1
> and the problem is gone, even without the DEBUG flag. With -O2 the problem
> returns.
>
> M
>
> On 26 November 2011 10:31, Anders Logg <<email address hidden>
> > wrote:
>
> > Your question #179849 on DOLFIN changed:
> > https:/
> >
> > Status: Open => Answered
> >
> > Anders Logg proposed the following answer:
> > On Fri, Nov 25, 2011 at 06:45:48PM -0000, Anders Logg wrote:
> > > Question #179849 on DOLFIN changed:
> > > https:/
> > >
> > > Anders Logg proposed the following answer:
> > > Then it looks like you are building DOLFIN *without* the DEBUG flag
> > > and the macro is not correctly defined in the #else case.
> > >
> > > So something goes wrong with this macro somewhere in the code:
> > >
> > > #define dolfin_
> > >
> > > Does it help if you change back to how they were and then replace the
> > > above line with
> > >
> > > #define dolfin_
> > >
> > > ?
> >
> > Very strange...
> >
> > I just rebuilt DOLFIN without -DDEBUG (setting CMAKE_BUILD_TYPE to
> > Release and verifying using make VERBOSE=1 that the -DDEBUG option is
> > not present) but it still works fine here.
> >
> > Is anyone else seeing this?
> >
> >
> >
> > If you still need help, you can reply to this email or go to the
> > following page to enter your feedback:
> > https:/
> >
> > You received this question notification because you asked the question.
> >
>
Revision history for this message
|
#18 |
Can you try printing some stuff from within SubDomain.cpp?
Replace apply_markers in SubDomain.cpp with the following code:
void SubDomain:
{
log(TRACE, "Computing sub domain markers for sub domain %d.",
sub_domain);
// Get the dimension of the entities we are marking
const uint dim = sub_domains.dim();
// Compute facet - cell connectivity if necessary
const uint D = mesh.topology(
if (dim == D - 1)
{
mesh.init(D - 1);
mesh.init(D - 1, D);
}
// Set geometric dimension (needed for SWIG interface)
_geometric_
// Always false when not marking facets
bool on_boundary = false;
// Extract exterior (non shared) facets markers
const MeshFunction<bool>& exterior =
mesh.
// Array for vertex coordinate
Array<double> x;
// Compute sub domain markers
Progress p("Computing sub domain markers", mesh.num_
for (MeshEntityIterator entity(mesh, dim); !entity.end(); ++entity)
{
// Check if entity is on the boundary if entity is a facet
if (dim == D - 1)
{
on_boundary = entity-
}
// Start by assuming all points are inside
bool all_points_inside = true;
cout << "checking entity " << *entity << endl;
// Check all incident vertices if dimension is > 0 (not a vertex)
if (entity->dim() > 0)
{
for (VertexIterator vertex(*entity); !vertex.end(); ++vertex)
{
if (!inside(x, on_boundary))
{
break;
}
}
}
// Check midpoint (works also in the case when we have a single
vertex)
if (all_points_inside)
{
cout << " yes, now checking midpoint" << endl;
x.
if (!inside(x, on_boundary))
}
// Mark entity with all vertices inside
if (all_points_inside)
{
cout << " yes, marking entity " << entity->index() << " as " <<
sub_domain << endl;
sub_
}
p++;
}
}
Also try to reduce the test code to the smallest possible problem that
still gives you the error. For a start, only include the scalar case
and just call sub_domain.mark() with a MeshFunction if that is where
it goes wrong.
--
Anders
On Sat, Nov 26, 2011 at 12:50:48PM -0000, Mikael Mortensen wrote:
> Question #179849 on DOLFIN changed:
> https:/
>
> Status: Answered => Open
>
> Mikael Mortensen is still having a problem:
> Looks like an optimization error. I reduced the optimization flag to -O1
> and the problem is gone, even without the DEBUG flag. With -O2 the problem
> returns.
>
> M
>
> On 26 November 2011 10:31, Anders Logg <<email address hidden>
> > wrote:
>
> > Your question #179849 on DOLFIN changed:
> > https:/
> >
> > Status: Open => Answered
> >
> > Anders Logg proposed the following answer:
> > On Fri, Nov 25, 2011 at 06:45:48PM -0000, Anders Logg wrote:
> > > Question #179849 on DOLFIN changed:
> > > https:/
> > >
> > > Anders Logg proposed the following answer:
> > > Then it looks like you are building DOLFIN *without* the DEBUG flag
> > > and the macro is not correctly defined in the #else case.
> > >
> > > So something goes wrong with this macro somewhere in the code:
> > >
> > > #define dolfin_
> > >
> > > Does it help if you change back to how they were and then replace the
> > > above line with
> > >
> > > #define dolfin_
> > >
> > > ?
> >
> > Very strange...
> >
> > I just rebuilt DOLFIN without -DDEBUG (setting CMAKE_BUILD_TYPE to
> > Release and verifying using make VERBOSE=1 that the -DDEBUG option is
> > not present) but it still works fine here.
> >
> > Is anyone else seeing this?
> >
> >
> >
> > If you still need help, you can reply to this email or go to the
> > following page to enter your feedback:
> > https:/
> >
> > You received this question notification because you asked the question.
> >
>
Revision history for this message
|
#19 |
An annoying thing with optimization errors is that when you start to
sprinkle the code with cout's, the error tends to go away (probably because
the optimizer cannot be as aggressive anymore). There is no problem with
the subdomain marker. Something goes wrong inside the
init_from_
it works no matter what. I guess this error is compiler dependent and only
other people using the same compiler as I, c++ (Ubuntu/Linaro
4.5.2-8ubuntu4) 4.5.2, will have the same problems. This is the standard
compiler on ubuntu 11.04, though, so I'm surprised no one else seems to
have this problem?
M
On 26 November 2011 20:25, Anders Logg <<email address hidden>
> wrote:
> Your question #179849 on DOLFIN changed:
> https:/
>
> Anders Logg proposed the following answer:
> Can you try printing some stuff from within SubDomain.cpp?
>
> Replace apply_markers in SubDomain.cpp with the following code:
>
> void SubDomain:
> T sub_domain,
> const Mesh& mesh) const
> {
> log(TRACE, "Computing sub domain markers for sub domain %d.",
> sub_domain);
>
> // Get the dimension of the entities we are marking
> const uint dim = sub_domains.dim();
>
> // Compute facet - cell connectivity if necessary
> const uint D = mesh.topology(
> if (dim == D - 1)
> {
> mesh.init(D - 1);
> mesh.init(D - 1, D);
> }
>
> // Set geometric dimension (needed for SWIG interface)
> _geometric_
>
> // Always false when not marking facets
> bool on_boundary = false;
>
> // Extract exterior (non shared) facets markers
> const MeshFunction<bool>& exterior =
> mesh.parallel_
>
> // Array for vertex coordinate
> Array<double> x;
>
> // Compute sub domain markers
> Progress p("Computing sub domain markers", mesh.num_
> for (MeshEntityIterator entity(mesh, dim); !entity.end(); ++entity)
> {
> // Check if entity is on the boundary if entity is a facet
> if (dim == D - 1)
> {
> on_boundary = entity-
> (exterior.size() == 0 || exterior[*entity]);
> }
>
> // Start by assuming all points are inside
> bool all_points_inside = true;
>
> cout << "checking entity " << *entity << endl;
>
> // Check all incident vertices if dimension is > 0 (not a vertex)
> if (entity->dim() > 0)
> {
> for (VertexIterator vertex(*entity); !vertex.end(); ++vertex)
> {
> x.update(
> const_cast<
> if (!inside(x, on_boundary))
> {
> all_points_inside = false;
> break;
> }
> }
> }
>
> // Check midpoint (works also in the case when we have a single
> vertex)
> if (all_points_inside)
> {
> cout << " yes, now checking midpoint" << endl;
>
> x.update(
> const_cast<
> if (!inside(x, on_boundary))
> all_points_inside = false;
> }
>
> // Mark entity with all vertices inside
> if (all_points_inside)
> {
> cout << " yes, marking entity " << entity->index() << " as " <<
> sub_domain << endl;
> sub_domains.
> }
>
> p++;
> }
> }
>
> Also try to reduce the test code to the smallest possible problem that
> still gives you the error. For a start, only include the scalar case
> and just call sub_domain.mark() with a MeshFunction if that is where
> it goes wrong.
>
> --
> Anders
>
>
> On Sat, Nov 26, 2011 at 12:50:48PM -0000, Mikael Mortensen wrote:
> > Question #179849 on DOLFIN changed:
> > https:/
> >
> > Status: Answered => Open
> >
> > Mikael Mortensen is still having a problem:
> > Looks like an optimization error. I reduced the optimization flag to -O1
> > and the problem is gone, even without the DEBUG flag. With -O2 the
> problem
> > returns.
> >
> > M
> >
> > On 26 November 2011 10:31, Anders Logg <
> <email address hidden>
> > > wrote:
> >
> > > Your question #179849 on DOLFIN changed:
> > > https:/
> > >
> > > Status: Open => Answered
> > >
> > > Anders Logg proposed the following answer:
> > > On Fri, Nov 25, 2011 at 06:45:48PM -0000, Anders Logg wrote:
> > > > Question #179849 on DOLFIN changed:
> > > > https:/
> > > >
> > > > Anders Logg proposed the following answer:
> > > > Then it looks like you are building DOLFIN *without* the DEBUG flag
> > > > and the macro is not correctly defined in the #else case.
> > > >
> > > > So something goes wrong with this macro somewhere in the code:
> > > >
> > > > #define dolfin_
> > > >
> > > > Does it help if you change back to how they were and then replace the
> > > > above line with
> > > >
> > > > #define dolfin_
> > > >
> > > > ?
> > >
> > > Very strange...
> > >
> > > I just rebuilt DOLFIN without -DDEBUG (setting CMAKE_BUILD_TYPE to
> > > Release and verifying using make VERBOSE=1 that the -DDEBUG option is
> > > not present) but it still works fine here.
> > >
> > > Is anyone else seeing this?
> > >
> > >
> > >
> > > If you still need help, you can reply to this email or go to the
> > > following page to enter your feedback:
> > > https:/
> > >
> > > You received this question notification because you asked the question.
> > >
> >
>
> --
> If this answers your question, please go to the following page to let us
> know that it is solved:
> https:/
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https:/
>
> You received this question notification because you asked the question.
>
Revision history for this message
|
#20 |
On Sun, Nov 27, 2011 at 08:30:54PM -0000, Mikael Mortensen wrote:
> Question #179849 on DOLFIN changed:
> https:/
>
> Status: Answered => Open
>
> Mikael Mortensen is still having a problem:
> An annoying thing with optimization errors is that when you start to
> sprinkle the code with cout's, the error tends to go away (probably
> because the optimizer cannot be as aggressive anymore). There is no
> problem with the subdomain marker. Something goes wrong inside the
> init_from_
> there, then it works no matter what. I guess this error is compiler
> dependent and only other people using the same compiler as I, c++
> (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2, will have the same
> problems. This is the standard compiler on ubuntu 11.04, though, so
> I'm surprised no one else seems to have this problem?
Me too.
Anyway, I don't know how to handle this bug if I'm not able to
reproduce it.
Maybe Johannes could try on the buildbot running Ubuntu 11.04?
--
Anders
> M
>
>
> On 26 November 2011 20:25, Anders Logg <<email address hidden>
> > wrote:
>
> > Your question #179849 on DOLFIN changed:
> > https:/
> >
> > Anders Logg proposed the following answer:
> > Can you try printing some stuff from within SubDomain.cpp?
> >
> > Replace apply_markers in SubDomain.cpp with the following code:
> >
> > void SubDomain:
> > T sub_domain,
> > const Mesh& mesh) const
> > {
> > log(TRACE, "Computing sub domain markers for sub domain %d.",
> > sub_domain);
> >
> > // Get the dimension of the entities we are marking
> > const uint dim = sub_domains.dim();
> >
> > // Compute facet - cell connectivity if necessary
> > const uint D = mesh.topology(
> > if (dim == D - 1)
> > {
> > mesh.init(D - 1);
> > mesh.init(D - 1, D);
> > }
> >
> > // Set geometric dimension (needed for SWIG interface)
> > _geometric_
> >
> > // Always false when not marking facets
> > bool on_boundary = false;
> >
> > // Extract exterior (non shared) facets markers
> > const MeshFunction<bool>& exterior =
> > mesh.parallel_
> >
> > // Array for vertex coordinate
> > Array<double> x;
> >
> > // Compute sub domain markers
> > Progress p("Computing sub domain markers", mesh.num_
> > for (MeshEntityIterator entity(mesh, dim); !entity.end(); ++entity)
> > {
> > // Check if entity is on the boundary if entity is a facet
> > if (dim == D - 1)
> > {
> > on_boundary = entity-
> > (exterior.size() == 0 || exterior[*entity]);
> > }
> >
> > // Start by assuming all points are inside
> > bool all_points_inside = true;
> >
> > cout << "checking entity " << *entity << endl;
> >
> > // Check all incident vertices if dimension is > 0 (not a vertex)
> > if (entity->dim() > 0)
> > {
> > for (VertexIterator vertex(*entity); !vertex.end(); ++vertex)
> > {
> > x.update(
> > const_cast<
> > if (!inside(x, on_boundary))
> > {
> > all_points_inside = false;
> > break;
> > }
> > }
> > }
> >
> > // Check midpoint (works also in the case when we have a single
> > vertex)
> > if (all_points_inside)
> > {
> > cout << " yes, now checking midpoint" << endl;
> >
> > x.update(
> > const_cast<
> > if (!inside(x, on_boundary))
> > all_points_inside = false;
> > }
> >
> > // Mark entity with all vertices inside
> > if (all_points_inside)
> > {
> > cout << " yes, marking entity " << entity->index() << " as " <<
> > sub_domain << endl;
> > sub_domains.
> > }
> >
> > p++;
> > }
> > }
> >
> > Also try to reduce the test code to the smallest possible problem that
> > still gives you the error. For a start, only include the scalar case
> > and just call sub_domain.mark() with a MeshFunction if that is where
> > it goes wrong.
> >
> >
> >
> > On Sat, Nov 26, 2011 at 12:50:48PM -0000, Mikael Mortensen wrote:
> > > Question #179849 on DOLFIN changed:
> > > https:/
> > >
> > > Status: Answered => Open
> > >
> > > Mikael Mortensen is still having a problem:
> > > Looks like an optimization error. I reduced the optimization flag to -O1
> > > and the problem is gone, even without the DEBUG flag. With -O2 the
> > problem
> > > returns.
> > >
> > > M
> > >
> > > On 26 November 2011 10:31, Anders Logg <
> > <email address hidden>
> > > > wrote:
> > >
> > > > Your question #179849 on DOLFIN changed:
> > > > https:/
> > > >
> > > > Status: Open => Answered
> > > >
> > > > Anders Logg proposed the following answer:
> > > > On Fri, Nov 25, 2011 at 06:45:48PM -0000, Anders Logg wrote:
> > > > > Question #179849 on DOLFIN changed:
> > > > > https:/
> > > > >
> > > > > Anders Logg proposed the following answer:
> > > > > Then it looks like you are building DOLFIN *without* the DEBUG flag
> > > > > and the macro is not correctly defined in the #else case.
> > > > >
> > > > > So something goes wrong with this macro somewhere in the code:
> > > > >
> > > > > #define dolfin_
> > > > >
> > > > > Does it help if you change back to how they were and then replace the
> > > > > above line with
> > > > >
> > > > > #define dolfin_
> > > > >
> > > > > ?
> > > >
> > > > Very strange...
> > > >
> > > > I just rebuilt DOLFIN without -DDEBUG (setting CMAKE_BUILD_TYPE to
> > > > Release and verifying using make VERBOSE=1 that the -DDEBUG option is
> > > > not present) but it still works fine here.
> > > >
> > > > Is anyone else seeing this?
> > > >
> > > >
> > > >
> > > > If you still need help, you can reply to this email or go to the
> > > > following page to enter your feedback:
> > > > https:/
> > > >
> > > > You received this question notification because you asked the question.
> > > >
> > >
> >
> >
> > If you still need help, you can reply to this email or go to the
> > following page to enter your feedback:
> > https:/
> >
> > You received this question notification because you asked the question.
> >
>
Revision history for this message
|
#21 |
There is no buildbot running 11.04 (only 10.04 and 11.10), but I have some other environments with 11.04 where I can try to reproduce the bug. It will take some time to install everything. I will let you know when it's done.
Revision history for this message
|
#22 |
On Mon, Nov 28, 2011 at 12:55:45PM -0000, Johannes Ring wrote:
> Question #179849 on DOLFIN changed:
> https:/
>
> Johannes Ring posted a new comment:
> There is no buildbot running 11.04 (only 10.04 and 11.10), but I
> have some other environments with 11.04 where I can try to reproduce
> the bug. It will take some time to install everything. I will let
> you know when it's done.
ok thanks!
--
Anders
Revision history for this message
|
#23 |
I could not reproduce this in Ubuntu 11.04 (either 32 or 64 bits) with the exact same compiler as reported by Mikael (c++ (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2). The testing was done in a clean (pbuilder) build environment with a minimal set of packages installed before following the instructions for Dorsal/
Revision history for this message
|
#24 |
Then I guess my computer is ill and you should simply forget about this. I
will replace my computer in two weeks time anyway. Thanks for all the help.
M
On 28 November 2011 16:45, Johannes Ring <
<email address hidden>> wrote:
> Your question #179849 on DOLFIN changed:
> https:/
>
> Johannes Ring posted a new comment:
> I could not reproduce this in Ubuntu 11.04 (either 32 or 64 bits) with
> the exact same compiler as reported by Mikael (c++ (Ubuntu/Linaro
> 4.5.2-8ubuntu4) 4.5.2). The testing was done in a clean (pbuilder) build
> environment with a minimal set of packages installed before following
> the instructions for Dorsal/
>
> --
> You received this question notification because you asked the question.
>
Revision history for this message
|
#25 |
ok! Then I'm closing this bug report. Open it again if the problem
should appear on your new machine.
--
Anders
On Mon, Nov 28, 2011 at 03:55:47PM -0000, Mikael Mortensen wrote:
> Question #179849 on DOLFIN changed:
> https:/
>
> Status: Answered => Open
>
> Mikael Mortensen is still having a problem:
> Then I guess my computer is ill and you should simply forget about this. I
> will replace my computer in two weeks time anyway. Thanks for all the help.
>
> M
>
> On 28 November 2011 16:45, Johannes Ring <
> <email address hidden>> wrote:
>
> > Your question #179849 on DOLFIN changed:
> > https:/
> >
> > Johannes Ring posted a new comment:
> > I could not reproduce this in Ubuntu 11.04 (either 32 or 64 bits) with
> > the exact same compiler as reported by Mikael (c++ (Ubuntu/Linaro
> > 4.5.2-8ubuntu4) 4.5.2). The testing was done in a clean (pbuilder) build
> > environment with a minimal set of packages installed before following
> > the instructions for Dorsal/
> >
> >
>
Can you help with this problem?
Provide an answer of your own, or ask Mikael Mortensen for more information if necessary.