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

Unit testing #4

Open
mondus opened this issue Apr 4, 2023 · 4 comments · May be fixed by #76
Open

Unit testing #4

mondus opened this issue Apr 4, 2023 · 4 comments · May be fixed by #76
Assignees
Labels
hackathon online-training Tasks towards the online training feature testing Related to FTorch testing

Comments

@mondus
Copy link
Contributor

mondus commented Apr 4, 2023

Unit testing is absolutely required for this code. Ideally this could be done using Fortran by invoking the C API.

@mondus
Copy link
Contributor Author

mondus commented Apr 6, 2023

Suggestions from @christopheredsall are

  • funit - now achieved
  • pfunit - recommended and used at MET office

There must be a good way to integrate with Cmake to do test discovery. Some googling required.

@mondus
Copy link
Contributor Author

mondus commented Apr 17, 2023

Cmake test discovery does not work with either in the same way as would be expected from googletest. Instead the unit testing test executable can be run as a single ctest. The downside of this is that a single unit test failure would return a error code but ctest would report 0/1 failed. The details of the unit test output would still be logged so its not a big issue.

@mondus mondus added this to the Initial Release milestone May 11, 2023
@jatkinson1000 jatkinson1000 mentioned this issue Jun 2, 2023
5 tasks
@dorchard
Copy link
Member

dorchard commented Nov 21, 2023

We had a discussion that, due to the nature of this code, there is a lot of correctness that would be covered by integration tests (#62), and unit testing would be a little harder / less effective. That said, I can see how torch_module_forward and torch_from_blob_c could have some unit tests.

@dorchard
Copy link
Member

fwiw, pfunit was pretty easy to build locally (in non-MPI mode at least).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hackathon online-training Tasks towards the online training feature testing Related to FTorch testing
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants