Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

meson and NVIDIA HPC SDK #13216

Open
icamps opened this issue May 15, 2024 · 4 comments
Open

meson and NVIDIA HPC SDK #13216

icamps opened this issue May 15, 2024 · 4 comments

Comments

@icamps
Copy link

icamps commented May 15, 2024

Describe the bug
Running meson.build.txt with NVIDIA HPC compilers returned:

meson/meson.build:168:12: ERROR: Delimiters not found in preprocessor output.

    This is a Meson bug and should be reported!

To Reproduce
File included. It is part of the xTB software.

Expected behavior
Compile without any issue.

system parameters

  • Is this a cross build or just a plain native build (for the same computer)?
    native build

  • what operating system (e.g. MacOS Catalina, Windows 10, CentOS 8.0, Ubuntu 18.04, etc.)
    Ubuntu 22.04.4 LTS

  • what Python version are you using e.g. 3.8.0
    3.12.2

  • what meson --version
    1.4.0

  • what ninja --version if it's a Ninja build
    1.10.1

@eli-schwartz
Copy link
Member

The uploaded file is incorrect. The error message says it is this meson.build file in a subdirectory to blame:

https://github.com/grimme-lab/xtb/blob/v6.7.0/meson/meson.build#L168

  omp_dep = dependency('openmp', required: fc.get_id() != 'intel' and fc.get_id() != 'nvidia_hpc')

This comes from:

openmp_date = self.clib_compiler.get_define(
'_OPENMP', '', self.env, self.clib_compiler.openmp_flags(), [self], disable_cache=True)[0]
except mesonlib.EnvironmentException as e:
mlog.debug('OpenMP support not available in the compiler')
mlog.debug(e)
openmp_date = None

get_define raises this:
# Get the preprocessed value between the delimiters
star_idx = p.stdout.find(delim_start)
end_idx = p.stdout.rfind(delim_end)
if (star_idx == -1) or (end_idx == -1) or (star_idx == end_idx):
raise mesonlib.MesonBugException('Delimiters not found in preprocessor output.')
define_value = p.stdout[star_idx + len(delim_start):end_idx]

@icamps please post your meson-log.txt as it should have the debug information relevant to solving your issue.

@icamps
Copy link
Author

icamps commented May 16, 2024

@eli-schwartz sorry for my mistake.

Here is the meson-log.txt file attached.
meson-log.txt

@eli-schwartz
Copy link
Member

Thanks.

Running compile:
Working directory:  /tmp/tmpfezuttav
Code:
 
        
        #ifndef _OPENMP
        # define _OPENMP "MESON_GET_DEFINE_UNDEFINED_SENTINEL"
        #endif
        "MESON_GET_DEFINE_DELIMITER_START"
_OPENMP
"MESON_GET_DEFINE_DELIMITER_END"
-----------
Command line: `nvc /tmp/tmpfezuttav/testfile.c -E -P -P -O0 -mp` -> 0

meson/meson.build:168:12: ERROR: Delimiters not found in preprocessor output.

So the question is, what is nvc actually returning for that code...

@icamps
Copy link
Author

icamps commented May 16, 2024

That file, testfile.c, is not part of the xTB program. I didn't find it and the temporary folders are deleted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants