Code Monkey home page Code Monkey logo

Comments (8)

damonge avatar damonge commented on September 11, 2024

Hi @jhparkes

I think this should be easy to sort out: you need to make sure that:

  • The environment variable LD_LIBRARY_PATH contains the path to the directory where the libsharp libraries live (you can do this through export LD_LIBRARY_PATH=/path/to/libsharp/lib:$LD_LIBRARY_PATH)
  • The similar thing for LDFLAGS and CPPFLAGS. In this case you'd want:
export LDFLAGS+=" -L/path/to/libsharp/lib"
export CPPFLAGS+=" -I/path/to/libsharp/include"

Note that the directories /path/to/libsharp/lib and /path/to/libsharp/include must exist and must contain the lib*** and ***.h files installed by libsharp.

You can probably adapt the contents of the NERSC_Installation.md document to your own system when doing this.

Let me know if this doesn't work

from namaster.

jhparkes avatar jhparkes commented on September 11, 2024

Hey @damonge

Thank you so much. That worked. I was able to successfully run the ./configure file after using the process above for both Libsharp and Healpix. I have also confirmed that Healpix seems to be working by running the test discussed in the Healpix test/README.

I am now running into an issue where the make is running into a fatal error. It seems that it is related to it not being able to find chealpix.h. But I have confirmed that there is a file by that name in the directory /path/to/healpix/src/C/autotools/. I am slightly confused about how to add this to the path and where to add it to. I have added the healpix/lib and /include directories as above but not /src/C/autotools. The exact error I am getting is:

make all-am
make[1]: Entering directory '/mnt/d/GradSchool/ubuntu/NaMaster.git/trunk'
/bin/bash ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -fopenmp -I./src/ -g -O2 -MT src/libnmt_la-healpix_extra.lo -MD -MP -MF src/.deps/libnmt_la-healpix_extra.Tpo -c -o src/libnmt_la-healpix_extra.lo test -f 'src/healpix_extra.c' || echo './'src/healpix_extra.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -fopenmp -I./src/ -g -O2 -MT src/libnmt_la-healpix_extra.lo -MD -MP -MF src/.deps/libnmt_la-healpix_extra.Tpo -c src/healpix_extra.c -fPIC -DPIC -o src/.libs/libnmt_la-healpix_extra.o
src/healpix_extra.c:3:22: fatal error: chealpix.h: No such file or directory
compilation terminated.
Makefile:726: recipe for target 'src/libnmt_la-healpix_extra.lo' failed
make[1]: *** [src/libnmt_la-healpix_extra.lo] Error 1
make[1]: Leaving directory '/mnt/d/GradSchool/ubuntu/NaMaster.git/trunk'
Makefile:424: recipe for target 'all' failed
make: *** [all] Error 2

from namaster.

damonge avatar damonge commented on September 11, 2024

Right, this can probably be solved in a similar manner, but I'm thinking that using the conda forge version of NaMaster might be much easier. Have you tried following the instructions at the beginning of the README?

from namaster.

jhparkes avatar jhparkes commented on September 11, 2024

I did try that. However, when I did for some reason I ran into a different issue that whenever I ran python in a conda environment I could import pymaster I could not import healpy. I tried figuring out the source of this error for a long time and couldn't ever uncover it. That is why I decided to try the alternative method

from namaster.

damonge avatar damonge commented on September 11, 2024

Oh well. OK, let's go back to the healpix problem then.

I have added the healpix/lib and /include directories as above but not /src/C/autotools.

Is there no chealpix.h file in this include directory?

from namaster.

jhparkes avatar jhparkes commented on September 11, 2024

There is a chealpix.h in the include directory. I had missed it last time I looked

from namaster.

damonge avatar damonge commented on September 11, 2024

OK, you want to add those lib and include directories to LDFLAGS, LD_LIBRARY_FLAGS (lib) and CPPFLAGS (include), and then rerun ./configure. Have you done that?

from namaster.

jhparkes avatar jhparkes commented on September 11, 2024

Yes, I actually had to add them in order to get ./configure to run

from namaster.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.