Issue |
90539
|
Summary |
icpx: error: ptxas command failed with exit code 255
|
Labels |
new issue
|
Assignees |
|
Reporter |
J-shel
|
I'm trying to install cloudsc_sycl on Nvidia A100 GPU using OneAPI DPC++ compiler.
First, I download cloudsc_sycl from [GitHub - ecmwf-ifs/dwarf-p-cloudsc at nams_pvc_sycl](https://github.com/ecmwf-ifs/dwarf-p-cloudsc/tree/nams_pvc_sycl)
Then I installed OneAPI for Nvidia GPU following this website: [Install oneAPI for NVIDIA GPUs - Guides - oneAPI for NVIDIA® GPUs - Products - Codeplay Developer](https://developer.codeplay.com/products/oneapi/nvidia/2023.0.0/guides/get-started-guide-nvidia.html)
Below is my environment:
-----------------------------------
CUDA Version: 12.4
OneAPI: l_BaseKit_p_2024.1.0.596_offline.sh and l_HPCKit_p_2024.1.0.560_offline.sh
DPC++ plugin: oneapi-for-nvidia-gpus-2024.1.0-cuda-12.0-linux.sh
-----------------------------------
Following are some settings in env.sh and toolchain.cmake under dwarf-p-cloudsc-nams/arch/ecmwf/hpc2020/intel-sycl/2024.1 dir:
-----------------------------------
env.sh:
export IntelSYCL_DIR="/opt/intel/oneapi/compiler/2024.1/lib/cmake/IntelSYCL"
export HDF5_ROOT="/usr/local/cloudsc_sycl_libs"
toolchain.cmake:
set(CMAKE_CXX_COMPILER "/opt/intel/oneapi/compiler/2024.1/bin/icpx")
set(CMAKE_C_COMPILER "/opt/intel/oneapi/compiler/2024.1/bin/icx")
set(CMAKE_Fortran_COMPILER "/opt/intel/oneapi/compiler/2024.1/bin/ifort")
set(CMAKE_C_FLAGS "-O3 -L/opt/intel/oneapi/compiler/2024.1/lib -qopenmp -fgpu-rdc")
set(CMAKE_CXX_FLAGS "-O3 -L/opt/intel/oneapi/compiler/2024.1/lib -qopenmp -lstdc++ -fgpu-rdc")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsycl-early-optimizations -fsycl")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsycl-targets=nvptx64-nvidia-cuda")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Xsycl-target-backend --cuda-gpu-arch=sm_80")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -I/opt/intel/oneapi/compiler/2024.1/include -I/usr/local/cuda/include")
-----------------------------------
Then I started to install cloudsc_sycl by running "./cloudsc-bundle build --clean --build-dir=build-sycl --with-gpu --with-sycl --arch=arch/ecmwf/hpc2020/intel-sycl/2024.1 -j 1" and met the following error:
-----------------------------------
[ 69%] Building CXX object cloudsc-dwarf/src/cloudsc_sycl/CMakeFiles/dwarf-cloudsc-scc-sycl-lib.dir/cloudsc/mycpu.cpp.o
icpx: warning: -Z-reserved-lib-stdc++: 'linker' input unused [-Wunused-command-line-argument]
[ 70%] Linking CXX shared library ../../../lib/libdwarf-cloudsc-scc-sycl-lib.so
ptxas fatal : Unresolved extern function 'fmin'
llvm-foreach:
icpx: error: ptxas command failed with exit code 255 (use -v to see invocation)
Intel(R) oneAPI DPC++/C++ Compiler 2024.1.0 (2024.1.0.20240308)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /opt/intel/oneapi/compiler/2024.1/bin/compiler
Configuration file: /opt/intel/oneapi/compiler/2024.1/bin/compiler/../icpx.cfg
icpx: note: diagnostic msg: Error generating preprocessed source(s).
make[2]: *** [cloudsc-dwarf/src/cloudsc_sycl/CMakeFiles/dwarf-cloudsc-scc-sycl-lib.dir/build.make:147: lib/libdwarf-cloudsc-scc-sycl-lib.so] Error 1
make[1]: *** [CMakeFiles/Makefile2:1335: cloudsc-dwarf/src/cloudsc_sycl/CMakeFiles/dwarf-cloudsc-scc-sycl-lib.dir/all] Error 2
make: *** [Makefile:166: all] Error 2
-----------------------------------
I have seen a similar issue on this website "https://github.com/llvm/llvm-project/issues/65403", but adding "-fgpu-rdc" didn't work in my case. Any suggestions?
Thanks!
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs