FieldConvert -m gradient seg-fault
******************* This email originates from outside Imperial. Do not click on links and attachments unless you recognise the sender. If you trust the sender, add them to your safe senders list https://spam.ic.ac.uk/SpamConsole/Senders.aspx to disable email stamping for this address. ******************* I'm just starting to learn Nektar++ from the tutorials and User Guide and mostly it's going very well, but I'm having trouble with FieldConvert -m gradient, hitting a segmentation fault. I'm wondering whether I'm misunderstanding its use. For example, after successfully running the basics-helmholtz example https://doc.nektar.info/tutorials/latest/basics/helmholtz/basics-helmholtz.h... gmsh -2 Helm_mesh.geo Nekmesh Helm_mesh.msh Helm_mesh.xml ADRSolver -v Helm_mesh.xml Helm_conditions.xml FieldConvert Helm_mesh.xml Helm_conditions.xml Helm_mesh.fld Helm_mesh.vtu to produce Helm_mesh.fld and Helm_mesh.vtu, I tried FieldConvert -m gradient Helm_mesh.xml Helm_conditions.xml Helm_mesh.fld Helm-grad.fld following the documentation at https://doc.nektar.info/userguide/latest/user-guidese22.html#x35-1480005.5.1... but this raised [levy:58744] *** Process received signal *** [levy:58744] Signal: Segmentation fault (11) [levy:58744] Signal code: Address not mapped (1) [levy:58744] Failing at address: 0xb0 [levy:58744] [ 0] /lib/x86_64-linux-gnu/libc.so.6(+0x3f040)[0x7f9d682b1040] [levy:58744] [ 1] /usr/lib/x86_64-linux-gnu/libFieldUtils.so.5.0.0(_ZN6Nektar10FieldUtils11ProcessGrad7ProcessERN5boost15program_options13variables_mapE+0x6cc)[0x7f9d6a1aa7ac] [levy:58744] [ 2] FieldConvert(_Z9RunModuleSt10shared_ptrIN6Nektar10FieldUtils6ModuleEERN5boost15program_options13variables_mapEb+0x3f)[0x55c3dbf99b8f] [levy:58744] [ 3] FieldConvert(main+0x176c)[0x55c3dbf95e5c] [levy:58744] [ 4] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7)[0x7f9d68293bf7] [levy:58744] [ 5] FieldConvert(_start+0x2a)[0x55c3dbf9956a] [levy:58744] *** End of error message *** Segmentation fault (core dumped) That's on Ubuntu 18.04, where I had installed nektar++ from http://www.nektar.info/ubuntu-bionic bionic/contrib, but I also get the same error on CentOS 7.7.1908, using the docker image nektarpp/nektar:244f4842. What I was wanting to use the gradient module in my own project fpr was having solved for a steady incompressible potential flow with ADRSolver (EQTYPE "Laplace") to compute the velocity field as the gradient of the potential. Thank you, Geordie McBain Sent from [ProtonMail](https://protonmail.com), Swiss-based encrypted email.
Hi Geordie, I don’t know if there’s been a response to this query yet but I haven’t seen one. If not, apologies for the delay. I’ve been able to reproduce the error you’re encountering on Ubuntu 18.04 using the packaged version of Nektar++. The packaged version will be the 5.0.0 release. There have been a number of changes in the master branch of the code in the GitLab repository since the 5.0.0 release and I can confirm that with a fresh build from the master branch, this error does not occur so I assume it has been resolved subsequent to 5.0.0. This update will be included in a future release, however, in the meantime, if you’ve not already done so, you could try building Nektar++ from the source code available in GitLab <https://gitlab.nektar.info/nektar/nektar>. You can follow the instructions on the Getting Started <https://www.nektar.info/getting-started/> page, using the details under the “Clone our git repository” section to get the source code rather than downloading the 5.0.0 release source code. Hope this helps. Kind regards, Jeremy
On 7 Dec 2020, at 02:48, G. D. McBain <gdmcbain@protonmail.com> wrote:
This email from gdmcbain@protonmail.com originates from outside Imperial. Do not click on links and attachments unless you recognise the sender. If you trust the sender, add them to your safe senders list <https://spam.ic.ac.uk/SpamConsole/Senders.aspx> to disable email stamping for this address.
I'm just starting to learn Nektar++ from the tutorials and User Guide and mostly it's going very well, but I'm having trouble with FieldConvert -m gradient, hitting a segmentation fault. I'm wondering whether I'm misunderstanding its use.
For example, after successfully running the basics-helmholtz example
https://doc.nektar.info/tutorials/latest/basics/helmholtz/basics-helmholtz.h... <https://doc.nektar.info/tutorials/latest/basics/helmholtz/basics-helmholtz.html>
gmsh -2 Helm_mesh.geo Nekmesh Helm_mesh.msh Helm_mesh.xml ADRSolver -v Helm_mesh.xml Helm_conditions.xml FieldConvert Helm_mesh.xml Helm_conditions.xml Helm_mesh.fld Helm_mesh.vtu
to produce Helm_mesh.fld and Helm_mesh.vtu, I tried
FieldConvert -m gradient Helm_mesh.xml Helm_conditions.xml Helm_mesh.fld Helm-grad.fld
following the documentation at
https://doc.nektar.info/userguide/latest/user-guidese22.html#x35-1480005.5.1... <https://doc.nektar.info/userguide/latest/user-guidese22.html#x35-1480005.5.12>
but this raised
[levy:58744] *** Process received signal *** [levy:58744] Signal: Segmentation fault (11) [levy:58744] Signal code: Address not mapped (1) [levy:58744] Failing at address: 0xb0 [levy:58744] [ 0] /lib/x86_64-linux-gnu/libc.so.6(+0x3f040)[0x7f9d682b1040] [levy:58744] [ 1] /usr/lib/x86_64-linux-gnu/libFieldUtils.so.5.0.0(_ZN6Nektar10FieldUtils11ProcessGrad7ProcessERN5boost15program_options13variables_mapE+0x6cc)[0x7f9d6a1aa7ac] [levy:58744] [ 2] FieldConvert(_Z9RunModuleSt10shared_ptrIN6Nektar10FieldUtils6ModuleEERN5boost15program_options13variables_mapEb+0x3f)[0x55c3dbf99b8f] [levy:58744] [ 3] FieldConvert(main+0x176c)[0x55c3dbf95e5c] [levy:58744] [ 4] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7)[0x7f9d68293bf7] [levy:58744] [ 5] FieldConvert(_start+0x2a)[0x55c3dbf9956a] [levy:58744] *** End of error message *** Segmentation fault (core dumped)
That's on Ubuntu 18.04, where I had installed nektar++ from http://www.nektar.info/ubuntu-bionic <http://www.nektar.info/ubuntu-bionic> bionic/contrib, but I also get the same error on CentOS 7.7.1908, using the docker image nektarpp/nektar:244f4842.
What I was wanting to use the gradient module in my own project fpr was having solved for a steady incompressible potential flow with ADRSolver (EQTYPE "Laplace") to compute the velocity field as the gradient of the potential.
Thank you, Geordie McBain
Sent from ProtonMail <https://protonmail.com/>, Swiss-based encrypted email.
_______________________________________________ Nektar-users mailing list Nektar-users@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/nektar-users
******************* This email originates from outside Imperial. Do not click on links and attachments unless you recognise the sender. If you trust the sender, add them to your safe senders list https://spam.ic.ac.uk/SpamConsole/Senders.aspx to disable email stamping for this address. ******************* Hi Jeremy, Thanks very much for looking into this. I had since also cloned the repo and compiled on a CentOS 7.7.1908 machine. That had also raised a segmentation fault. I've now done a "git pull upstream master" to 707783cc647b64b25f3b82c35a1ebd3ecb430e13, recompiled and get the same (or rather a bit more since I've also since discovered the -v option):
Execution sequence: InputXml -> InputXml -> InputFld -> ProcessGrad -> OutputFld InputXml: Processing input xml file InputXml session reader CPU Time: 0.000269238s Parameters: LAMBDA = 2.5
Solver Info: EQTYPE = Helmholtz GLOBALMATRIXSTORAGETYPE = SmvBSR GLOBALSYSSOLN = DirectMultiLevelStaticCond LINSYSITERSOVLER = ConjugateGradient LOCALMATRIXSTORAGESTRATEGY = Sparse PRECONDITIONER = Diagonal PROJECTION = Continuous InputXml mesh graph setup CPU Time: 0.005176s InputXml CPU Time: 0.00561237s InputXml: Processing input xml file InputXml CPU Time: 1.4876e-05s InputFld: Processing input fld file InputFld CPU Time: 0.00216752s ProcessGrad: Calculating gradients CreateExp setexpansion CPU Time: 7.927e-05s CreateExp set first exp CPU Time: 0.00194836s Segmentation fault (core dumped)
Also, reading about FILTERS in Section 3.4 of the users guide <https://doc.nektar.info/userguide/latest/user-guidese9.html#x15-620003.4>, I tried putting <FILTERS> <FILTER TYPE="FieldConvert"> <PARAM NAME="OutputFile">gradient</PARAM> <PARAM NAME="Modules"> gradient </PARAM> </FILTER> </FILTERS> in Helm_conditions.xml, just before the closing </NEKTAR> and reran ADRSolver -v Helm_{mesh,conditions}.xml. This didn't seem to do anything; it seemed to be silently ignored, no seg fault, but no gradient.
******************* This email originates from outside Imperial. Do not click on links and attachments unless you recognise the sender. If you trust the sender, add them to your safe senders list https://spam.ic.ac.uk/SpamConsole/Senders.aspx to disable email stamping for this address. ******************* I found that I got more information on the core-dump if I omitted the last command-line argument, the name of the output file. I'm not sure whether that changes the error but I attach a copy and paste in case it's helpful. It's not exactly reproducible though; it always ends in 'Aborted (core dumped)' but what's before that varies. The tail from one run is: 7f92ea455000-7f92ea459000 r--p 000c2000 00:2e 55031659 /home/gmcbain/projects/nektar++/build-2020-12-21/dist/lib64/nektar++/thirdparty/libboost_regex.so.1.71.0 7f92ea459000-7f92ea45b000 rw-p 000c6000 00:2e 55031659 /home/gmcbain/projects/nektar++/build-2020-12-21/dist/lib64/nektar++/thirdparty/libboost_regex.so.1.71.0 7f92ea45b000-7f92ea45c000 r-xp 00000000 00:2e 55031663 /home/gmcbain/projects/nektar++/build-2020-12-21/dist/lib64/nektar++/thirdparty/libboost_system.so.1.71.0 7f92ea45c000-7f92ea65b000 ---p 00001000 00:2e 55031663 /home/gmcbain/projects/nektar++/build-2020-12-21/dist/lib64/nektar++/thirdparty/libboost_system.so.1.71.0 7f92ea65b000-7f92ea65c000 r--p 00000000 00:2e 55031663 /home/gmcbain/projects/nektar++/build-2020-12-21/dist/lib64/nektar++/thirdparty/libboost_system.so.1.71.0 7f92ea65c000-7f92ea65d000 rw-p 00001000 00:2e 55031663 /home/gmcbain/projects/nektar++/build-2020-12-21/dist/lib64/nektar++/thirdparty/libboost_system.so.1.71.0 7f92ea65d000-7f92ea677000 r-xp 00000000 00:2e 110307889 /home/gmcbain/projects/nektar++/build-2020-12-21/dist/lib64/nektar++/thirdparty/libboost_filesystem.so.1.71.0 7f92ea677000-7f92ea876000 ---p 0001a000 00:2e 110307889 /home/gmcbain/projects/nektar++/build-2020-12-21/dist/lib64/nektar++/thirdparty/libboost_filesystem.so.1.71.0 7f92ea876000-7f92ea877000 r--p 00019000 00:2e 110307889 /home/gmcbain/projects/nektar++/build-2020-12-21/dist/lib64/nektar++/thirdparty/libboost_filesystem.so.1.71.0 7f92ea877000-7f92ea878000 rw-p 0001a000 00:2e 110307889 /home/gmcbain/projects/nektar++/build-2020-12-21/dist/lib64/nektar++/thirdparty/libboost_filesystem.so.1.71.0Aborted (core dumped) I've since also run ctest (as recommended in Section 1.3.2.3 of the Users Guide) and it's 100% passing, '0 tests failed out of 560'.
******************* This email originates from outside Imperial. Do not click on links and attachments unless you recognise the sender. If you trust the sender, add them to your safe senders list https://spam.ic.ac.uk/SpamConsole/Senders.aspx to disable email stamping for this address. ******************* Hi Jeremy, Thank you for following this up again and elevating it to https://gitlab.nektar.info/nektar/nektar/-/issues/252. I'll continue over there. I'm very pleased to see that there's prompt action already. Cheers! Sent from ProtonMail, Swiss-based encrypted email.
participants (2)
- 
                
                G. D. McBain
- 
                
                Jeremy Cohen