You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This bug was found while debugging for issue #130.
Given input:
program main
include'omp_lib.h'integer i
integer item(10)
external process
do i =1, 10
item(i) =11-i
enddo
!$omp parallel
!$omp single
print*, 'using ', omp_get_num_threads(), ' threads'do i =1, 10
!$omp task
call process(i,item)
!$omp end task
enddo
!$omp end single
!$omp end parallel
end
******************************************subroutineprocess(input,item)
include'omp_lib.h'integer input
integer item(10)
print*, 'idx ', input,'-> ', item(input)
print*, 'by thread ', omp_get_thread_num()
end
!pragma omp end parallel or !$omp omp end parallel will be inserted right above !$omp end single. Neither should happen.
The output from code above:
PROGRAM main
include"omp_lib.h"INTEGER:: i
INTEGER, DIMENSION(10) :: item
external:: process
DO i =1, 10
item(i) =11- i
END DO
!$omp parallel
!$omp single
PRINT*, 'using ',omp_get_num_threads(),' threads'DO i =1, 10
!$omp task
CALL process(i,item)
!$omp end task
END DO
!pragma omp end parallel
!$omp end single
******************************************
!$omp end parallel
END PROGRAMSUBROUTINEprocess(input,item)
include"omp_lib.h"INTEGER:: input
INTEGER, DIMENSION(10) :: item
PRINT*, 'idx ',input,'-> ',item(input)
PRINT*, 'by thread ',omp_get_thread_num()
ENDSUBROUTINE
@ouankou I also found some bugs related to Fortran, but I am not sure whether it is related to this bug or not. After lowing and unparsing, the new file generated for the outlined function is empty. I am submitting another issue with details for that.
It's fixed by the commit cf02a62. We missed or accidentally removed an upstream commit addressing the situation of multiple Fortran comments following the same statement.
@yanyh15 This bug is not related to issue #135. I tested the code in that issue and still got an empty outlined function.
This bug was found while debugging for issue #130.
Given input:
!pragma omp end parallel
or!$omp omp end parallel
will be inserted right above!$omp end single
. Neither should happen.The output from code above:
The extra Fortran comment comes from:
rexompiler/src/backend/unparser/FortranCodeGeneration/unparseFortran_statements.C
Line 4060 in 973614c
This piece of code above is fine, but it should not be called in this case. I think the bug exists somewhere else.
The text was updated successfully, but these errors were encountered: