Git Product home page Git Product logo

Comments (11)

calum-chamberlain avatar calum-chamberlain commented on June 9, 2024

from eqcorrscan.

d-chambers avatar d-chambers commented on June 9, 2024

Ok I ran the build_ext command, then tried to run the tests and get the same error. This time I installed eqcorrcan with the develop flag, not sure if that makes a difference.

from eqcorrscan.

calum-chamberlain avatar calum-chamberlain commented on June 9, 2024

from eqcorrscan.

calum-chamberlain avatar calum-chamberlain commented on June 9, 2024

Ah, on reading more closely, it looks like you don't have the openmp libraries installed? I had thought this was standard in gcc, more info to follow (and will update docs once we get this working).

p.s. eqcorrscan is now on condo-forge, and comes with fftw and openmp when installing from there, but you can't run the tests from there...

from eqcorrscan.

calum-chamberlain avatar calum-chamberlain commented on June 9, 2024

It looks like a linking error to the openMP libraries, but I don't know why it would be (tests on 16.04 run fine with standard setups). Can I check that gcc is the compiler that gets called by setup.py build_ext? It would usually be gcc unless you built your Python in an interesting way (although the current method also works for intel compilers).

from eqcorrscan.

d-chambers avatar d-chambers commented on June 9, 2024

I am just running anaconda with python version 3.6, shouldn't be anything unusual about it.

It turns out eqcorrscan/lib/libutils.cpython-36m-x86_64-linux-gnu.so doesn't exist, not sure what that means as far as possible failures in the compile chain.

Edit:
eqcorrscan/lib/libutils.cpython-36m-x86_64-linux-gnu.so does exist, I was erroneously looking at a different instance of eqcorrscan. When running the tests in the correct directory I am having the same issue though, undefined symbol.

How should I go about testing if gcc is the compiler being used? I stepped through finalize_options function in setup.py with the debugger and compiler variable was set to "unix" if that is useful.

Edit2:

conda list | grep gcc

produces this:

libgcc 4.8.5 2

This might be a related issue but conda installing gcc did not fix the issue for me. I will keep digging.

from eqcorrscan.

calum-chamberlain avatar calum-chamberlain commented on June 9, 2024

from eqcorrscan.

calum-chamberlain avatar calum-chamberlain commented on June 9, 2024

Okay, so I can recreate this error when I install gcc using conda, rather than using the system version of gcc. What I actually did was:

  1. create a new conda env (without installing gcc via conda)
  2. build eqcorrscan using pip
  • tests pass
  1. installed gcc via conda
  • tests fail with missing reference to GOMP functions
  1. installed openMP from conda
  • tests fail with same errors
  1. clean out built files (remove build directory and any possible shared object in lib)
  2. rebuild eqcorrscan with pip
  • tests pass

As follows:

conda create -n eqcorrscan python=3.6 colorama numpy scipy matplotlib obspy bottleneck pyproj
source activate eqcorrscan
pip install .  #run from git repo directory
python eqcorrscan/tests/correlate_test.py
# Pass
conda install gcc
pip install .  -U --no-deps
python eqcorrscan/tests/correlate_test.py
# Fail
conda install openmp
pip install .  -U --no-deps
python eqcorrscan/tests/correlate_test.py
# Fail
rm -r build
rm eqcorrscan/lib/libutils.cpython-*.so
pip install .  -U --no-deps
python eqcorrscan/tests/correlate_test.py
# Pass

In my case, the library built fine, but was built with a different version of libgcc and libgomp than in the conda env, which is fine - I don't know if this holds for you? Did you install gcc via conda after building the libraries?

You can check which gcc is being used by running which gcc.

Also, if I make an environment including gcc:

conda create -n eqcorrscan python=3.6 colorama numpy scipy matplotlib obspy bottleneck pyproj gcc

It runs fine (and builds using the conda gcc).

from eqcorrscan.

calum-chamberlain avatar calum-chamberlain commented on June 9, 2024

Also note that you should be fine using the system gcc (which should have happened using the instructions on the website, so I don't know what happened there originally?).
When you update from the git repo you will need to clean out the built shared objects first, otherwise they will not be rebuilt.

from eqcorrscan.

d-chambers avatar d-chambers commented on June 9, 2024

Okay, it seems to work now with your suggestions. I think my original attempt to install eqcorrscan, without a virtual env, would have been similar to where you were at in step 4 listed above. The build directory would have existed, which was probably the reason the subsequent efforts failed with environments that should have worked had the build been removed.

Since compilation time is very small maybe build should be removed by default?

Thanks for your help.

from eqcorrscan.

calum-chamberlain avatar calum-chamberlain commented on June 9, 2024

I think removing build by default would be a good idea - might have to dig into setup-tools a little more to work out how that should be done.

from eqcorrscan.

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.