-
Notifications
You must be signed in to change notification settings - Fork 1
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
Move from ESMA_cmake to f2py-cmake #19
Comments
As noted by @amdasilva when he tested this, this does build but it doesn't run. For example:
and the same for
|
I thought I had one fix which is that foreach(file IN LISTS ALL_FILES)
if("${file}" MATCHES "\\.f90$")
set(HAS_F90_FILE TRUE)
break()
endif()
endforeach() this is simple enough to fix by adding a: if("${file}" MATCHES "\\.F90$")
set(HAS_F90_FILE TRUE)
break()
endif() in there. But this doesn't seem to do much. |
One more thing I notice is that the f2pywrapper files are empty:
So it's almost like the code isn't actually doing what I think it should. My call sequence is pretty boring: # Library: plumerise
# ------------------
add_library (plumerise
LockePlume_Mod.F90
rconstants.F90
FreitasPlume_Mod.F90
qsat_Mod.F90
)
install(TARGETS plumerise DESTINATION lib/Python/plumerise)
# Module: FreitasPlume
# --------------------
f2py_object_library(FreitasPlume_object OBJECT)
f2py_generate_module(FreitasPlume_ FreitasPlume_py.F90 OUTPUT_VARIABLE FreitasPlume_files)
python_add_library(FreitasPlume_ MODULE "${FreitasPlume_files}" WITH_SOABI)
target_link_libraries(FreitasPlume_ PRIVATE Python::NumPy)
target_link_libraries(FreitasPlume_ PRIVATE FreitasPlume_object)
target_link_libraries(FreitasPlume_ PRIVATE plumerise)
target_link_libraries(FreitasPlume_ PRIVATE OpenMP::OpenMP_Fortran)
install(TARGETS FreitasPlume_ DESTINATION lib/Python/plumerise) |
Per @amdasilva, QFED (and GMAOpyobs) are pure Python compare to a lot of GEOS-ESM packages. As such, they really have no need for ESMA_cmake or ecbuild, say. However, they do use f2py a lot and our f2py CMake code is in ESMA_cmake.
But, @amdasilva pointed me to
f2py-cmake
by @henryiii.I have a first rough version of the transition in the
feature/mathomp4/plume-no-esma
branch (which is based off offeature/#17/adasilva/plume_rise
)ETA: NOTE: The
f2py-cmake
code in my branch is a modified version of the stock code, see scikit-build/f2py-cmake#21 where we have some fixes to allow it to be run more than once.The text was updated successfully, but these errors were encountered: