Closed henrus closed 8 years ago
I've done quite a step towards this in commit 4b07f7d821a0ac96ea8046d3f1d2370570a157e9
Next step is to move the model modules for the two tanks example zoo into common directory.
I think we are almost there. The only issue I see is that python must be able to find the library, ie. PYTHONPATH must be adapted. I think this is just logical not a major issue.
I pulled #32. Looks good. initModels and workflow will be need to go into a unified driver script, ie. incorporated into the main library.
examples/twoTanksChained and examples/twoTanksFortran fail for me ...
Not sure what you mean by "Note that I am still doing the path mangling. I am not sure of what would be the best way to proceed in order to get rid of it, there are several options."?
@not working examples The chained example I cannot explain, but Fortran did not work for me even before I started doing the surgery.
@path mangling If you for instance look in models/twoTank/twoTank.py you see:
script = os.path.dirname(os.path.abspath(file)) + "/src/twoTanksMacroscopicProblem"
where it used to be:
script = "../src/twoTanksMacroscopicProblem"
The problem is that I do not know how to let cmake compile the executables in the simulation directory. If I can do that we can go back to the “old” style of using the relative path to the executables.
In order to solve this I somehow need to let cmake know:
Ideally I want to do that with minimal effort from the user.
Sigve
On 3 October 2015 at 13:50, Henrik Rusche notifications@github.com wrote:
I pulled #32 https://github.com/MoDeNa-EUProject/MoDeNa/pull/32. Looks good. initModels and workflow will be need to go into a unified driver script, ie. incorporated into the main library.
examples/twoTanksChained and examples/twoTanksFortran fail for me ...
Not sure what you mean by "Note that I am still doing the path mangling. I am not sure of what would be the best way to proceed in order to get rid of it, there are several options."?
— Reply to this email directly or view it on GitHub https://github.com/MoDeNa-EUProject/MoDeNa/issues/4#issuecomment-145242392 .
I fixed the Fortran example in 6cd22a42e
Hi Sigve,
I don't think that the absolute paths are actually a problem. These applications could be big and there should be no need to compile them per simulation.
Henrik
With this enhancement everything that a model needs will be stored in a single python module. See modelModules branch for work in progress.