Skip to content
This repository has been archived by the owner on Dec 22, 2021. It is now read-only.

fatiando\gravmag\_polyprism.c:349:17: fatal error: omp.h: No such file or directory #164

Closed
mtb-za opened this issue Feb 3, 2015 · 3 comments
Labels

Comments

@mtb-za
Copy link
Contributor

mtb-za commented Feb 3, 2015

Currently trying to reinstall Fatiando in a new conda environment, after following this guide: http://conda.pydata.org/docs/examples/create.html. After switching to the newly created environment (with python2.7 and numpy 1.9), I ran 'pip install fatiando'. Unfortunately, I get the above error.

Relevant extract from log:

building 'fatiando.gravmag._polyprism' extension

C:\Users\foo\AppData\Local\Continuum\Anaconda\Scripts\gcc.bat -DMS_WIN64 -mdll -O -Wall -IC:\Users\foo\AppData\Local\Continuum\Anaconda\lib\site-packages\numpy\core\include -IC:\Users\foo\AppData\Local\Continuum\Anaconda\include -IC:\Users\foo\AppData\Local\Continuum\Anaconda\PC -c fatiando\gravmag_polyprism.c -o build\temp.win-amd64-2.7\Release\fatiando\gravmag_polyprism.o -fopenmp

In file included from C:\Users\foo\AppData\Local\Continuum\Anaconda\lib\site-packages\numpy\core\include/numpy/ndarraytypes.h:1761:0,

from C:\Users\foo\AppData\Local\Continuum\Anaconda\lib\site-packages\numpy\core\include/numpy/ndarrayobject.h:17,

from C:\Users\foo\AppData\Local\Continuum\Anaconda\lib\site-packages\numpy\core\include/numpy/arrayobject.h:4,

from fatiando\gravmag_polyprism.c:347:

C:\Users\foo\AppData\Local\Continuum\Anaconda\lib\site-packages\numpy\core\include/numpy/npy_1_7_deprecated_api.h:12:9: note: #pragma message: C:\Users\foo\AppData\Local\Continuum\Anaconda\lib\site-packages\numpy\core\include/numpy/npy_1_7_deprecated_api.h(12) : Warning Msg: Using deprecated NumPy API, disable it by #defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION

fatiando\gravmag_polyprism.c:349:17: fatal error: omp.h: No such file or directory

compilation terminated.

error: command 'C:\Users\foo\AppData\Local\Continuum\Anaconda\Scripts\gcc.bat' failed with exit status 1

@eusoubrasileiro
Copy link
Contributor

Hi @mtb-za I am glad in your interest in fatiando.

From docs Extra dependencies for Windows users you have to install TDM-GCC to be able to compile OpenMP code.

I bet it will solve your problem but if you have any other just share with us.

@leouieda leouieda added the bug label Feb 3, 2015
@leouieda
Copy link
Member

leouieda commented Feb 3, 2015

Hi @mtb-za, thanks for reporting the issue.

My first thought was what @eusoubrasileiro said, just try (re)installing TDM. We get this error a lot under windows. But it might also be caused by the conda environment. TDM installs on top of Anaconda gcc. So it might not be carried along when you switch conda environments. This is mere speculation, by the way.

Is the install working if you don't use conda environments?

PS: These errors are making me seriously question the utility of the badly implemented parallelism that we have. Might be better to ditch Cython openmp and use a higher level multiprocessing in the Python code. (Update: discussing this in #165)

@mtb-za
Copy link
Contributor Author

mtb-za commented Feb 4, 2015

This definitely solved the issue, although since I tested it by installing it outside, I am not sure if it has just used that one.

Feel free to close this issue as solved.

leouieda added a commit that referenced this issue Mar 16, 2015
This is the main cause of install errors in Fatiando (#164)
Doesn't offer enough speedup and convenience to make it worth it.
Much better to use multiprocessing in pure Python.

First steps to #165
leouieda added a commit that referenced this issue Mar 18, 2015
This is the main cause of install errors in Fatiando (#164)
Doesn't offer enough speedup and convenience to make it worth it.
Much better to use multiprocessing in pure Python.

First steps to #165
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants