CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Community Contributions (https://www.cfd-online.com/Forums/openfoam-community-contributions/)
-   -   [SOWFA] Stack smashing detected by SOWFA & fast v8 (https://www.cfd-online.com/Forums/openfoam-community-contributions/187704-stack-smashing-detected-sowfa-fast-v8.html)

Gerwang May 13, 2017 07:36

Stack smashing detected by SOWFA & fast v8
 
Hi all,

I am compiling the NREL SOWFA coupled with fast v8 into foam-extend-4.0. The compilation has succeeded. My solver can even run smoothly in one machine of mine. However, in some other machines (PC or Cluster). I get the error "stack smashing detected".

I compared almost everything (version of gcc, cmake, openmpi etc.) between both machines, and they are all the same. I am so confused.

This is the error given by my terminal:
Code:

*** stack smashing detected ***: WEI_Jesse_IB_static_1 terminated
[weitum-H8QGL:05704] *** Process received signal ***
[weitum-H8QGL:05704] Signal: Aborted (6)
[weitum-H8QGL:05704] Signal code:  (-6)
[weitum-H8QGL:05704] [ 0] /lib/x86_64-linux-gnu/libpthread.so.0(+0x11390)[0x7f61d7298390]
[weitum-H8QGL:05704] [ 1] /lib/x86_64-linux-gnu/libc.so.6(gsignal+0x38)[0x7f61d6eec428]
[weitum-H8QGL:05704] [ 2] /lib/x86_64-linux-gnu/libc.so.6(abort+0x16a)[0x7f61d6eee02a]
[weitum-H8QGL:05704] [ 3] /lib/x86_64-linux-gnu/libc.so.6(+0x777ea)[0x7f61d6f2e7ea]
[weitum-H8QGL:05704] [ 4] /lib/x86_64-linux-gnu/libc.so.6(__fortify_fail+0x5c)[0x7f61d6fcf56c]
[weitum-H8QGL:05704] [ 5] /lib/x86_64-linux-gnu/libc.so.6(__fortify_fail+0x0)[0x7f61d6fcf510]
[weitum-H8QGL:05704] [ 6] /home/weitum/foam/weitum-4.0/lib/linux64GccDPOpt/libuserTurbineModelsFASTv8.so(_ZN4Foam13turbineModels35horizontalAxisWindTurbinesALMfastv812getPositionsEv+0x185b)[0x7f61dceb559b]
[weitum-H8QGL:05704] [ 7] /home/weitum/foam/weitum-4.0/lib/linux64GccDPOpt/libuserTurbineModelsFASTv8.so(_ZN4Foam13turbineModels35horizontalAxisWindTurbinesALMfastv810initializeEv+0x49)[0x7f61dceb8969]
[weitum-H8QGL:05704] [ 8] /home/weitum/foam/weitum-4.0/lib/linux64GccDPOpt/libuserTurbineModelsFASTv8.so(_ZN4Foam13turbineModels35horizontalAxisWindTurbinesALMfastv8C1ERKNS_14GeometricFieldINS_6VectorIdEENS_12fvPatchFieldENS_7volMeshEEE+0x22b0)[0x7f61dcebb050]
[weitum-H8QGL:05704] [ 9] WEI_Jesse_IB_static_1[0x42ebc2]
[weitum-H8QGL:05704] [10] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0)[0x7f61d6ed7830]
[weitum-H8QGL:05704] [11] WEI_Jesse_IB_static_1[0x43d809]
[weitum-H8QGL:05704] *** End of error message ***
--------------------------------------------------------------------------
mpiexec noticed that process rank 0 with PID 5704 on node weitum-H8QGL exited on signal 6 (Aborted).
--------------------------------------------------------------------------

I am not familiar with "libc.so" or "libpthread.so.0" as indicated in the error message. Could someone please give me some hints?

Best regards,
Wang

aerospaceman November 28, 2019 08:27

SOWFA + foam-extend
 
Could you perhaps elaborate on how you did the installation?

I'm guessing most are using 2.3 or 2.4, so it would great to hear your experience with foam-extend 4.0.

Does the installation procedure change?

Gerwang November 28, 2019 08:48

Quote:

Originally Posted by aerospaceman (Post 750975)
Could you perhaps elaborate on how you did the installation?

I'm guessing most are using 2.3 or 2.4, so it would great to hear your experience with foam-extend 4.0.

Does the installation procedure change?

It was a long time ago that I did this, so I am not really sure that I remember everything. However, here are some tips:

1) The compilation process does not change significantly. The portion used by SOWFA is quite similar for OpenFOAM 2.4 and foam-extend-4.0. I didn't have to change much code. The only change I could remember was that I had to define PI=3.14159 in foam-extend-4.0. I am sure there should be nothing sophisticated.

2) When I compiled it on PC, I compiled with openmpi, foam-extend default version. Everything worked.

3) When I compiled it on my cluster, Openmpi didn't really work. Instead of saying I solved this issue, I would say I circumvented it. I contacted my cluster administrator to ask the issue of openmpi, and they told me just don't use it. They recommended me to use Intelmpi that was already embedded in the cluster. To do that, I edited the file '~/foam/foam-extend-4.0/etc/bashrc' and set ${WM_MPLIB:=INTELMPI}, then I compiled foam-extend and SOWFA. I have been using this solution for years and I am quite happy with it.

Best regards,
Chengyu


All times are GMT -4. The time now is 15:51.