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

CI build failures for type_check example #242

Closed
jameskermode opened this issue Jan 3, 2025 · 1 comment · Fixed by #243
Closed

CI build failures for type_check example #242

jameskermode opened this issue Jan 3, 2025 · 1 comment · Fixed by #243

Comments

@jameskermode
Copy link
Owner

The CI build configuration problems should now be fixed in #241, however it appears they were masking a problem with the type_check example which does not build in CI on either Linux or macOS. I dug into this a bit and reproduced manually (testing on MacOS with gfortran 14.2). Error is:

FAILED: _pywrapper.cpython-312-darwin.so.p/f90wrap_main.f90.o
gfortran -I_pywrapper.cpython-312-darwin.so.p -I. -I.. -I/Users/u1470235/gits/f90wrap/.venv/lib/python3.12/site-packages/numpy/_core/include -I/Users/u1470235/gits/f90wrap/.venv/lib/python3.12/site-packages/numpy/f2py/src -I/install/include/python3.12 -I/Users/u1470235/.local/share/uv/python/cpython-3.12.5-macos-aarch64-none/include/python3.12 -fvisibility=hidden -fdiagnostics-color=always -Wall -O3 -Wno-conversion -xf95-cpp-input -fPIC -J_pywrapper.cpython-312-darwin.so.p -o _pywrapper.cpython-312-darwin.so.p/f90wrap_main.f90.o -c ../f90wrap_main.f90
f951: Warning: Nonexistent include directory '/install/include/python3.12' [-Wmissing-include-dirs]
../f90wrap_main.f90:284:17:

  284 |     ret_output = in_scalar(input=input)
      |                 1
Error: There is no specific function for the generic 'in_scalar' at (1)
../f90wrap_main.f90:313:17:

  313 |     ret_output = in_scalar(input=input)
      |                 1
Error: There is no specific function for the generic 'in_scalar' at (1)

There seem to be mismatched int and real kinds in the generated wrappers. Editing the generated f90wrap_main.f90 manually as follows produced something that compiled:

diff -u _copy f90wrap_main.f90
--- _copy	2025-01-03 13:30:07
+++ f90wrap_main.f90	2025-01-03 13:30:43
@@ -279,7 +279,7 @@

     integer :: f90wrap_n0
     !f2py intent(hide), depend(input) :: f90wrap_n0 = shape(input,0)
-    integer(4), intent(in), dimension(f90wrap_n0) :: input
+    integer(8), intent(in), dimension(f90wrap_n0) :: input
     integer(4), intent(out) :: ret_output
     ret_output = in_scalar(input=input)
 end subroutine f90wrap_m_type_test__in_array_int64
@@ -308,7 +308,7 @@

     integer :: f90wrap_n0
     !f2py intent(hide), depend(input) :: f90wrap_n0 = shape(input,0)
-    real(4), intent(in), dimension(f90wrap_n0) :: input
+    real(8), intent(in), dimension(f90wrap_n0) :: input
     integer(4), intent(out) :: ret_output
     ret_output = in_scalar(input=input)
 end subroutine f90wrap_m_type_test__in_array_real64

@danbeibei please can you take a look?

@krystophny
Copy link
Contributor

krystophny commented Jan 5, 2025

Looks like the kind.map was not included in the Makefile.meson of examples/type_check. There was a second issue in examples/return_array where I replaced the tests.py by test.py. Let's see now if it builds on #243 .

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 a pull request may close this issue.

2 participants