Skip to content

Commit

Permalink
fix(collectives): for character
Browse files Browse the repository at this point in the history
- builds with flang
- passes test suite with gfortran
  • Loading branch information
everythingfunctional committed Dec 18, 2024
1 parent 86b8560 commit 9847674
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/caffeine/collective_subroutines/co_max_s.f90
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

function reverse_alphabetize(lhs, rhs) result(last_alphabetically)
character(len=*), intent(in) :: lhs, rhs
character(len=:), allocatable :: last_alphabetically
character(len=len(lhs)) :: last_alphabetically
call assert(len(lhs)==len(rhs), "caf_co_max: LHS/RHS length match", lhs//" , "//rhs)
last_alphabetically = max(lhs,rhs)
end function
Expand Down
2 changes: 1 addition & 1 deletion src/caffeine/collective_subroutines/co_min_s.f90
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

function alphabetize(lhs, rhs) result(first_alphabetically)
character(len=*), intent(in) :: lhs, rhs
character(len=:), allocatable :: first_alphabetically
character(len=len(lhs)) :: first_alphabetically
call assert(len(lhs)==len(rhs), "prif_co_min: LHS/RHS length match", lhs//" , "//rhs)
first_alphabetically = min(lhs,rhs)
end function
Expand Down
2 changes: 1 addition & 1 deletion src/caffeine/collective_subroutines/co_reduce_s.f90
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ function c_char_operation(lhs, rhs) result(lhs_op_rhs)
import c_char
implicit none
character(kind=c_char,len=*), intent(in) :: lhs, rhs
character(kind=c_char,len=:), allocatable :: lhs_op_rhs
character(kind=c_char,len=len(lhs)) :: lhs_op_rhs
end function

pure function c_float_complex_operation(lhs, rhs) result(lhs_op_rhs)
Expand Down

0 comments on commit 9847674

Please sign in to comment.