grimme-lab / xtb

Semiempirical Extended Tight-Binding Program Package
https://xtb-docs.readthedocs.io/
GNU Lesser General Public License v3.0
595 stars 148 forks source link

Build Error When Enabling GPU Support: Unsupported C Standard #1035

Open ORCAaAaA-ui opened 6 months ago

ORCAaAaA-ui commented 6 months ago

Hello,

I'm trying to build xtb with GPU support on my system and have followed the instructions from the documentation (Building with GPU support). However, I've encountered an issue during the setup with Meson. Here are the steps I followed and the resulting error:

Command:

module load nvhpc
export FC=nvfortran CC=nvc
meson setup build_gpu --prefix=$HOME/.local -Dlapack=netlib -Dgpu=true -Dcusolver=true
Error: 

The Meson build system
Version: 1.4.0
Source dir: /home/jeon/sw/xtb
Build dir: /home/jeon/sw/xtb/build_gpu
Build type: native build
Project name: xtb
Project version: 6.7.0
Fortran compiler for the host machine: nvfortran (nvidia_hpc 24.3-0)
Fortran linker for the host machine: nvfortran pgi 24.3-0

meson.build:19:0: ERROR: None of values ['c11'] are supported by the C compiler. Possible values are ['none']

It seems that the Meson is unable to recognize 'c11' as a supported C standard for the nvc compiler I am using. Is there a way to bypass this issue, or is there a specific configuration that I need to apply for the nvc compiler to recognize the C standard?

Any guidance on how to resolve this would be greatly appreciated.

Thank you!

icamps commented 6 months ago

Having the same issue here.

nielskm commented 6 months ago

I believe this is a duplicate of #723. It is possible to fix the setup step using -Dc_std=none and various other flags, but the nvfortran compiler is still not able to build the json library.