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

build is running cmake at every time step #31

Open
petermao opened this issue Jan 6, 2022 · 1 comment
Open

build is running cmake at every time step #31

petermao opened this issue Jan 6, 2022 · 1 comment

Comments

@petermao
Copy link

petermao commented Jan 6, 2022

after e545b56, build is running cmake at every time step, slowing things down considerably, rather than only on the first running of iri2016.IRI(.)

I am seeing one iteration of this output at every time step:

-- Configuring done
-- Generating done
-- Build files have been written to: <path-to...>/lib/python/site-packages/iri2016-1.11.1-py3.7.egg/iri2016/build
Scanning dependencies of target iri2016
[ 63%] Built target iri2016
Scanning dependencies of target iri2016_driver
Scanning dependencies of target test_iri2016
[100%] Built target iri2016_driver
[100%] Built target test_iri2016

Should this line be reinstated?

if not importlib.resources.is_resource(__package__, exe_name):

petermao added a commit to petermao/iri2016 that referenced this issue Jan 7, 2022
see space-physics#31

build can be explicitly called later with
```
from iri2016.build import build
build()
```
petermao added a commit to petermao/iri2016 that referenced this issue Jan 11, 2022
build can be explicitly called later with
```
from iri2016.build import build
build()
```
@petermao
Copy link
Author

petermao commented Mar 5, 2022

My solution above is not totally satisfactory, either. If I tweak iri2016_driver.f90 and do a pip install . --user from the top level of the iri2016 package, most of the code updates in the install location, but the old compiled iri2016_driver remains.

In order to run the new code, I run (in python)

import iri2016 as iri
iri.build.build()

and then everything is as expected.

Can the "build on run" logic be modified to rerun build if the compiled iri2016_driver is older than the source files?

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

No branches or pull requests

1 participant