Giter Club home page Giter Club logo

openmp-feedstock's Introduction

About openmp-feedstock

Feedstock license: BSD-3-Clause

Home: http://openmp.llvm.org/

Package license: Apache-2.0 WITH LLVM-exception

Summary: The OpenMP API supports multi-platform shared-memory parallel programming in C/C++ and Fortran.

Development: https://github.com/llvm/llvm-project/

Current build status

Azure
VariantStatus
linux_64 variant
linux_aarch64 variant
linux_ppc64le variant
osx_64 variant
osx_arm64 variant
win_64 variant

Current release info

Name Downloads Version Platforms
Conda Recipe Conda Downloads Conda Version Conda Platforms

Installing openmp

Installing openmp from the conda-forge channel can be achieved by adding conda-forge to your channels with:

conda config --add channels conda-forge
conda config --set channel_priority strict

Once the conda-forge channel has been enabled, llvm-openmp can be installed with conda:

conda install llvm-openmp

or with mamba:

mamba install llvm-openmp

It is possible to list all of the versions of llvm-openmp available on your platform with conda:

conda search llvm-openmp --channel conda-forge

or with mamba:

mamba search llvm-openmp --channel conda-forge

Alternatively, mamba repoquery may provide more information:

# Search all versions available on your platform:
mamba repoquery search llvm-openmp --channel conda-forge

# List packages depending on `llvm-openmp`:
mamba repoquery whoneeds llvm-openmp --channel conda-forge

# List dependencies of `llvm-openmp`:
mamba repoquery depends llvm-openmp --channel conda-forge

About conda-forge

Powered by NumFOCUS

conda-forge is a community-led conda channel of installable packages. In order to provide high-quality builds, the process has been automated into the conda-forge GitHub organization. The conda-forge organization contains one repository for each of the installable packages. Such a repository is known as a feedstock.

A feedstock is made up of a conda recipe (the instructions on what and how to build the package) and the necessary configurations for automatic building using freely available continuous integration services. Thanks to the awesome service provided by Azure, GitHub, CircleCI, AppVeyor, Drone, and TravisCI it is possible to build and upload installable packages to the conda-forge anaconda.org channel for Linux, Windows and OSX respectively.

To manage the continuous integration and simplify feedstock maintenance conda-smithy has been developed. Using the conda-forge.yml within this repository, it is possible to re-render all of this feedstock's supporting files (e.g. the CI configuration files) with conda smithy rerender.

For more information please check the conda-forge documentation.

Terminology

feedstock - the conda recipe (raw material), supporting scripts and CI configuration.

conda-smithy - the tool which helps orchestrate the feedstock. Its primary use is in the construction of the CI .yml files and simplify the management of many feedstocks.

conda-forge - the place where the feedstock and smithy live and work to produce the finished article (built conda distributions)

Updating openmp-feedstock

If you would like to improve the openmp recipe or build a new package version, please fork this repository and submit a PR. Upon submission, your changes will be run on the appropriate platforms to give the reviewer an opportunity to confirm that the changes result in a successful build. Once merged, the recipe will be re-built and uploaded automatically to the conda-forge channel, whereupon the built conda packages will be available for everybody to install and use from the conda-forge channel. Note that all branches in the conda-forge/openmp-feedstock are immediately built and any created packages are uploaded, so PRs should be based on branches in forks and branches in the main repository should only be used to build distinct package versions.

In order to produce a uniquely identifiable distribution:

  • If the version of a package is not being increased, please add or increase the build/number.
  • If the version of a package is being increased, please remember to return the build/number back to 0.

Feedstock Maintainers

openmp-feedstock's People

Contributors

beckermr avatar chrisburr avatar conda-forge-admin avatar conda-forge-curator[bot] avatar dhirschfeld avatar github-actions[bot] avatar h-vetinari avatar hmaarrfk avatar inducer avatar isuruf avatar jakirkham avatar katietz avatar ocefpaf avatar regro-cf-autotick-bot avatar xhochy avatar xoviat avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

openmp-feedstock's Issues

vc 9 and openmp 5.0.0

Issue:

I'm getting this error:

conda.exceptions.UnsatisfiableError: The following specifications were found to be in conflict:
  - openblas -> libflang[version='>=5.0.0'] -> openmp==5.0.0 -> vc=14
  - vc=9
Use "conda search <package> --info" to see the dependencies for each package.

when trying to build on windows with openblas and libflang for python 2.7 support.

Is this possible? Is there an openmp for vc 9?

Feedstock build here: conda-forge/slycot-feedstock#18


Environment (conda list):
$ conda list


Details about conda and system ( conda info ):
$ conda info

Segfault when using llvm-openmp-12.0.1 on macos

We use clang and llvm-openmp from conda-forge on macos in the CI of a project (https://github.com/joblib/threadpoolctl). It used to work with the version 11.1.0.

The installation completes fine but we have a segfault at runtime when trying to run a simple openmp based piece of parallel code.

Here is the difference of the 2 environments between when it used to work and now:
before
intel-openmp-2021.2.0 | hecd8cb5_564 942 KB
llvm-openmp-11.1.0 | hda6cdc1_1 268 KB conda-forge
mkl-2021.2.0 | hecd8cb5_269 100.0 MB
mkl-service-2.3.0 | py39h9ed2024_1 44 KB
mkl_random-1.2.1 | py39hb2f4e1b_2 282 KB
after
fortran-compiler-1.0.3 | h4f947d3_0 5 KB conda-forge
intel-openmp-2021.3.0 | hecd8cb5_3375 950 KB
llvm-openmp-12.0.1 | hda6cdc1_0 286 KB conda-forge
mkl-2021.3.0 | hecd8cb5_517 100.4 MB
mkl-service-2.4.0 | py39h9ed2024_0 45 KB
mkl_random-1.2.2 | py39hb2f4e1b_0 285 KB

pinning the version of llvm-openmp to 11.1.0 solves the issue.

Thanks

DLL load error - incompatible libiomp5md.dll

Both this (openmp) package and the defaults intel-openmp install libiomp5md.dll into /Library/bin:

λ ls C:\Miniconda3\pkgs\openmp-6.0.0-vc14_0\Library\bin

Mode                LastWriteTime         Length Name
----                -------------         ------ ----
-a---l       11/03/2018     10:48         615424 libiomp5md.dll
-a---l       11/03/2018     10:48         615424 libomp.dll
λ ls C:\Miniconda3\pkgs\intel-openmp-2018.0.0-8\Library\bin

Mode                LastWriteTime         Length Name
----                -------------         ------ ----
-a---l       23/03/2018      2:22        1343744 libiomp5md.dll
-a---l       23/03/2018      2:22        3755008 libiomp5md.pdb
-a---l       23/03/2018      2:22          81664 libiompstubs5md.dll

This means that installing one when the other is already present will overwrite the existing libiomp5md.dll.

Unfortunately these two dlls do not appear to be compatible as using the libiomp5md.dll provided by the openmp package will break pytorch, resulting in a DLL load error:

ImportError: DLL load failed: The operating system cannot run %1.

Tested on win64/py36

Does not take into account CONDA_BUILD_SYSROOT

Hi,

On MacOS:

This package contains bin/clang with -fopenmp support. When I try to use this clang, it does not find the standard headers that I have in /opt/MacOSX10.9.sdk. As instructed by https://conda.io/docs/user-guide/tasks/build-packages/compiler-tools.html is set CONDA_BUILD_PREFIX in conda_build_config.yaml. However, the only acitvate.d script that takes this into account is in one of the clang_osx-64 packages.

What is the correct way to get this working?

How come the travis build script are working? If I try to reproduce them, step by step on my Mac, they fail.

Please redirect or advice,
Cheers,
Tom

Mismatched header install location with clang 16

Solution to issue cannot be found in the documentation.

  • I checked the documentation.

Issue

Following on from #24 (comment)

It seems that the omp.h provided by llvm-openmp is only in the default header search path for clang if the clang and llvm-openmp versions match exactly, which is fine.

However clang 16 changes its standard header path to a different pattern, whereas llvm-openmp does not, so as of clang 16, the omp.h header cannot be found.

A minimal reproducible example:

A little C file to import omp.h

$ (cat <<EOF
#include <omp.h>
int main() {}
EOF          
)>/tmp/test.c

Using clang 16 we have a problem

$ conda create -n llvm-openmp-bug-16
$ mamba install clang==16.0.6 llvm-openmp==16.0.6 -c conda-forge
$ clang /tmp/test.c
/tmp/test.c:1:10: fatal error: 'omp.h' file not found
#include <omp.h>
         ^~~~~~~
1 error generated.
$ cd /opt/conda/envs/llvm-openmp-bug-16
$ find . -name omp.h
./include/omp.h
./lib/clang/16.0.6/include/omp.h
./lib/gcc/x86_64-conda-linux-gnu/13.1.0/include/omp.h
$ ls ./lib/clang
16  16.0.6

However, using clang 15 we're OK

$ conda create -n llvm-openmp-bug-15
$ mamba install clang==15.0.7 llvm-openmp==15.0.7  -c conda-forge
$ clang /tmp/test.c  # No error
$ cd /opt/conda/envs/llvm-openmp-bug-15
$ find . -name omp.h
./include/omp.h
./lib/clang/15.0.7/include/omp.h
./lib/gcc/x86_64-conda-linux-gnu/13.1.0/include/omp.h
$ ls ./lib/clang
15.0.7

So in clang 15 omp.h is installed into the compiler's default include search path. But in clang 16 the pattern of the include directory has changed, to only reflect the major version.

We can see the search paths with -v - using clang 16 again:

$ clang -v /tmp/test.c
<snip>
#include "..." search starts here:
#include <...> search starts here:
 /opt/conda/envs/llvm-openmp-bug-16/lib/clang/16/include
 /opt/conda/envs/llvm-openmp-bug-16/bin/../lib/gcc/x86_64-conda-linux-gnu/13.1.0/../../../../x86_64-conda-linux-gnu/sysroot/usr/include
End of search list.
/tmp/test.c:1:10: fatal error: 'omp.h' file not found
#include <omp.h>
         ^~~~~~~
1 error generated.

So clearly clang isn't searching the correct place to find omp.h.

Note that omp.h is also installed to ./include, so a possible workaround is to set CPATH="$CONDA_PREFIX/include".

Installed packages

_libgcc_mutex             0.1                 conda_forge    conda-forge
_openmp_mutex             4.5                       2_gnu    conda-forge
binutils_impl_linux-64    2.40                 hf600244_0    conda-forge
clang                     16.0.6               ha0738ec_1    conda-forge
clang-16                  16.0.6          default_h1cdf331_1    conda-forge
gcc_impl_linux-64         13.1.0               hc4be1a9_0    conda-forge
icu                       72.1                 hcb278e6_0    conda-forge
kernel-headers_linux-64   2.6.32              he073ed8_16    conda-forge
ld_impl_linux-64          2.40                 h41732ed_0    conda-forge
libclang-cpp16            16.0.6          default_h1cdf331_1    conda-forge
libgcc-devel_linux-64     13.1.0               he3cc6c4_0    conda-forge
libgcc-ng                 13.1.0               he5830b7_0    conda-forge
libgomp                   13.1.0               he5830b7_0    conda-forge
libiconv                  1.17                 h166bdaf_0    conda-forge
libllvm16                 16.0.6               h5cf9203_1    conda-forge
libsanitizer              13.1.0               hfd8a6a1_0    conda-forge
libstdcxx-ng              13.1.0               hfd8a6a1_0    conda-forge
libxml2                   2.11.4               h0d562d8_0    conda-forge
libzlib                   1.2.13               hd590300_5    conda-forge
llvm-openmp               16.0.6               h4dfa4b3_0    conda-forge
sysroot_linux-64          2.12                he073ed8_16    conda-forge
xz                        5.2.6                h166bdaf_0    conda-forge
zstd                      1.5.2                hfc55251_7    conda-forge

Environment info

active environment : llvm-openmp-bug-16
    active env location : /opt/conda/envs/llvm-openmp-bug-16
            shell level : 1
       user config file : /home/dave/.condarc
 populated config files : /home/dave/.condarc
          conda version : 23.7.2
    conda-build version : not installed
         python version : 3.10.12.final.0
       virtual packages : __archspec=1=x86_64
                          __cuda=11.8=0
                          __glibc=2.31=0
                          __linux=5.4.0=0
                          __unix=0=0
       base environment : /opt/conda  (writable)
      conda av data dir : /opt/conda/etc/conda
  conda av metadata url : None
           channel URLs : https://conda.anaconda.org/conda-forge/linux-64
                          https://conda.anaconda.org/conda-forge/noarch
                          https://repo.anaconda.com/pkgs/main/linux-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/linux-64
                          https://repo.anaconda.com/pkgs/r/noarch
          package cache : /opt/conda/pkgs
                          /home/dave/.conda/pkgs
       envs directories : /opt/conda/envs
                          /home/dave/.conda/envs
               platform : linux-64
             user-agent : conda/23.7.2 requests/2.28.1 CPython/3.10.12 Linux/5.4.0-153-generic ubuntu/20.04.6 glibc/2.31
                UID:GID : 1000:1000
             netrc file : None
           offline mode : False

Bump advertised OpenMP version

This already came up in conda-forge/_openmp_mutex-feedstock#10 and #83, though until now, support as advertised was clearly only 4.5

However, as of llvm/llvm-project@0c6f2f6, LLVM 17 will use OpenMP 5.1 as the default version.

This is somewhat surprising to me, because https://clang.llvm.org/docs/OpenMPSupport.html still shows much of 5.0/5.1 as unimplemented. I've asked in the MR about the status.

In any case, it's a reality that -fopenmp-version={45,50,51} can be used to select the implementation level already today, so perhaps the switch of the upstream default is a good enough reason to bump the version here?

load headers in right spot for all versions of clang?

Right now, if I have clang 4.0.1 in my env, but am using llvm-openmp 8.0.1, the compiler won't be able to find its headers at $PREFIX/lib/clang/4.0.1/include/omp.h because the version numbers differ. (The llvm-openmp package has them at $PREFIX/lib/clang/8.0.1/include/omp.h in this case.)

We should either force the versions to match or we need to link them properly somehow.

numpy is not binary compatible with libflang/openmp 5

Solution to issue cannot be found in the documentation.

  • I checked the documentation.

Issue

The original issue was filed here: python-control/Slycot#230
The issue was also filed with the numpy feedstock: conda-forge/numpy-feedstock#308

After installing libflang 5 in a conda environment, a kernel crash occurs when trying to solve a linear system with a singular matrix.

Flang 5 is pinned as the default Fortran compiler across conda-forge. conda_build_config.yaml

I narrowed the issue down to the following:

  • libflang 5.0.0 depends on openmp 5.0.0
  • openmp 5.0.0 overwrites "libiomp5md.dll" that was installed by numpy. The two dlls are very different in size (2mb for the numpy one, 600kb for the openmp one)

Openmp places its "libiomp5md.dll" in Library\bin.
The version from numpy is either in Library\bin (channel main) or directly in bin (conda-forge).

Actual Behavior

Using numpy.linalg.solve on singular matrix with dimension over 149 crashes the Kernel.

Expected Behavior

Expected a "LinAlgError: Singular matrix" as it is shown with matrices up to the dimension of 149.

Steps to Reproduce

  • Create a new conda environment with python 3.11, numpy (and ipython for convenience)
    • mamba create -n slycot_crash python=3.11 numpy ipython -c conda-forge
  • activate the environment
    • mamba activate slycot_crash
  • enter ipython
    • ipython
  • paste and run the code below to confirm it works as expected (raises LinAlgError)
  • exit ipython
    • exit
  • install openmp=5
    • mamba install openmp=5 -c conda-forge
  • enter ipython and run the code below again to confirm kernel crash
  • (optional) change n=149 and it only fails if the size is 150 or larger
import numpy as np

n = 150
A = np.random.rand(n,n)
A[-1,:] = np.zeros((1,n)) # make matrix singular

b = np.random.rand(n)

x = np.linalg.solve(A, b)

Installed packages

# Name                    Version                   Build  Channel
asttokens                 2.4.1              pyhd8ed1ab_0    conda-forge
bzip2                     1.0.8                hcfcfb64_5    conda-forge
ca-certificates           2023.11.17           h56e8100_0    conda-forge
colorama                  0.4.6              pyhd8ed1ab_0    conda-forge
decorator                 5.1.1              pyhd8ed1ab_0    conda-forge
exceptiongroup            1.2.0              pyhd8ed1ab_2    conda-forge
executing                 2.0.1              pyhd8ed1ab_0    conda-forge
intel-openmp              2024.0.0         h57928b3_49841    conda-forge
ipython                   8.20.0             pyh7428d3b_0    conda-forge
jedi                      0.19.1             pyhd8ed1ab_0    conda-forge
libblas                   3.9.0              21_win64_mkl    conda-forge
libcblas                  3.9.0              21_win64_mkl    conda-forge
libexpat                  2.5.0                h63175ca_1    conda-forge
libffi                    3.4.2                h8ffe710_5    conda-forge
libhwloc                  2.9.3           default_haede6df_1009    conda-forge
libiconv                  1.17                 hcfcfb64_2    conda-forge
liblapack                 3.9.0              21_win64_mkl    conda-forge
libsqlite                 3.44.2               hcfcfb64_0    conda-forge
libxml2                   2.12.4               hc3477c8_1    conda-forge
libzlib                   1.2.13               hcfcfb64_5    conda-forge
llvm-meta                 5.0.0                         0    conda-forge
matplotlib-inline         0.1.6              pyhd8ed1ab_0    conda-forge
mkl                       2024.0.0         h66d3029_49657    conda-forge
numpy                     1.26.3          py311h0b4df5a_0    conda-forge
openmp                    5.0.0                    vc14_1    conda-forge
openssl                   3.2.0                hcfcfb64_1    conda-forge
parso                     0.8.3              pyhd8ed1ab_0    conda-forge
pickleshare               0.7.5                   py_1003    conda-forge
pip                       23.3.2             pyhd8ed1ab_0    conda-forge
prompt-toolkit            3.0.42             pyha770c72_0    conda-forge
pthreads-win32            2.9.1                hfa6e2cd_3    conda-forge
pure_eval                 0.2.2              pyhd8ed1ab_0    conda-forge
pygments                  2.17.2             pyhd8ed1ab_0    conda-forge
python                    3.11.7          h2628c8c_1_cpython    conda-forge
python_abi                3.11                    4_cp311    conda-forge
setuptools                69.0.3             pyhd8ed1ab_0    conda-forge
six                       1.16.0             pyh6c4a22f_0    conda-forge
stack_data                0.6.2              pyhd8ed1ab_0    conda-forge
tbb                       2021.11.0            h91493d7_1    conda-forge
tk                        8.6.13               h5226925_1    conda-forge
traitlets                 5.14.1             pyhd8ed1ab_0    conda-forge
typing_extensions         4.9.0              pyha770c72_0    conda-forge
tzdata                    2023d                h0c530f3_0    conda-forge
ucrt                      10.0.22621.0         h57928b3_0    conda-forge
vc                        14.3                hcf57466_18    conda-forge
vc14_runtime              14.38.33130         h82b7239_18    conda-forge
vs2015_runtime            14.38.33130         hcb4865c_18    conda-forge
wcwidth                   0.2.13             pyhd8ed1ab_0    conda-forge
wheel                     0.42.0             pyhd8ed1ab_0    conda-forge
xz                        5.2.6                h8d14728_0    conda-forge

Environment info

active environment : slycot_crash
    active env location : C:\Users\\AppData\Local\Continuum\Miniconda3\envs\slycot_crash
            shell level : 3
       user config file : C:\Users\\.condarc
 populated config files : C:\Users\\.condarc
          conda version : 23.3.1
    conda-build version : 3.25.0
         python version : 3.11.4.final.0
       virtual packages : __archspec=1=x86_64
                          __cuda=11.0=0
                          __win=0=0
       base environment : C:\Users\\AppData\Local\Continuum\Miniconda3  (writable)
      conda av data dir : C:\Users\\AppData\Local\Continuum\Miniconda3\etc\conda
  conda av metadata url : None
           channel URLs : https://repo.anaconda.com/pkgs/main/win-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/win-64
                          https://repo.anaconda.com/pkgs/r/noarch
                          https://repo.anaconda.com/pkgs/msys2/win-64
                          https://repo.anaconda.com/pkgs/msys2/noarch
          package cache : C:\Users\\AppData\Local\Continuum\Miniconda3\pkgs
                          C:\Users\\.conda\pkgs
                          C:\Users\\AppData\Local\conda\conda\pkgs
       envs directories : C:\Users\\AppData\Local\Continuum\Miniconda3\envs
                          C:\Users\\.conda\envs
                          C:\Users\\AppData\Local\conda\conda\envs
               platform : win-64
             user-agent : conda/23.3.1 requests/2.29.0 CPython/3.11.4 Windows/10 Windows/10.0.22621
          administrator : False
             netrc file : None
           offline mode : False

OpenMP 9.0

Hi,

Is there a reason why openmp was removed for 9.0?
I have a package that fails to be installed on MacOS with:

UnsatisfiableError: The following specifications were found to be in conflict:
  - r-fastbaps -> r-genie -> llvm-openmp[version='>=9.0.0'] -> openmp[version='9.0.0|9.0.0.*']

so, I was wondering if I should pin llvm-openmp to <9.0, or wait for openmp 9.0.
I don't have openmp as an explicit dependency, so it is probably installed from some of the other packages.

Thank you,
Natasha

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.