Skip to content

Commit

Permalink
Merge branch 'develop' into meson_extension_experiment
Browse files Browse the repository at this point in the history
  • Loading branch information
gbarter committed Jan 8, 2024
2 parents 99e511b + 5977a60 commit 08a12bf
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/CI_pyHAMS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
env:
MESON_ARGS: -Dpython_target=${{ steps.cp.outputs.python-path }}
run: |
'${{ steps.cp.outputs.python-path }}' -m pip install -vv -e .
'${{ steps.cp.outputs.python-path }}' -m pip install -v -e .
- name: Test run
run: |
Expand Down
9 changes: 6 additions & 3 deletions pyhams/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,13 @@ inc_np = include_directories(incdir_numpy, incdir_f2py)
# input : ['src/HAMS_Prog.f90'],
# output : ['_hamsmodule.c', '_hams-f2pywrappers2.f90'],
# command: [py3, '-m', 'numpy.f2py',
# '@INPUT@', '-m', '_hams', '--lower', '--build-dir', 'pyhams']
# '@INPUT@', '-m', '_hams', '--lower',
# '--build-dir', 'pyhams']
# )

# Source order is important for dependencies
py3.extension_module('_hams',
'src/WavDynMods.f90',
['src/WavDynMods.f90',
'src/PatclVelct.f90',
'src/BodyIntgr.f90',
'src/BodyIntgr_irr.f90',
Expand All @@ -54,9 +55,11 @@ py3.extension_module('_hams',
'src/SolveMotion.f90',
'src/WavDynSubs.f90',
'src/HAMS_Prog.f90',
'src/_hamsmodule.c',
'src/_hams-f2pywrappers2.f90',
'src/_hamsmodule.c',
fortranobject_c,
],
#hams_connect,
include_directories: inc_np,
dependencies : [py3_dep, lapack, omp],
subdir: 'pyhams',
Expand Down
8 changes: 4 additions & 4 deletions pyhams/src/_hams-f2pywrappers2.f90
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
! It contains Fortran 90 wrappers to fortran functions.


subroutine f2pyinitHAMS_Full(f2pysetupfunc)
use HAMS_Full, only : Exec
subroutine f2pyinithams_full(f2pysetupfunc)
use hams_full, only : exec
external f2pysetupfunc
call f2pysetupfunc(Exec)
end subroutine f2pyinitHAMS_Full
call f2pysetupfunc(exec)
end subroutine f2pyinithams_full


32 changes: 16 additions & 16 deletions pyhams/src/_hamsmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* This file is auto-generated with f2py (version:1.26.2).
* f2py is a Fortran to Python Interface Generator (FPIG), Second Edition,
* written by Pearu Peterson <[email protected]>.
* Generation date: Mon Jan 8 01:52:49 2024
* Generation date: Mon Jan 8 04:40:53 2024
* Do not edit this file directly unless you know what you are doing!!!
*/

Expand Down Expand Up @@ -112,12 +112,12 @@ static PyObject *_hams_module;

/*********************** See f2py2e/rules.py: buildapi ***********************/

/************************************ Exec ************************************/
static char doc_f2py_rout__hams_HAMS_Full_Exec[] = "\
Exec()\n\nWrapper for ``Exec``.\
/************************************ exec ************************************/
static char doc_f2py_rout__hams_hams_full_exec[] = "\
exec()\n\nWrapper for ``exec``.\
\n";
/* */
static PyObject *f2py_rout__hams_HAMS_Full_Exec(const PyObject *capi_self,
static PyObject *f2py_rout__hams_hams_full_exec(const PyObject *capi_self,
PyObject *capi_args,
PyObject *capi_keywds,
void (*f2py_func)(void)) {
Expand All @@ -132,7 +132,7 @@ static PyObject *f2py_rout__hams_HAMS_Full_Exec(const PyObject *capi_self,
f2py_start_clock();
#endif
if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
"|:_hams.HAMS_Full.Exec",\
"|:_hams.hams_full.exec",\
capi_kwlist))
return NULL;
/*frompyobj*/
Expand Down Expand Up @@ -170,23 +170,23 @@ f2py_stop_clock();
#endif
return capi_buildvalue;
}
/******************************** end of Exec ********************************/
/******************************** end of exec ********************************/
/*eof body*/

/******************* See f2py2e/f90mod_rules.py: buildhooks *******************/

static FortranDataDef f2py_HAMS_Full_def[] = {
{"Exec",-1,{{-1}},0,0,NULL,(void *)f2py_rout__hams_HAMS_Full_Exec,doc_f2py_rout__hams_HAMS_Full_Exec},
static FortranDataDef f2py_hams_full_def[] = {
{"exec",-1,{{-1}},0,0,NULL,(void *)f2py_rout__hams_hams_full_exec,doc_f2py_rout__hams_hams_full_exec},
{NULL}
};

static void f2py_setup_HAMS_Full(char *Exec) {
static void f2py_setup_hams_full(char *exec) {
int i_f2py=0;
f2py_HAMS_Full_def[i_f2py++].data = Exec;
f2py_hams_full_def[i_f2py++].data = exec;
}
extern void F_FUNC_US(f2pyinitHAMS_Full,F2PYINITHAMS_FULL)(void (*)(char *));
static void f2py_init_HAMS_Full(void) {
F_FUNC_US(f2pyinitHAMS_Full,F2PYINITHAMS_FULL)(f2py_setup_HAMS_Full);
extern void F_FUNC_US(f2pyinithams_full,F2PYINITHAMS_FULL)(void (*)(char *));
static void f2py_init_hams_full(void) {
F_FUNC_US(f2pyinithams_full,F2PYINITHAMS_FULL)(f2py_setup_hams_full);
}

/*need_f90modhooks*/
Expand Down Expand Up @@ -236,7 +236,7 @@ PyMODINIT_FUNC PyInit__hams(void) {
Py_DECREF(s);
s = PyUnicode_FromString(
"This module '_hams' is auto-generated with f2py (version:1.26.2).\nFunctions:\n"
"Fortran 90/95 modules:\n"" HAMS_Full --- Exec()"".");
"Fortran 90/95 modules:\n"" hams_full --- exec()"".");
PyDict_SetItemString(d, "__doc__", s);
Py_DECREF(s);
s = PyUnicode_FromString("1.26.2");
Expand All @@ -256,7 +256,7 @@ PyMODINIT_FUNC PyInit__hams(void) {
}

/*eof initf2pywraphooks*/
PyDict_SetItemString(d, "HAMS_Full", PyFortranObject_New(f2py_HAMS_Full_def,f2py_init_HAMS_Full));
PyDict_SetItemString(d, "hams_full", PyFortranObject_New(f2py_hams_full_def,f2py_init_hams_full));
/*eof initf90modhooks*/

/*eof initcommonhooks*/
Expand Down

0 comments on commit 08a12bf

Please sign in to comment.