sessile drop with embedded boundaries fails to compile

139 views
Skip to first unread message

Ciaran Moore

unread,
Aug 12, 2022, 1:45:53 AM8/12/22
to basilisk-fr
Dear All,

Creating a copy of http://basilisk.fr/sandbox/popinet/contact/sessile.c and running it on my own machine fails with floating point exception, presumably due to undefined variables.

 Checking reveals cs and fs are undefined when they are used at line 72: "fractions (phi, cs, fs);" Or at least, removing this line allows the code to compile without floating point exceptions.

This is surprising, because embed.h, which is #included, declares these variables.

Grateful for any advice,
Ciaran

Vrionis Yiannis

unread,
Aug 12, 2022, 2:47:27 AM8/12/22
to Ciaran Moore, basilisk-fr

Hello friend,

 

As far as I understand, `fractions` is used to compute a scalar variable `cs` that describes the volume fraction of each cell and a face vector `fs` that describes the face-based quantity based on a vertex scalar `phi`. So I imagine if you check `cs` and `fs` after the macro call, the fields must be fully defined.

 

On a second note,

Or at least, removing this line allows the code to compile without floating point exceptions.

I imagine you mean you can run the code. It should compile in any case. Floating point exceptions usually infer a division by 0. I guess you could try calling `fractions_cleanup` just to try and avoid very small volume fraction values.

 

Hope this helps,

Yiannis

--
You received this message because you are subscribed to the Google Groups "basilisk-fr" group.
To unsubscribe from this group and stop receiving emails from it, send an email to basilisk-fr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/basilisk-fr/a38d5de9-40c6-4f51-8ce1-e2f6dc09ade3n%40googlegroups.com.

Ciaran Moore

unread,
Aug 12, 2022, 3:33:46 AM8/12/22
to basilisk-fr
Thank you for the quick reply. I'm not sure we have a solution yet.

Some more information:
1. make sessile.tst produces the following:

make sessile.tst

/basilisk/src/qcc -MD -o sessile.s.d sessile.c

/basilisk/src/qcc -MD -tags -o sessile.c.tags.d sessile.c

updating Makefile.deps

qcc -autolink -I/opt/local/include -O2 -I/opt/local/include/ -I/opt/X11/include/ -I/usr/local/include/ -g -Wall -pipe -o sessile/sessile sessile.c -lm

[sessile.tst]

/basilisk/src/runtest: line 51: 34887 Floating point exception: 8   $EXEC ./$test 2> $log > $out

make: *** [sessile.tst] Error 1


2. The error described above happens when running on a Mac (other models have so far run well). Running the same code on an Ubuntu 22.04 virtual machine does not produce any errors.  On the Mac, qcc --version returns 
gcc-mp-11 (MacPorts gcc11 11.3.0_4+stdlib_flag) 11.3.0, 
whereas on the virtual machine qcc --version gives 
cc (Ubuntu 11.2.0-19ubuntu1) 11.2.0.

Ciaran Moore

unread,
Aug 12, 2022, 6:22:59 AM8/12/22
to basilisk-fr
For anybody searching in the future, updating to the newest version of basilisk solved this problem.
Reply all
Reply to author
Forward
0 new messages