conda-forge / intel-compiler-repack-feedstock

A conda-smithy repository for intel-compiler-repack.
BSD 3-Clause "New" or "Revised" License
3 stars 7 forks source link

icpx reports missing configuration file #20

Closed oleksandr-pavlyk closed 10 months ago

oleksandr-pavlyk commented 10 months ago

Solution to issue cannot be found in the documentation.

Issue

$ conda create -n dpcpp-forge -c conda-forge --override-channels conda-forge:dpcpp_linux-64
$ conda activate dpcpp-forge
$ $ icpx --version
icpx: error: configuration file '/home/opavlyk/miniconda3/envs/dpcpp-forge/bin/-icpx.cfg' cannot be opened: No such file or directory
Intel(R) oneAPI DPC++/C++ Compiler 2023.2.0 (2023.2.0.20230622)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/opavlyk/miniconda3/envs/dpcpp-forge/bin-llvm
(dpcpp-forge) opavlyk@opavlyk-mobl:~$ ls $CONDA_PREFIX/etc/conda/activate.d
 libxml2_activate.sh   ocl-icd_activate.sh  '~activate-dpcpp.sh'

Installed packages

(dpcpp-forge) opavlyk@opavlyk-mobl:~$ conda list --explicit
# This file may be used to create an environment using:
# $ conda create --name <env> --file <this file>
# platform: linux-64
@EXPLICIT
https://conda.anaconda.org/conda-forge/linux-64/_libgcc_mutex-0.1-conda_forge.tar.bz2
https://conda.anaconda.org/conda-forge/noarch/_sysroot_linux-64_curr_repodata_hack-3-h69a702a_13.conda
https://conda.anaconda.org/conda-forge/linux-64/intel-cmplr-lic-rt-2023.2.0-ha770c72_49498.conda
https://conda.anaconda.org/conda-forge/linux-64/ld_impl_linux-64-2.40-h41732ed_0.conda
https://conda.anaconda.org/conda-forge/linux-64/libgcc-devel_linux-64-13.2.0-ha9c7c90_2.conda
https://conda.anaconda.org/conda-forge/linux-64/libstdcxx-devel_linux-64-13.2.0-ha9c7c90_2.conda
https://conda.anaconda.org/conda-forge/linux-64/libstdcxx-ng-13.2.0-h7e041cc_2.conda
https://conda.anaconda.org/conda-forge/noarch/kernel-headers_linux-64-3.10.0-h4a8ded7_13.tar.bz2
https://conda.anaconda.org/conda-forge/linux-64/libgomp-13.2.0-h807b86a_2.conda
https://conda.anaconda.org/conda-forge/noarch/sysroot_linux-64-2.17-h4a8ded7_13.tar.bz2
https://conda.anaconda.org/conda-forge/linux-64/binutils_impl_linux-64-2.40-hf600244_0.conda
https://conda.anaconda.org/conda-forge/linux-64/_openmp_mutex-4.5-2_kmp_llvm.tar.bz2
https://conda.anaconda.org/conda-forge/linux-64/libgcc-ng-13.2.0-h807b86a_2.conda
https://conda.anaconda.org/conda-forge/linux-64/icu-73.2-h59595ed_0.conda
https://conda.anaconda.org/conda-forge/linux-64/libiconv-1.17-h166bdaf_0.tar.bz2
https://conda.anaconda.org/conda-forge/linux-64/libsanitizer-13.2.0-h7e041cc_2.conda
https://conda.anaconda.org/conda-forge/linux-64/libzlib-1.2.13-hd590300_5.conda
https://conda.anaconda.org/conda-forge/linux-64/ocl-icd-2.3.1-h7f98852_0.tar.bz2
https://conda.anaconda.org/conda-forge/linux-64/xz-5.2.6-h166bdaf_0.tar.bz2
https://conda.anaconda.org/conda-forge/linux-64/gcc_impl_linux-64-13.2.0-h338b0a0_2.conda
https://conda.anaconda.org/conda-forge/linux-64/intel-cmplr-lib-rt-2023.2.0-hfc55251_49498.conda
https://conda.anaconda.org/conda-forge/linux-64/libxml2-2.11.5-h232c23b_1.conda
https://conda.anaconda.org/conda-forge/linux-64/zstd-1.5.5-hfc55251_0.conda
https://conda.anaconda.org/conda-forge/linux-64/gxx_impl_linux-64-13.2.0-h338b0a0_2.conda
https://conda.anaconda.org/conda-forge/linux-64/libhwloc-2.9.2-default_h554bfaf_1009.conda
https://conda.anaconda.org/conda-forge/linux-64/llvm-openmp-16.0.6-h4dfa4b3_0.conda
https://conda.anaconda.org/conda-forge/linux-64/tbb-2021.10.0-h00ab1b0_0.conda
https://conda.anaconda.org/conda-forge/linux-64/intel-opencl-rt-2023.2.0-heb1d2f6_49498.conda
https://conda.anaconda.org/conda-forge/linux-64/dpcpp-cpp-rt-2023.2.0-h59595ed_49498.conda
https://conda.anaconda.org/conda-forge/linux-64/dpcpp_impl_linux-64-2023.2.0-hd6dfaa8_49498.conda
https://conda.anaconda.org/conda-forge/linux-64/dpcpp_linux-64-2023.2.0-h59595ed_49498.conda

### Environment info

```shell
(dpcpp-forge) opavlyk@opavlyk-mobl:~$ conda info

     active environment : dpcpp-forge
    active env location : /home/opavlyk/miniconda3/envs/dpcpp-forge
            shell level : 2
       user config file : /home/opavlyk/.condarc
 populated config files :
          conda version : 23.7.4
    conda-build version : 3.26.1
         python version : 3.9.12.final.0
       virtual packages : __archspec=1=x86_64
                          __glibc=2.31=0
                          __linux=5.15.90.1=0
                          __unix=0=0
       base environment : /home/opavlyk/miniconda3  (writable)
      conda av data dir : /home/opavlyk/miniconda3/etc/conda
  conda av metadata url : None
           channel URLs : 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 : /home/opavlyk/miniconda3/pkgs
                          /home/opavlyk/.conda/pkgs
       envs directories : /home/opavlyk/miniconda3/envs
                          /home/opavlyk/.conda/envs
               platform : linux-64
             user-agent : conda/23.7.4 requests/2.31.0 CPython/3.9.12 Linux/5.15.90.1-microsoft-standard-WSL2 ubuntu/20.04.6 glibc/2.31
                UID:GID : 1000:1000
             netrc file : None
           offline mode : False
oleksandr-pavlyk commented 10 months ago

The issue is that $HOST environment variable is not set in the non conda-build environment.

In that case, we could use use a hard coded literal value of x86_64-conda-linux-gnu in the activation script, or not set ICXCFG and ICPXCFG variable at all. Not sure which solution is the best if any.

isuruf commented 10 months ago

See https://github.com/conda-forge/intel-compiler-repack-feedstock/pull/21

oleksandr-pavlyk commented 10 months ago

Closed via #21