-
-
Notifications
You must be signed in to change notification settings - Fork 13
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
Replay mode for ASTE #100
Replay mode for ASTE #100
Conversation
This reverts commit 0b0b832.
The config file format is good, I like it. I ran the replay mode case using our quickstart. Some comments:
|
Definitely a good idea.
Actually, these ones would need a "debug" level logger in my perspective. Let's add more clear explanation now and change it to debug level later
We are now only supporting vtu/vtk files for all taste tools.
Both meshes should be able to get |
…t/aste into set_configs_from_preciceconfig
Now starting from arbitrary timestep[dt] (>=1) is possible, example configuration file is {
"participant": "Fluid",
"starttime": 1,
"meshes": [
{
"mesh": "Fluid-Mesh",
"meshfileprefix": "/path/to/fluid/meshes/Fluid-Mesh-Fluid",
"read-data": {
"vector": [
"Displacement"
]
},
"write-data": {
"vector": [
"Force"
]
}
}
],
"precice-config": "/path/to/precice/confg/precice-config.xml"
}
|
The MPI error is gone now, thanks. Further remarks:
|
This seems strange I will try to reproduce it
Yes, I will change the logic definitely. Since the parsing is always in order I just need to locate position of current timestep.
How about
Ah it seems while moving to modes I missed finalize preCICE :)
I literally have no idea how we can check this. |
The problem with
Stall problem is solved, it won't stall anymore, finalize correctly. Start end and mesh filenames for first mesh will be printed to screen.
|
With the current configuration, I just get an error preciceMap --aste-config config.json
terminate called after throwing an instance of 'nlohmann::detail::type_error'
what(): [json.exception.type_error.302] type must be number, but is null
Looks good, but I would prefer if we get the #73 also done for the cpp part (as discussed using the boost logger) so that we can print an error message formatted similar to preCICE. |
I am also looking for the boost logger PR for that one will come soon after the merging of this one, since this PR actually has a huge change in the code with current version changing the logging does not make any sense to me |
No, I actually changed this part. Even if this would be the case, we should exit in an understandable way stating that an option was missing or unknown to the parser. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The parsing error is now much better, thanks. One we still need to catch properly would be 'file not found'.
src/mesh.cpp
Outdated
void readData(Mesh &mesh, const std::string &filename) | ||
{ | ||
if (!fs::is_regular_file(filename)) { | ||
throw std::invalid_argument{"The mesh file does not exist: " + filename}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using throw at this place is in principle fine. However, due to precice/precice#964, this will currently lead to a deadlock. Can we use a macro instead (and maybe for the moment rather exit
instead of throw?), where we change this easily in the future?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have changed all them to print to std::cerr
which will be replaced later on logging error. Depend on location I use MPI_Abort
or std::exit
.
src/utilities.hpp
Outdated
* @param interface | ||
* @param mesh | ||
* @param meshID |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add some descriptions here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More explicit descriptions are added. Done.
Co-authored-by: David Schneider <[email protected]>
Thanks! |
Make up for wrongly merged PR #85