-
Notifications
You must be signed in to change notification settings - Fork 7
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 test with Julienne #133
base: main
Are you sure you want to change the base?
Conversation
This fixes a previously non-conformant way of setting a character pointer length (a standard constraint prohibits passing an actual argument with a deferred length to c_f_pointer).
fix(co_reduce): rm unused variable Co-authored-by: Dan Bonachea <dobonachea@lbl.gov>
In order to support testing with the LLVM compilers, this commit begins the process of switching to the Julienne unit testing framework. This commit also removes the unsed iso_varying_string dependency and renames all test/caf_* files to test/prif_*. Status ------ 6 of 6 tests refactored to use Julienne pass with the LLVM compilers. Done ---- -[X] Updated dependencies in fpm.toml.template -[X] Replaced main test program -[X] Refactored/renamed prif_init test using julienne -[X] Refactored/renamed prif_allocate test using julienne To Do ----- -[ ] Refactor/rename caf_co_broadcast_test.f90 -[ ] Refactor/rename caf_co_max_test.f90 -[ ] Refactor/rename caf_co_min_test.f90 -[ ] Refactor/rename caf_co_reduce_test.f90 -[ ] Refactor/rename caf_co_sum_test.f90 -[ ] Refactor/rename caf_error_stop_test.f90 -[ ] Refactor/rename caf_image_index_test.f90 -[ ] Refactor/rename caf_num_images_test.f90 -[ ] Refactor/rename caf_rma_test.f90 -[ ] Refactor/rename caf_stop_test.f90 -[ ] Refactor/rename caf_teams_test.f90 -[ ] Refactor/rename caf_this_image_test.f90
This commit matches the test descriptions in the block of code that exists to support building with gfortran.
a567f3b
to
7ab646e
Compare
61c1d0c
to
969a56a
Compare
969a56a
to
878f0d0
Compare
Although these tests fail with flang-new, they should pass with gfortran.
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 realize this is still Draft, but I provided a few suggestions on preprocessor style.
build(preprocess): use HAVE_SELECTED_LOGICAL_KIND Co-authored-by: Dan Bonachea <dobonachea@lbl.gov>
Co-authored-by: Dan Bonachea <dobonachea@lbl.gov>
This reverts commit b09efc5.
This reverts commit c60ab05.
Based on compiler pre-defined macros, this commit defines the following macros in include/language-support.F90: - HAVE_SELECTED_LOGICAL_KIND - HAVE_PROCEDURE_ACTUAL_FOR_POINTER_DUMMY - HAVE_PROCEDURE_ACTUAL_FOR_POINTER_DUMMY and adds the line #include "language-support.F90" to src/prif.f90 and each file in the test/ subdirectory. This replaces the recently committed feature macros.
This commit removes the HAVE_MULTI_IMAGE_SUPPORT macro because we'll call PRIF/Caffeine procedures for all multi-image support inside Caffeine.
test/main.F90
Outdated
#ifdef __flang__ | ||
print * | ||
print *,"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
print * | ||
print *,"LLVM Flang detected. Skipping tests that crash:" | ||
print *," - prif_co_max_test" | ||
print *," - prif_co_min_test" | ||
print *," - prif_co_reduce_test" | ||
print *," - prif_co_sum_test" | ||
print *," - prif_error_stop_test" | ||
print *," - prif_image_index_test" | ||
print *," - prif_stop_test" | ||
print * | ||
print *,"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
#else | ||
call prif_co_max_test%report(passes, tests) | ||
call prif_co_min_test%report(passes, tests) | ||
call prif_co_reduce_test%report(passes, tests) | ||
call prif_co_sum_test%report(passes, tests) | ||
call prif_error_stop_test%report(passes, tests) | ||
call prif_image_index_test%report(passes, tests) | ||
call prif_rma_test%report(passes, tests) | ||
call prif_stop_test%report(passes, tests) | ||
#endif |
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.
This evokes a somewhat philosophical question about how to proceed in the face of known failures.
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.
@everythingfunctional that's a solid point. At this point, I'd like to understand and address the issues even if the only outcome is that Caffeine and/or Julienne improve whether or not we decide for Caffeine to use Julienne. So far, these issues have helped to identify problems in both packages that I'm working on addressing. Most of the above failures relate the handling of character
stop codes in error termination (see issue #77). I'm making good progress with addressing the above failures and hope to have most or all fixed by the time of tomorrow's call.
Co-authored-by: Dan Bonachea <dobonachea@lbl.gov>
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.
This feels like it doesn't belong in the main library. I'd suggest instead making another fpm project in this repo, i.e. fpm new --lib caffeine-test-helpers
, putting this in there, and then specifying that just the tests and those examples depend on it. I.e.
[dev-dependencies]
caffeine-test-helpers = { path = "./caffeine-test-helpers" }
Because the Veggies unit testing framework exposes what appears to be an internal compiler error in LLVM Flang (
flang-new
), this PR refactors the Caffeine test suite to replace Veggies with Julienne, which provides similar functionality and supports Flang. This commit also removes the unused iso_varying_string dependency and renames alltest/caf_*
files totest/prif_*
.To Do
fpm.toml.template
: replace veggies with julienne and remove the unused iso_varying_string dependency