[Gmsh] Error due to many volumes

Romain Quey quey at emse.fr
Thu Jun 12 20:01:26 CEST 2008


> Romain Quey wrote:
>> Dear Gmsh developers, dear all,
>>
>> Using gmsh 2.2.0 on Linux, I'm having the following error:
>>
>> $ gmsh -3 n1100-id1.geo
>> Info    : Parsing file 'n1100-id1.geo'
>> Error   : [on processor 0] Unable to open file 'n1100-id1.msh'
>>
>> My geo file contains many 'Volume' definitions (1100) -- see the  
>> attached example.
>>
>> Browsing the source files, I've found that this problem probably comes
>> from 'Parser/Gmsh.tab.cpp':
>>
>
> This code is unrelated to your error (you don't include any files in  
> your .geo).
>
> The message means that Gmsh could not open the output file for writing:
> you might not have write pemissions in the directory, or the disk might
> be full, ...?
>
> I could mesh your geometry without problems on my laptop. (For  
> repetitive geometries like this you might want to use a function to  
> generate each block; and maybe generate the grid by extrusion.)
>

Hello,

You are right, the bug does not occur here, but when writing the mesh.

However, I think the reason for the bug is really this one: when
increasing the max number of openable files per process on my system
(from 1024 to 1000000), I can successfully mesh the file.  I think that
if you run 'ulimit -n 1024' on your system, gmsh will crash too.

Best regards,

>> #line 2548 "Gmsh.y"
>> {
>>       if(!strcmp((yyvsp[(1) - (3)].c), "Include")){
>>         char tmpstring[1024];
>>         FixRelativePath((yyvsp[(2) - (3)].c), tmpstring);
>>         // Warning: we *don't* close included files (to allow user
>>         // functions in these files). If you need to include many many
>>         // files and don't have functions in the files, use "Merge"
>>         // instead: some OSes limit the number of files a process can
>>         // open simultaneously. The right solution would be of course
>>         // to modify FunctionManager to reopen the files instead of
>>         // using the FILE pointer, but hey, I'm lazy...
>>         Msg(STATUS2, "Reading '%s'", tmpstring);
>>         ParseFile(tmpstring, 0, 1);
>>         SetBoundingBox();
>>         Msg(STATUS2, "Read '%s'", tmpstring);
>>       }
>>
>> Could you please solve this problem?
>>
>> Many thanks for your software,
>>
>> Best regards,
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> gmsh mailing list
>> gmsh at geuz.org
>> http://www.geuz.org/mailman/listinfo/gmsh
>
>
> -- 
> Prof. Christophe Geuzaine
> University of Liege, Electrical Engineering and Computer Science
> http://www.montefiore.ulg.ac.be/~geuzaine
>


----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.