Open mattfil opened 10 months ago
Sorry, we have not tested FEconv with mingw-w64 in Windows, we just use MinGW (https://osdn.net/projects/mingw/).
Best, Fran
Dear Fran,
I am currently using Ubuntu 22.04.2 LTS, and I have successfully compiled the code without any issues. However, when attempting to run the provided example "./feconv examples/ansys_mesh.msh output.unv," I encountered an error. It's worth noting that the tool works well with other file formats, and this issue seems specific to Ansys .msh files.
Details:
The error manifests with a segmentation fault. I appreciate any guidance on resolving this issue or insights into potential compatibility problems with Ansys .msh files.
Thank you,
@mattfil I have installed mingw-w64 in Windows and I can reproduce your error. I will study why it happens.
By the way, I have installed mingw-w64 thru a MSYS2 installation, so I have to execute commands in a MSYS2 UCRT64 Shell, not a Windows Command (CMD), so I choose Makefile.gfortran.linux to compila. Do you know a way to install mingw-w64 in Windows and use it from a CMD?
@fran-pena , I am not sure this can be done, what you can do is to use a CMD to open msys2 shells... btw, from backtrace the segfault seem to be in module_utils_msh.f90 routine "nodes_not_in_cell", but I guess you have already found that.
@AlirezaNewTwen Unfortunately, I do not have your Linux platform. What I have is:
CentOS Linux release 8.5.2111 (Core) GNU Fortran (GCC) 7.3.0 GNU Make 3.82
The command './feconv examples/ansys_mesh.msh o.unv' gives a correct output: Space dimension: 3 Reading zone 1: Vertex Reading zone 2: Triangle, Lagrange P1 Reading zone 3: Tetrahedron, Lagrange P1
I will study the problem for MinGW first.
Best, Fran
Thank you for your answer, this is what I received with the same command:
Program received signal SIGSEGV, Segmentation fault. 0x00000000004fa2f4 in __module_utils_msh_fcnv_MOD_nodes_not_in_cell () (gdb) bt
best
@mattfil and @AlirezaNewTwen I just have updated master branch. Please, check in your platforms whether or not this update fixes your problem.
Ok now the example projects seem to work. I still see an issue with an Ansys msh file that you can find attached when I try to convert it to vtu. In particular something happens at line 442 in module_vtu.f90 when i=1 and j=3:
temp(:,:) = reshape(pc%el(j)%mm-1, [1, pc%el(j)%nel*lnv])
where an array of size 3,8000 is being reshaped onto an array with size 1,31440, leading to a segfault.
try.zip
Thank you for the nice library. I am in Windows with Msys2, with mingw64 terminal. The version of the gcc toolchain is the 13.2.0 https://packages.msys2.org/base/mingw-w64-gcc. I compiled feconv through the command: mingw32-make.exe -f Makefile.gfortran.linux and the compilation seems ok. I've tryed some of the examples in the folder and the conversion works, but it seems for all the cases where the input file is an Ansys .msh the conversion fails with a segfault. For example:
$ ./feconv examples/ansys_mesh.msh output.unv Space dimension: 3 Reading zone 1: Vertex Reading zone 2: Triangle, Lagrange P1 Reading zone 3: Tetrahedron, Lagrange P1
Program received signal SIGSEGV: Segmentation fault - invalid memory reference.
Backtrace for this error:
0 0x99d01d81
1 0x99cf4f03
2 0x99cd25a1
3 0x2f6db247
4 0x3191441e
5 0x3188e465
6 0x3191340d
7 0x99badd4a
8 0x99bb2e79
9 0x99c017cc
10 0x99c023c7
11 0x99c4c480
12 0x99ab7fdc
13 0x99ab8021
14 0x99ab12ed
15 0x99ab1405
16 0x2fc1257c
17 0x318caa57
18 0xffffffff
Any clue why this happen?
Thank you, Mattia