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

Problematic point coordinates of membrane vertices in output RBC vtp #776

Closed
CharlesQiZhou opened this issue Nov 10, 2021 · 9 comments · Fixed by #792
Closed

Problematic point coordinates of membrane vertices in output RBC vtp #776

CharlesQiZhou opened this issue Nov 10, 2021 · 9 comments · Fixed by #792

Comments

@CharlesQiZhou
Copy link
Contributor

Multiple problematic values (e.g. nan, 0, -1) are found for the point coordinates of RBC membrane vertices (cells output from the simulation as vtp files). These problematic coordinates are presumably caused by some error of the VTK writing functions. See a snapshot of the problematic points as below:

RBCvtp_pointDataErrors

@CharlesQiZhou
Copy link
Contributor Author

@mobernabeu @rupertnash

Suspicious commits related to the above issue:
8e858e0
cd357fa
10b12ff

@mobernabeu
Copy link
Contributor

Thanks @CharlesQiZhou. I'd like you to write a unit tests that reproduces the problem and debug it locally (using some traces inside the writer) rather than in ARCHER2.

An idea could be to take a look at tests/redblood/RedBloodMeshTests.cc and based on the test testVTPReadMesh, make a similar one that reads a mesh, writes it to disc, and reads it back to check that the coordinates have not changed.

To run the unit tests, you need to run the executable tests/hemelb-tests in your build directory. It should be possible to specify a single unit test to be run, but I'm not that familiar with Catch2 yet.

Please make a new branch for the test, push it to Github, and pull request it against main so that we can give you feedback looking at the code.

(cc @Romain-Enjalbert FYI)

@rupertnash
Copy link
Member

Apols for not making any progress here: one thought I had, is this an IO problem or has something gone wrong with the cell integration so a coordinate is NaN?

@mobernabeu
Copy link
Contributor

Good call. I'm hoping that an appropriate unit tests will tell us whether this is a regression after the merge or not.

@mobernabeu
Copy link
Contributor

How to call individual tests in Catch2: https://github.com/catchorg/Catch2/blob/devel/docs/command-line.md

First I thought that the naming convention in TEST_CASE is weird but then I discovered that one can pass regex-like expressions to select individual tests. Pretty cool!

@rupertnash
Copy link
Member

@CharlesQiZhou - I think I've fixed this in #792 - can you check please?

@CharlesQiZhou
Copy link
Contributor Author

@CharlesQiZhou - I think I've fixed this in #792 - can you check please?

Thanks @rupertnash. I ran a RBC test locally after git pull and rebuilding HemeLB. Unfortunately the issue is still there (see inf and nan values in the snapshot below).
BTW, I got a "Invalid MIT-MAGIC-COOKIE-1 key" running the simulation. Seems new, what is that?
image

@rupertnash
Copy link
Member

The MIT magic cookie thing is something to do with X11 - I'm not really sure why that is coming up running hemelb as that has no GUI. Perhaps there's something in the build of VTK you are using?

@CharlesQiZhou
Copy link
Contributor Author

Thanks @rupertnash for discussion offline. This is to confirm that the cell VTK issue is now gone, and we can close the ticket.

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

Successfully merging a pull request may close this issue.

3 participants