<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: icpx: error: ptxas command failed with exit code 255 in Intel® oneAPI DPC++/C++ Compiler</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/icpx-error-ptxas-command-failed-with-exit-code-255/m-p/1595419#M3702</link>
    <description>&lt;P&gt;Looks like you need to understand why that "&lt;SPAN&gt;fmin" function is missing. Have you tried the -v to check the invocation?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 07 May 2024 05:55:09 GMT</pubDate>
    <dc:creator>Alex_Y_Intel</dc:creator>
    <dc:date>2024-05-07T05:55:09Z</dc:date>
    <item>
      <title>icpx: error: ptxas command failed with exit code 255</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/icpx-error-ptxas-command-failed-with-exit-code-255/m-p/1593191#M3689</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to install cloudsc_sycl on Nvidia A100 GPU using OneAPI DPC++ compiler.&amp;nbsp;&lt;/P&gt;&lt;P&gt;First, I download&amp;nbsp;cloudsc_sycl from&amp;nbsp;&lt;A href="https://github.com/ecmwf-ifs/dwarf-p-cloudsc/tree/nams_pvc_sycl" target="_blank"&gt;GitHub - ecmwf-ifs/dwarf-p-cloudsc at nams_pvc_sycl&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Then I installed OneAPI for Nvidia GPU following this website:&amp;nbsp;&lt;A href="https://developer.codeplay.com/products/oneapi/nvidia/2023.0.0/guides/get-started-guide-nvidia.html" target="_blank"&gt;Install oneAPI for NVIDIA GPUs - Guides - oneAPI for NVIDIA® GPUs - Products - Codeplay Developer&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is my environment:&lt;/P&gt;&lt;P&gt;-----------------------------------&lt;/P&gt;&lt;P&gt;CUDA Version: 12.4&lt;/P&gt;&lt;P&gt;OneAPI:&amp;nbsp;l_BaseKit_p_2024.1.0.596_offline.sh and&amp;nbsp;l_HPCKit_p_2024.1.0.560_offline.sh&lt;/P&gt;&lt;P&gt;DPC++ plugin:&amp;nbsp;oneapi-for-nvidia-gpus-2024.1.0-cuda-12.0-linux.sh&lt;/P&gt;&lt;P&gt;-----------------------------------&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Following are some settings in env.sh and&amp;nbsp;toolchain.cmake under&amp;nbsp;dwarf-p-cloudsc-nams/arch/ecmwf/hpc2020/intel-sycl/2024.1 dir:&lt;/P&gt;&lt;P&gt;-----------------------------------&lt;/P&gt;&lt;P&gt;env.sh:&lt;/P&gt;&lt;P&gt;export IntelSYCL_DIR="/opt/intel/oneapi/compiler/2024.1/lib/cmake/IntelSYCL"&lt;BR /&gt;export HDF5_ROOT="/usr/local/cloudsc_sycl_libs"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;toolchain.cmake:&lt;/P&gt;&lt;P&gt;set(CMAKE_CXX_COMPILER "/opt/intel/oneapi/compiler/2024.1/bin/icpx")&lt;BR /&gt;set(CMAKE_C_COMPILER "/opt/intel/oneapi/compiler/2024.1/bin/icx")&lt;BR /&gt;set(CMAKE_Fortran_COMPILER "/opt/intel/oneapi/compiler/2024.1/bin/ifort")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;set(CMAKE_C_FLAGS "-O3 -L/opt/intel/oneapi/compiler/2024.1/lib -qopenmp -fgpu-rdc")&lt;BR /&gt;set(CMAKE_CXX_FLAGS "-O3 -L/opt/intel/oneapi/compiler/2024.1/lib -qopenmp -lstdc++ -fgpu-rdc")&lt;BR /&gt;set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsycl-early-optimizations -fsycl")&lt;BR /&gt;set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsycl-targets=nvptx64-nvidia-cuda")&lt;BR /&gt;set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Xsycl-target-backend --cuda-gpu-arch=sm_80")&lt;BR /&gt;set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -I/opt/intel/oneapi/compiler/2024.1/include -I/usr/local/cuda/include")&lt;/P&gt;&lt;P&gt;-----------------------------------&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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:&lt;/P&gt;&lt;P&gt;-----------------------------------&lt;/P&gt;&lt;P&gt;[ 69%] Building CXX object cloudsc-dwarf/src/cloudsc_sycl/CMakeFiles/dwarf-cloudsc-scc-sycl-lib.dir/cloudsc/mycpu.cpp.o&lt;BR /&gt;icpx: warning: -Z-reserved-lib-stdc++: 'linker' input unused [-Wunused-command-line-argument]&lt;BR /&gt;[ 70%] Linking CXX shared library ../../../lib/libdwarf-cloudsc-scc-sycl-lib.so&lt;BR /&gt;ptxas fatal : Unresolved extern function 'fmin'&lt;BR /&gt;llvm-foreach:&lt;BR /&gt;icpx: error: ptxas command failed with exit code 255 (use -v to see invocation)&lt;BR /&gt;Intel(R) oneAPI DPC++/C++ Compiler 2024.1.0 (2024.1.0.20240308)&lt;BR /&gt;Target: x86_64-unknown-linux-gnu&lt;BR /&gt;Thread model: posix&lt;BR /&gt;InstalledDir: /opt/intel/oneapi/compiler/2024.1/bin/compiler&lt;BR /&gt;Configuration file: /opt/intel/oneapi/compiler/2024.1/bin/compiler/../icpx.cfg&lt;BR /&gt;icpx: note: diagnostic msg: Error generating preprocessed source(s).&lt;BR /&gt;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&lt;BR /&gt;make[1]: *** [CMakeFiles/Makefile2:1335: cloudsc-dwarf/src/cloudsc_sycl/CMakeFiles/dwarf-cloudsc-scc-sycl-lib.dir/all] Error 2&lt;BR /&gt;make: *** [Makefile:166: all] Error 2&lt;/P&gt;&lt;P&gt;-----------------------------------&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any suggestions?&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 28 Apr 2024 08:01:06 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/icpx-error-ptxas-command-failed-with-exit-code-255/m-p/1593191#M3689</guid>
      <dc:creator>Jervie</dc:creator>
      <dc:date>2024-04-28T08:01:06Z</dc:date>
    </item>
    <item>
      <title>Re: icpx: error: ptxas command failed with exit code 255</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/icpx-error-ptxas-command-failed-with-exit-code-255/m-p/1595419#M3702</link>
      <description>&lt;P&gt;Looks like you need to understand why that "&lt;SPAN&gt;fmin" function is missing. Have you tried the -v to check the invocation?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 07 May 2024 05:55:09 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/icpx-error-ptxas-command-failed-with-exit-code-255/m-p/1595419#M3702</guid>
      <dc:creator>Alex_Y_Intel</dc:creator>
      <dc:date>2024-05-07T05:55:09Z</dc:date>
    </item>
    <item>
      <title>Re: icpx: error: ptxas command failed with exit code 255</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/icpx-error-ptxas-command-failed-with-exit-code-255/m-p/1595469#M3705</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I added -v as below:&lt;BR /&gt;set(CMAKE_C_FLAGS "-O3 -fgpu-rdc -v -L/opt/intel/oneapi/compiler/2024.1/lib -qopenmp -L/usr/local/cuda/lib64")&lt;BR /&gt;set(CMAKE_CXX_FLAGS "-O3 -fgpu-rdc -v -L/opt/intel/oneapi/compiler/2024.1/lib -qopenmp -lstdc++ -L/usr/local/cuda/lib64")&lt;/P&gt;&lt;P&gt;And I got the follwoing error messages:&lt;BR /&gt;-----------------------------&lt;BR /&gt;"/opt/intel/oneapi/compiler/2024.1/bin/compiler/llvm-foreach" --out-ext=o --in-file-list=/tmp/icpx-bb44e32033/load_state-sm_80-d9163a.s --in-replace=/tmp/icpx-bb44e32033/load_state-sm_80-d9163a.s --out-file-list=/tmp/icpx-bb44e32033/load_state-sm_80-3ab3e6.cubin --out-replace=/tmp/icpx-bb44e32033/load_state-sm_80-3ab3e6.cubin -- /usr/local/cuda-12.0/bin/ptxas -m64 -O3 -v --gpu-name sm_80 --output-file /tmp/icpx-bb44e32033/load_state-sm_80-3ab3e6.cubin /tmp/icpx-bb44e32033/load_state-sm_80-d9163a.s&lt;BR /&gt;ptxas info : 0 bytes gmem&lt;BR /&gt;ptxas info : 0 bytes gmem&lt;BR /&gt;ptxas fatal : Unresolved extern function 'fmin'&lt;BR /&gt;llvm-foreach:&lt;BR /&gt;icpx: error: ptxas command failed with exit code 255 (use -v to see invocation)&lt;BR /&gt;Intel(R) oneAPI DPC++/C++ Compiler 2024.1.0 (2024.1.0.20240308)&lt;BR /&gt;Target: x86_64-unknown-linux-gnu&lt;BR /&gt;Thread model: posix&lt;/P&gt;</description>
      <pubDate>Tue, 07 May 2024 02:05:26 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/icpx-error-ptxas-command-failed-with-exit-code-255/m-p/1595469#M3705</guid>
      <dc:creator>Jervie</dc:creator>
      <dc:date>2024-05-07T02:05:26Z</dc:date>
    </item>
    <item>
      <title>Re: icpx: error: ptxas command failed with exit code 255</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/icpx-error-ptxas-command-failed-with-exit-code-255/m-p/1595478#M3706</link>
      <description>&lt;P&gt;Adding more error messages:&lt;BR /&gt;-----------------------------&lt;BR /&gt;/opt/intel/oneapi/compiler/2024.1/bin/compiler/clang-offload-bundler -type=o -input=CMakeFiles/dwarf-cloudsc-scc-sycl-lib.dir/cloudsc/mycpu.cpp.o -list&lt;BR /&gt;/opt/intel/oneapi/compiler/2024.1/bin/compiler/clang-offload-bundler -type=ao -targets=sycl-fpga_aocx-intel-unknown -input=/usr/local/cuda/lib64/libcudadevrt.a -check-section -base-temp-dir=/tmp/icpx-e2ed2974b6&lt;BR /&gt;/opt/intel/oneapi/compiler/2024.1/bin/compiler/clang-offload-bundler -type=ao -targets=sycl-fpga_aocr-intel-unknown -input=/usr/local/cuda/lib64/libcudadevrt.a -check-section -base-temp-dir=/tmp/icpx-e2ed2974b6&lt;BR /&gt;/opt/intel/oneapi/compiler/2024.1/bin/compiler/clang-offload-bundler -type=ao -targets=sycl-fpga_aocr_emu-intel-unknown -input=/usr/local/cuda/lib64/libcudadevrt.a -check-section -base-temp-dir=/tmp/icpx-e2ed2974b6&lt;BR /&gt;/opt/intel/oneapi/compiler/2024.1/bin/compiler/clang-offload-bundler -type=ao -input=/usr/local/cuda/lib64/libcudadevrt.a -list&lt;BR /&gt;"/opt/intel/oneapi/compiler/2024.1/bin/compiler/llvm-foreach" --out-ext=o --in-file-list=/tmp/icpx-c2c23b019a/load_state-sm_80-c9c042.s --in-replace=/tmp/icpx-c2c23b019a/load_state-sm_80-c9c042.s --out-file-list=/tmp/icpx-c2c23b019a/load_state-sm_80-146846.cubin --out-replace=/tmp/icpx-c2c23b019a/load_state-sm_80-146846.cubin -- /usr/local/cuda-12.0/bin/ptxas -m64 -O3 -v --gpu-name sm_80 --output-file /tmp/icpx-c2c23b019a/load_state-sm_80-146846.cubin /tmp/icpx-c2c23b019a/load_state-sm_80-c9c042.s&lt;BR /&gt;ptxas info : 0 bytes gmem&lt;BR /&gt;ptxas info : 0 bytes gmem&lt;BR /&gt;ptxas fatal : Unresolved extern function 'fmin'&lt;BR /&gt;llvm-foreach:&lt;BR /&gt;icpx: error: ptxas command failed with exit code 255 (use -v to see invocation)&lt;BR /&gt;Intel(R) oneAPI DPC++/C++ Compiler 2024.1.0 (2024.1.0.20240308)&lt;BR /&gt;Target: x86_64-unknown-linux-gnu&lt;BR /&gt;Thread model: posix&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I guess it may be related to CUDA. When using CUDA nvcc, adding&amp;nbsp;&lt;SPAN&gt;-rdc=true as an compiler option may solve the "Unresolved extern function 'xxxxx' " issue. As for icpx, I found the compiler option "-fgpu-rdc", but it didn't solve my problem.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 May 2024 02:18:43 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/icpx-error-ptxas-command-failed-with-exit-code-255/m-p/1595478#M3706</guid>
      <dc:creator>Jervie</dc:creator>
      <dc:date>2024-05-07T02:18:43Z</dc:date>
    </item>
  </channel>
</rss>

