Skip to content

Conversation

@jameskermode
Copy link
Member

Summary

  • Update gapversion script to use .F90 file extensions instead of .f95
  • Add -lgomp link argument to meson.build for OpenMP support

Background

These changes fix build issues when building GAP with the meson build system. The gapversion script was looking for .f95 files which have been renamed to .F90, and the OpenMP library was not being linked correctly.

Test plan

  • Verified GAP builds successfully with meson
  • Verified gapversion script correctly identifies version
  • Verified OpenMP functionality works correctly

🤖 Generated with Claude Code

albapa and others added 7 commits April 9, 2025 17:29
- Update gapversion script to use .F90 file extensions instead of .f95
- Add -lgomp link argument to meson.build for OpenMP support

These changes fix build issues when building GAP with the meson build system.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Fixed format descriptor in gap_fit_module.F90 line 1603 to be compatible
with gfortran 15.1.0. Changed from:
  write(gp_label,'("GAP_"7(i0,"_")i0)')
to:
  write(gp_label,'("GAP_",7(i0,"_"),i0)')

This adds the required comma separators between format descriptors, which
gfortran 15.1.0 enforces more strictly. The generated unique IDs remain
identical in format.

Error fixed:
  Fortran runtime error: Missing comma between descriptors

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
albapa pushed a commit to libAtoms/QUIP that referenced this pull request Jan 29, 2026
This commit completes the migration to meson-python build system and fixes
all critical test failures. 39 of 42 tests now pass (3 GAP numerical
mismatches remain due to GAP version differences and require human review).

## Build System Changes

### Quippy Package Configuration
- Add quippy/meson.build: Complete meson build configuration for f90wrap
  wrapper generation and Python extension building
- Add quippy/pyproject.toml: PEP 517 build configuration with meson-python
- Add quippy/patch_f90wrap_interfaces.py: Script to fix f90wrap overloaded
  interface shadowing bugs
- Add quippy/quippy/__init__.py: Package initialization with proper module
  imports and lazy loading

### GitHub Workflows
- Update .github/workflows/build-wheels.yml: Modernize wheel build workflow
  for meson-python
- Update .github/workflows/prepare-wheel-build.sh: Add meson build
  preparation steps

### Meson Build Files
- Update meson.build: Fix main project configuration
- Update src/libAtoms/meson.build: Add missing OpenMP dependency
- Update src/Potentials/meson.build: Add -lgomp link argument
- Update src/Utils/meson.build: Add -lgomp link argument
- Update src/GAP submodule: Point to mesonify-fixes branch with gapversion
  and meson.build fixes

## Bug Fixes

### Dictionary Integer Conversion (quippy/quippy/convert.py)
- Fix get_dict_arrays() to use type-specific get_value methods instead of
  overloaded interface
- Add type detection using get_type_and_size() before value retrieval
- Prevents incorrect return of 0 for integer values stored in dictionaries
- Fixes test_convert_add_from_info

### Potential Initialization (quippy/quippy/potential.py)
- Fix Potential.__init__ to pass f90wrap handle correctly
- Change from passing Fortran object to passing _handle attribute
- Fixes RuntimeError in Potential initialization

### Regex SyntaxWarnings (quippy/quippy/gap_tools.py)
- Escape backslashes in regex patterns to fix SyntaxWarnings
- Change r'\s' to r'\\s' in regex patterns

## Test Updates

### Test Configuration (tests/run_all.py)
- Set QUIP_WHEEL_TEST=1 to skip shell script tests requiring Fortran binaries
- Add missing os import

### Test Compatibility Fixes
- Update tests/quippytest.py: Remove quippy.descriptors import
- Update tests/test_SOAP.py: Fix descriptor imports
- Update tests/test_descriptor.py: Fix descriptor imports
- Update tests/test_filepot.py: Fix TEST_DIR path handling
- Update tests/test_gapfit.py: Remove unused import
- Update tests/test_gappot.py: Fix imports and path handling
- Update tests/test_potential_cell.py: Fix imports
- Update tests/test_sumpot.py: Fix imports

## Test Results
- 39 of 42 tests passing
- 3 failures: GAP/SOAP numerical mismatches (different GAP versions - needs
  human verification)
- 4 skipped: matscipy (not installed), gap_fit (executable not in wheel),
  shell scripts (require Fortran binaries)

## Related PRs
- GAP submodule fixes: libAtoms/GAP#93
- f90wrap _alloc fixes: https://github.com/smjanke/f90wrap (fork)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants