problems compiling in parallel

66 views
Skip to first unread message

jose.lopez...@gmail.com

unread,
Feb 9, 2026, 7:28:07 AM (8 days ago) Feb 9
to basilisk-fr

Hi all,

I have an old basilisk code that compiled and ran in parallel at the time. Now I'm not able to compile it in parallel with the usual command

$CC99='mpicc -std=c99' qcc -Wall -O2 -D_MPI=1 drop.c -o drop -lm

During compilation an error appears that seems to be due to some library in my UBUNTU not being updated (or missing). Searching through the conversations I see that Edoardo had the same error but in the MAC environment. (See error below).

If someone can give me any tip on how to solve it in UBUNTU I would greatly appreciate it.!

Pepe

The error:
/usr/local/basilisk/src/grid/memindex/virtual.h:103:79: error: ‘MAP_ANONYMOUS’ undeclared (first use in this function)
  103 |     m->b = mymap (len);
      |                                                                               ^            
/usr/local/basilisk/src/grid/memindex/virtual.h:103:79: note: each undeclared identifier is reported only once for each function it appears in
/usr/local/basilisk/src/grid/memindex/virtual.h: In function ‘mem_free1d’:
/usr/local/basilisk/src/grid/memindex/virtual.h:135:7: warning: implicit declaration of function ‘madvise’ [-Wimplicit-function-declaration]
  135 |   if (madvise (start, 4096, MADV_DONTNEED))
      |       ^~~~~~~
/usr/local/basilisk/src/grid/memindex/virtual.h:135:29: error: ‘MADV_DONTNEED’ undeclared (first use in this function); did you mean ‘POSIX_MADV_DONTNEED’?
  135 |   if (madvise (start, 4096, MADV_DONTNEED))
      |                             ^~~~~~~~~~~~~
      |                             POSIX_MADV_DONTNEED


Stephane Popinet

unread,
Feb 11, 2026, 5:32:49 AM (6 days ago) Feb 11
to basil...@googlegroups.com
Hi Pepe,

> During compilation an error appears that seems to be due to some library
> in my UBUNTU not being updated (or missing). Searching through the
> conversations I see that Edoardo had the same error but in the MAC
> environment.

You should be able to find compilation flags which fixes this, for example:

CC99='mpicc -std=c99 -D_XOPEN_SOURCE=700 -D_GNU_SOURCE=1' qcc -Wall -O2
-D_MPI=1 drop.c -o drop -lm

Note that if other Basilisk codes run on your system: for example the
test cases, the tutorial etc., then the solution (i.e. the compilation
flags or CC99 config) is in your $BASILISK/config file.

cheers,

Stephane


Reply all
Reply to author
Forward
0 new messages