teuben / nemo

a Stellar Dynamics Toolbox (Not Everybody Must Observe)
https://astronemo.readthedocs.io
GNU General Public License v2.0
56 stars 40 forks source link

falcON does not compile on MacOSX #105

Open jcldc opened 1 year ago

jcldc commented 1 year ago

I fixed some compilation issues about falcON on macos platform (g++ and clang++), and removed again compilations warning.

The pb was coming from error and warning functions both declared in NEMO and clang/glibc and causing linking failures.

see falcON_compile branch

teuben commented 1 year ago

I have a Catalina (10.15.x) running, but haven't seen any issues with gyrfalcON. Perhaps an older clang version.

jcldc commented 1 year ago

Actually gyrfalcON was compiling correctly before the modification, but not the ${NEMO}/usr/dehnen/falcON/src/public/acc manipulators. The reason is because warning and error functions are called from and if you don't include before , clang give an error message during the link, because warnings and error are also defined in clang library !!!! When you install nemo using install_nemo script, gyrfalcON can be compiled but not these acc manipulators, at least from my macosx Sierra version. Could you check that you have *.so files in ${NEMO}/usr/dehnen/falcON/acc, like this :

(base) mac-compile:acc grunner$ pwd
/Users/grunner/works/GIT/nemo/usr/dehnen/falcON/acc
(base) mac-compile:acc grunner$ ll
total 1440
drwxr-xr-x  18 grunner  staff   576B 17 oct 14:39 .
drwxr-xr-x  23 grunner  staff   736B 17 oct 14:39 ..
-rw-r--r--   1 grunner  staff     0B 17 oct 14:39 .dummy
-rwxr-xr-x   1 grunner  staff    65K 17 oct 14:39 Combined.so
-rwxr-xr-x   1 grunner  staff    23K 17 oct 14:39 Dehnen.so
-rwxr-xr-x   1 grunner  staff    24K 17 oct 14:39 DehnenMcLaughlin.so
-rwxr-xr-x   1 grunner  staff    95K 17 oct 14:39 DiscPot.so
-rwxr-xr-x   1 grunner  staff   105K 17 oct 14:39 GalPot.so
-rwxr-xr-x   1 grunner  staff    82K 17 oct 14:39 Halo.so
-rwxr-xr-x   1 grunner  staff    24K 17 oct 14:39 LogPot.so
-rwxr-xr-x   1 grunner  staff    20K 17 oct 14:39 MiyamotoNagai.so
-rwxr-xr-x   1 grunner  staff    75K 17 oct 14:39 Monopole.so
-rwxr-xr-x   1 grunner  staff    23K 17 oct 14:39 NFW.so
-rwxr-xr-x   1 grunner  staff    19K 17 oct 14:39 Plummer.so
-rwxr-xr-x   1 grunner  staff    23K 17 oct 14:39 Point.so
-rwxr-xr-x   1 grunner  staff    29K 17 oct 14:39 PotExp.so
-rwxr-xr-x   1 grunner  staff    71K 17 oct 14:39 Shrink.so
-rwxr-xr-x   1 grunner  staff    23K 17 oct 14:39 SoftKernel.so
teuben commented 1 year ago

sounds like I need to add a regression test for this.

ugh, fish memory, the "make check" will do all the acc/manip tests of the dehnen code under "src/nbody/evolve/dehnen" entry.

teuben commented 1 year ago

Indeed,my Catalina does not have them. They are formally copied in $NEMOOBJ/acc, which is also non-existent on my mac.