Custom Makefile in sandbox

76 views
Skip to first unread message

Nicolas Le Moine

unread,
Oct 9, 2021, 5:24:11 AM10/9/21
to basilisk-fr
Dear all,

I have a couple of Basilisk test cases with extra library dependencies (namely FFTW) and I am struggling to create a Makefile for running them on the server. On my local machine I have these two files in a same directory, just as in my sandbox:

http://basilisk.fr/sandbox/nlemoine/SWE/MacDonald/

I can successfully run "make subcritical.tst" locally, but the same setup does not work in the sandbox. Where do I have to put the "custom" Makefile so that it is taken into account ? Maybe the FFTW library is just not installed on the server, but it does not seem to be the problem in the first place as the compiling instruction displayed in the sandbox reads:

qcc -autolink -g -Wall -pipe -D_FORTIFY_SOURCE=2 -Wall -O2 -o subcritical/subcritical subcritical.c -lm

compared to the one I get locally:

qcc -autolink -Wall -O2 -g -Wall -pipe -D_FORTIFY_SOURCE=2 -DDUMBGL -o subcritical/subcritical subcritical.c -lfftw3 -lm

Thanks for any hint and sorry for the trouble, I am completely new to these Makefiles.

Cheers,

Nicolas

Stephane Popinet

unread,
Nov 12, 2021, 12:19:45 PM11/12/21
to basil...@googlegroups.com
Hi Nicolas,

I have installed fftw3 on the server and fixed your Makefile, see:

http://basilisk.fr/sandbox/nlemoine/SWE/MacDonald/Makefile?changes=20211112170946

Another, simpler option is to add the line:

#pragma autolink -lfftw3

in subcritical.c

cheers,

Stephane

Stephane Popinet

unread,
Nov 12, 2021, 12:22:40 PM11/12/21
to basil...@googlegroups.com
Ah, yes, also to make subcritical.c into a proper test case, you should
add a 'subcritical.ref' file and/or exit with an error status if some
threshold on the error is not verified. See:

http://basilisk.fr/src/test/README#error-checking

cheers,

Stephane

Nicolas Le Moine

unread,
Nov 21, 2021, 7:29:54 AM11/21/21
to basilisk-fr
Hi Stephane,
Thanks a lot for the fix, the #pragma option is much simpler indeed.
Cheers,
Nicolas
Reply all
Reply to author
Forward
0 new messages