Skip to content

Support NVidia HPC SDK (PGI/NVCC) on Ubuntu/Debian Systems  #2531

Closed
@nachovizzo

Description

@nachovizzo

As far as I know, you've introduced support for the PGI compilers in #2475.

But I fail to build pybind11 with the PGI compilers. gcc and clang works in my case.

I also tried to reproduce the steps on the CI/CD scripts, but this looks to be running CentOS and not a Debian based distribution.

The compilers I have on my system are
pgi:

pgcc (aka nvc) 20.7-0 LLVM 64-bit target on x86-64 Linux -tp skylake 
PGI Compilers and Tools
Copyright (c) 2020, NVIDIA CORPORATION.  All rights reserved.

pgc++:

pgc++ (aka nvc++) 20.7-0 LLVM 64-bit target on x86-64 Linux -tp skylake 
PGI Compilers and Tools
Copyright (c) 2020, NVIDIA CORPORATION.  All rights reserved.

After downloading eigen from source -DDOWNLOAD_EIGEN=ON and following applying this patch I managed to "build more" stuff, but not everything:

[  4%] Built target cross_module_gil_utils
[  8%] Built target external_module
[ 14%] Built target test_embed
[ 18%] Built target pybind11_cross_module_tests
[ 20%] Building CXX object tests/CMakeFiles/pybind11_tests.dir/test_eigen.cpp.o
At end of source: warning: routine is both "inline" and "noinline"

NVC++-F-0000-Internal compiler error. msz_dtype, bad value    2554  (/home/ivizzo/dev/libs/pybind11/tests/test_eigen.cpp: 464)
NVC++/x86-64 Linux 20.7-0: compilation aborted
make[2]: *** [tests/CMakeFiles/pybind11_tests.dir/build.make:219: tests/CMakeFiles/pybind11_tests.dir/test_eigen.cpp.o] Error 2
make[1]: *** [CMakeFiles/Makefile2:291: tests/CMakeFiles/pybind11_tests.dir/all] Error 2
make: *** [Makefile:130: all] Error 2

And the build line is:

cd /home/ivizzo/dev/libs/pybind11/build/tests && /opt/nvidia/hpc_sdk/Linux_x86_64/2020/compilers/bin/pgc++  -DPYBIND11_TEST_BOOST -DPYBIND11_TEST_EIGEN -Dpybind11_tests_EXPORTS -I/home/ivizzo/dev/libs/pybind11/include -I/usr/include/python3.8 -I/home/ivizzo/dev/libs/pybind11/build/_deps/eigen-src  -O2 -s -DNDEBUG -fPIC   --c++14 -A -o CMakeFiles/pybind11_tests.dir/test_eigen.cpp.o -c /home/ivizzo/dev/libs/pybind11/tests/test_eigen.cpp
At end of source: warning: routine is both "inline" and "noinline"

NVC++-F-0000-Internal compiler error. msz_dtype, bad value    2554  (/home/ivizzo/dev/libs/pybind11/tests/test_eigen.cpp: 464)
NVC++/x86-64 Linux 20.7-0: compilation aborted
make[2]: *** [tests/CMakeFiles/pybind11_tests.dir/build.make:219: tests/CMakeFiles/pybind11_tests.dir/test_eigen.cpp.o] Error 2
make[2]: Leaving directory '/home/ivizzo/dev/libs/pybind11/build'
make[1]: *** [CMakeFiles/Makefile2:291: tests/CMakeFiles/pybind11_tests.dir/all] Error 2
make[1]: Leaving directory '/home/ivizzo/dev/libs/pybind11/build'
make: *** [Makefile:130: all] Error 2

I've also tried skipping the pybind11_tests and installing the header files, but when I try to build a simple application I get these type errors on my build application:

"/usr/local/include/pybind11/cast.h", line 2196: error: no instance of
          overloaded function "pybind11::detail::collect_arguments" matches the
          argument list
            argument types are: (const char *const)
      return detail::collect_arguments<policy>(std::forward<Args>(args)...).call(derived().ptr());
             ^
          detected during:
            instantiation of "pybind11::object
                      pybind11::detail::object_api<Derived>::operator()(Args
                      &&...) const [with
                      Derived=pybind11::detail::accessor<pybind11::detail::acce
                      ssor_policies::str_attr>,
                      policy=pybind11::return_value_policy::automatic_reference
                      , Args=<const char *const &>]" at line 1573 of
                      "/usr/local/include/pybind11/pytypes.h"
            instantiation of "bool
                      pybind11::detail::object_api<Derived>::contains(T &&)
                      const [with Derived=pybind11::handle, T=const char *const
                      &]" at line 260 of
                      "/usr/local/include/pybind11/detail/internals.h"

Any idea on how can I make this work? Thanks in advance

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions