getfem-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Getfem-users] Problem using getfem::import_mesh in 64bit (2ndpart)


From: Andres Peratta
Subject: Re: [Getfem-users] Problem using getfem::import_mesh in 64bit (2ndpart)
Date: Thu, 9 Sep 2010 18:32:52 +0100

Hi Yves and Jaime
I am not sure whether this helps or not, but here I go:

My testing environment is as follows:
GetFEM 4.1 compiled in a win-64bits with Visual Studio C++ Express ed. 2008
(targeting 32 bits) 
I used the file: "dal_naming_system.h" which Yves posted on
08-September-2010 as well as the original one from the GetFEM4.1 official
download.

The result is that the code crashes on line 41 of getfem_import.cc 
  pgt = bgeot::simplex_geotrans(1,2);
while trying to read the first element from the following line in a Gmsh
version 2. mesh file:

...
$Elements
494
437 8 2 1 1 931 928 930 <----- The code crashes here
438 8 2 1 1 928 920 925
...

The error occurs with with both versions of "dal_naming_system.h" 
The crash is actually of the type "Debug Assertion Failed!".

Here is the status of the stack immediately after the crash, as reported by
the debugger:

a.exe!std::_Vector_const_iterator<double,std::allocator<double>
>::operator+=(int _Off=-1)  Line 161 + 0x56 bytes       C++
a.exe!std::_Vector_const_iterator<double,std::allocator<double>
>::operator-=(int _Off=1)  Line 177     C++
a.exe!std::_Vector_const_iterator<double,std::allocator<double>
>::operator-(int _Off=1)  Line 182 + 0xc bytes  C++
a.exe!bgeot::polynomial<double>::operator*=(const bgeot::polynomial<double>
& Q={...})  Line 344 + 0x81 bytes       C++
a.exe!bgeot::simplex_trans_::calc_base_func(bgeot::polynomial<double> &
p={...}, unsigned int i=0, unsigned short K=2)  Line 274 + 0xf5 bytes   C++
a.exe!bgeot::simplex_trans_::simplex_trans_(unsigned char nc='', unsigned
short k=2)  Line 286 + 0x3b bytes       C++
a.exe!bgeot::PK_gt(std::deque<dal::naming_system<bgeot::geometric_trans>::pa
rameter,std::allocator<dal::naming_system<bgeot::geometric_trans>::parameter
> > & params=[2]({type_=0 num_=1.0000000000000000 pm_={...} },{type_=0
num_=2.0000000000000000 pm_={...} }),
std::vector<boost::intrusive_ptr<dal::static_stored_object const
>,std::allocator<boost::intrusive_ptr<dal::static_stored_object const > > >
& dependencies=[1]({p_=0x013aabe0 }))  Line 304 + 0x41 bytes    C++
a.exe!dal::naming_system<bgeot::geometric_trans>::method_(std::basic_string<
char,std::char_traits<char>,std::allocator<char> > name="GT_PK(1,2)",
unsigned int & i=10, bool throw_if_not_found=true)  Line 284 + 0x2a bytes
C++
a.exe!dal::naming_system<bgeot::geometric_trans>::method(std::basic_string<c
har,std::char_traits<char>,std::allocator<char> > name="GT_PK(1,2)",
unsigned int & i=10, bool throw_if_not_found=true)  Line 111 + 0x91 bytes
C++
a.exe!bgeot::geometric_trans_descriptor(std::basic_string<char,std::char_tra
its<char>,std::allocator<char> > name="GT_PK(1,2)")  Line 528 + 0x44 bytes
C++
a.exe!bgeot::simplex_geotrans(unsigned int n=1, unsigned short k=2)  Line
544 + 0x29 bytes        C++
a.exe!getfem::gmsh_cv_info::set_pgt()  Line 62 + 0x10 bytes     C++
a.exe!getfem::import_gmsh_msh_file(std::basic_ifstream<char,std::char_traits
<char> > & f={...}, getfem::mesh & m={...}, int deprecate=2)  Line 240  C++

------------------------------------

Would it help if I test everything with minqw-w64 (I've got version 4.4.5)

Regards
Andres



-----Original Message-----
From: address@hidden [mailto:address@hidden On
Behalf Of Yves Renard
Sent: 08 September 2010 14:05
To: Jaime Armendáriz Villalba
Cc: address@hidden
Subject: Re: [Getfem-users] Problem using getfem::import_mesh in 64bit
(2ndpart)


Dear Jaime,

May be it comes from the dal_tree_sorted object. Can you try with the
attached modified file dal_naming_system.h in which I replaced the use of
this object by an std::map.


Yves.


On mercredi 8 septembre 2010, Jaime Armendáriz Villalba wrote:
> Hello,
> 
> I've continued digging with the problem on the 64bit on windows. I 
> have done some "Debugging" and I`ve found out where is the problem:
> 
> When parsing this line in the file:
> 
>     $Elements
>     695
>     1 15 3 0 1 0 1
>     2 15 3 0 2 0 2
>     3 15 3 0 3 0 3
>     4 15 3 0 4 0 4
>     5 15 3 0 5 0 5
>     6 15 3 0 6 0 6
>     7 15 3 0 7 0 7
>     8 15 3 0 8 0 8
>     9 1 3 0 1 0 1 2 <---- This line
>     10 1 3 0 2 0 2 9
>     11 1 3 0 2 0 9 10
>     12 1 3 0 2 0 10 11
>     13 1 3 0 2 0 11 12
> 
> This is what happens:
> 
>     line 41 of getfem_import.cc
>             pgt = bgeot::simplex_geotrans(1,1);
> 
>     line 518 of bgeot_geometric_trans.cc:
>             add_suffix("QK", QK_gt);
> 
>     line 121 of dal_naming_system.h (add_suffix function)
>             size_type i = suffixes.add(prefix + '_' + name);
> 
> And here it crashes.
> 
> Previously, an "add_suffix("PK", PK_gt)" call has been executed 
> succesfully on bgeot_geometric_trans.cc.
> I have tested 5 different mesh files and all of them fail at this point.
> 
> I think that something in the code is not 64 bit compatible (at least 
> with mingw-gcc-4.5). What else could I do in order to solve this 
> problem? I even can provide my VM with everything installed to make the
tests and debug.
> 
> Thank you very much for your time.
> 
> Jaime




-- 

  Yves Renard (address@hidden)       tel : (33) 04.72.43.87.08
  Pole de Mathematiques, INSA-Lyon             fax : (33) 04.72.43.85.29
  20, rue Albert Einstein
  69621 Villeurbanne Cedex, FRANCE
  http://math.univ-lyon1.fr/~renard

---------




reply via email to

[Prev in Thread] Current Thread [Next in Thread]