Skip to content

Commit

Permalink
Merge pull request #16 from BerkeleyLab/feature-based-macros
Browse files Browse the repository at this point in the history
Feature-based macros
  • Loading branch information
rouson authored Sep 7, 2024
2 parents 6d143f3 + a33e3c4 commit aba05c6
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 7 deletions.
6 changes: 5 additions & 1 deletion src/julienne/julienne_test_result_s.F90
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
use julienne_user_defined_collectives_m, only : co_all
implicit none

#ifdef __flang__
#define NO_MULTI_IMAGE_SUPPORT
#endif

contains

module procedure construct_from_character
Expand All @@ -22,7 +26,7 @@

module procedure passed
test_passed = self%passed_
#ifndef __flang__
#ifndef NO_MULTI_IMAGE_SUPPORT
call co_all(test_passed)
#endif
end procedure
Expand Down
14 changes: 9 additions & 5 deletions src/julienne/julienne_test_s.F90
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,18 @@
use julienne_command_line_m, only : command_line_t
implicit none

#if defined(__flang__)
#define NO_MULTI_IMAGE_SUPPORT
#endif

contains

module procedure report
#ifndef __flang__
associate(me => this_image())
#else
#ifdef NO_MULTI_IMAGE_SUPPORT
integer me
me = 1
#else
associate(me => this_image())
#endif


Expand All @@ -36,7 +40,7 @@

end if

#ifndef __flang__
#ifndef NO_MULTI_IMAGE_SUPPORT
call co_broadcast(test_description_substring, source_image=1)
#endif

Expand All @@ -55,7 +59,7 @@
block
logical, allocatable :: passing_tests(:)
passing_tests = test_results%passed()
#ifndef __flang__
#ifndef NO_MULTI_IMAGE_SUPPORT
call co_all(passing_tests)
#endif
associate(num_passes => count(passing_tests))
Expand Down
5 changes: 4 additions & 1 deletion src/julienne/julienne_user_defined_collectives_s.F90
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,16 @@
! "Multi-Dimensional Physics Implementation into Fuel Analysis under Steady-state and Transients (FAST)",
! contract # NRC-HQ-60-17-C-0007
!
#ifdef __flang__
#define NO_MULTI_IMAGE_SUPPORT
#endif
submodule(julienne_user_defined_collectives_m) julienne_user_defined_collectives_s
implicit none

contains

module procedure co_all
#ifndef __flang__
#ifndef NO_MULTI_IMAGE_SUPPORT
call co_reduce(boolean, both)
#endif
contains
Expand Down

0 comments on commit aba05c6

Please sign in to comment.