1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323
|
#line 1 "test2.f"
! * This file is part of the Score-P software (http://www.score-p.org)
! *
! * Copyright (c) 2009-2011,
! * RWTH Aachen University, Germany
! * Gesellschaft fuer numerische Simulation mbH Braunschweig, Germany
! * Technische Universitaet Dresden, Germany
! * University of Oregon, Eugene, USA
! * Forschungszentrum Juelich GmbH, Germany
! * German Research School for Simulation Sciences GmbH, Juelich/Aachen, Germany
! * Technische Universitaet Muenchen, Germany
! *
! * See the COPYING file in the package base directory for details.
! *
! * Testfile for automated testing of OPARI2
! *
! *
! * @brief Test the basic instrumentation of all directives.
program test2
include 'test2.f.opari.inc'
#line 20 "test2.f"
integer i
integer k
integer, save :: j
#line 24 "test2.f"
!$omp threadprivate(j)
pomp2_num_threads = pomp2_lib_get_max_threads()
pomp2_if = .true.
call POMP2_Parallel_fork(opari2_region_1,
&pomp2_if, pomp2_num_threads, pomp2_old_task,
&opari2_ctc_1 )
#line 26 "test2.f"
!$omp parallel
!$omp& firstprivate(pomp2_old_task) private(pomp2_new_task)
!$omp& num_threads(pomp2_num_threads)
call POMP2_Parallel_begin(opari2_region_1)
#line 27 "test2.f"
write(*,*) "parallel"
call POMP2_Do_enter(opari2_region_2,
&opari2_ctc_2 )
#line 29 "test2.f"
!$omp do
do i=1,4
write(*,*) "do",i
k = k + 1
enddo
#line 34 "test2.f"
!$omp end do nowait
call POMP2_Implicit_barrier_enter(opari2_region_2,
&pomp2_old_task)
!$omp barrier
call POMP2_Implicit_barrier_exit(opari2_region_2,
&pomp2_old_task)
call POMP2_Do_exit(opari2_region_2)
#line 35 "test2.f"
call POMP2_Flush_enter(opari2_region_3,
&opari2_ctc_3 )
#line 36 "test2.f"
!$omp flush(k)
call POMP2_Flush_exit(opari2_region_3)
#line 37 "test2.f"
call POMP2_Barrier_enter(opari2_region_4,
&pomp2_old_task,
&opari2_ctc_4 )
#line 38 "test2.f"
!$omp barrier
call POMP2_Barrier_exit(opari2_region_4,
&pomp2_old_task)
#line 39 "test2.f"
call POMP2_Do_enter(opari2_region_5,
&opari2_ctc_5 )
#line 40 "test2.f"
!$omp do ordered
do i=1,4
call POMP2_Ordered_enter(opari2_region_6,
&opari2_ctc_6 )
#line 42 "test2.f"
!$omp ordered
call POMP2_Ordered_begin(opari2_region_6)
#line 43 "test2.f"
write(*,*) "do",i
call POMP2_Ordered_end(opari2_region_6)
#line 44 "test2.f"
!$omp end ordered
call POMP2_Ordered_exit(opari2_region_6)
#line 45 "test2.f"
enddo
#line 46 "test2.f"
!$omp end do nowait
call POMP2_Implicit_barrier_enter(opari2_region_5,
&pomp2_old_task)
!$omp barrier
call POMP2_Implicit_barrier_exit(opari2_region_5,
&pomp2_old_task)
call POMP2_Do_exit(opari2_region_5)
#line 47 "test2.f"
call POMP2_Sections_enter(opari2_region_7,
&opari2_ctc_7 )
#line 48 "test2.f"
!$omp sections
#line 49 "test2.f"
!$omp section
call POMP2_Section_begin(opari2_region_7,
&opari2_ctc_7 )
#line 50 "test2.f"
write(*,*) "section 1"
call POMP2_Section_end(opari2_region_7)
#line 51 "test2.f"
!$omp section
call POMP2_Section_begin(opari2_region_7,
&opari2_ctc_7 )
#line 52 "test2.f"
write(*,*) "section 2"
call POMP2_Section_end(opari2_region_7)
#line 53 "test2.f"
!$omp end sections nowait
call POMP2_Implicit_barrier_enter(opari2_region_7,
&pomp2_old_task)
!$omp barrier
call POMP2_Implicit_barrier_exit(opari2_region_7,
&pomp2_old_task)
call POMP2_Sections_exit(opari2_region_7)
#line 54 "test2.f"
#line 55 "test2.f"
!$omp master
call POMP2_Master_begin(opari2_region_8,
&opari2_ctc_8 )
#line 56 "test2.f"
write(*,*) "master"
call POMP2_Master_end(opari2_region_8)
#line 57 "test2.f"
!$omp end master
call POMP2_Critical_enter(opari2_region_9,
&opari2_ctc_9 )
#line 59 "test2.f"
!$omp critical
call POMP2_Critical_begin(opari2_region_9)
#line 60 "test2.f"
write(*,*) "critical"
call POMP2_Critical_end(opari2_region_9)
#line 61 "test2.f"
!$omp end critical
call POMP2_Critical_exit(opari2_region_9)
#line 62 "test2.f"
call POMP2_Critical_enter(opari2_region_10,
&opari2_ctc_10 )
#line 63 "test2.f"
!$omp critical(foobar)
call POMP2_Critical_begin(opari2_region_10)
#line 64 "test2.f"
write(*,*) "critical(foobar)"
call POMP2_Critical_end(opari2_region_10)
#line 65 "test2.f"
!$omp end critical(foobar)
call POMP2_Critical_exit(opari2_region_10)
#line 66 "test2.f"
! do this atomic
call POMP2_Atomic_enter(opari2_region_11,
&opari2_ctc_11 )
#line 68 "test2.f"
!$omp atomic
i = i + 1
call POMP2_Atomic_exit(opari2_region_11)
#line 70 "test2.f"
call POMP2_Single_enter(opari2_region_12,
&opari2_ctc_12 )
#line 71 "test2.f"
!$omp single
call POMP2_Single_begin(opari2_region_12)
#line 72 "test2.f"
write(*,*) "single"
call POMP2_Single_end(opari2_region_12)
#line 73 "test2.f"
!$omp end single nowait
call POMP2_Implicit_barrier_enter(opari2_region_12,
&pomp2_old_task)
!$omp barrier
call POMP2_Implicit_barrier_exit(opari2_region_12,
&pomp2_old_task)
call POMP2_Single_exit(opari2_region_12)
#line 74 "test2.f"
call POMP2_Workshare_enter(opari2_region_13,
&opari2_ctc_13 )
#line 75 "test2.f"
!$omp workshare
a = b + c
#line 77 "test2.f"
!$omp end workshare nowait
call POMP2_Implicit_barrier_enter(opari2_region_13,
&pomp2_old_task)
!$omp barrier
call POMP2_Implicit_barrier_exit(opari2_region_13,
&pomp2_old_task)
call POMP2_Workshare_exit(opari2_region_13)
#line 78 "test2.f"
call POMP2_Implicit_barrier_enter(opari2_region_1,
&pomp2_old_task)
!$omp barrier
call POMP2_Implicit_barrier_exit(opari2_region_1,
&pomp2_old_task)
call POMP2_Parallel_end(opari2_region_1)
#line 79 "test2.f"
!$omp end parallel
call POMP2_Parallel_join(opari2_region_1,
&pomp2_old_task)
#line 80 "test2.f"
pomp2_num_threads = pomp2_lib_get_max_threads()
pomp2_if = .true.
call POMP2_Parallel_fork(opari2_region_14,
&pomp2_if, pomp2_num_threads, pomp2_old_task,
&opari2_ctc_14 )
#line 81 "test2.f"
!$omp parallel
!$omp& firstprivate(pomp2_old_task) private(pomp2_new_task)
!$omp& num_threads(pomp2_num_threads)
call POMP2_Parallel_begin(opari2_region_14)
#line 82 "test2.f"
pomp2_if = .true.
if (pomp2_if) then
call POMP2_Task_create_begin(opari2_region_15,
&pomp2_new_task,
&pomp2_old_task,
&pomp2_if,
&opari2_ctc_15 )
end if
#line 82 "test2.f"
!$omp task
!$omp& if(pomp2_if) firstprivate(pomp2_new_task, pomp2_if)
if (pomp2_if) then
call POMP2_Task_begin(opari2_region_15, pomp2_new_task)
end if
#line 83 "test2.f"
write(*,*) "task"
if (pomp2_if) then
call POMP2_Task_end(opari2_region_15)
end if
#line 84 "test2.f"
!$omp end task
if (pomp2_if) then
call POMP2_Task_create_end(opari2_region_15,
&pomp2_old_task)
end if
#line 85 "test2.f"
!$omp this should be ignored by opari and the compiler
call POMP2_Taskwait_begin(opari2_region_16,
&pomp2_old_task,
&opari2_ctc_16 )
#line 88 "test2.f"
!$omp taskwait
call POMP2_Taskwait_end(opari2_region_16,
&pomp2_old_task)
#line 89 "test2.f"
call POMP2_Implicit_barrier_enter(opari2_region_14,
&pomp2_old_task)
!$omp barrier
call POMP2_Implicit_barrier_exit(opari2_region_14,
&pomp2_old_task)
call POMP2_Parallel_end(opari2_region_14)
#line 89 "test2.f"
!$omp end parallel
call POMP2_Parallel_join(opari2_region_14,
&pomp2_old_task)
#line 90 "test2.f"
! $ omp this should be ignored by opari and the compiler
! $ this too
end program test2
subroutine POMP2_Init_reg_000()
include 'test2.f.opari.inc'
call POMP2_Assign_handle( opari2_region_1,
& opari2_ctc_1 )
call POMP2_Assign_handle( opari2_region_2,
& opari2_ctc_2 )
call POMP2_Assign_handle( opari2_region_3,
& opari2_ctc_3 )
call POMP2_Assign_handle( opari2_region_4,
& opari2_ctc_4 )
call POMP2_Assign_handle( opari2_region_5,
& opari2_ctc_5 )
call POMP2_Assign_handle( opari2_region_6,
& opari2_ctc_6 )
call POMP2_Assign_handle( opari2_region_7,
& opari2_ctc_7 )
call POMP2_Assign_handle( opari2_region_8,
& opari2_ctc_8 )
call POMP2_Assign_handle( opari2_region_9,
& opari2_ctc_9 )
call POMP2_Assign_handle( opari2_region_10,
& opari2_ctc_10 )
call POMP2_Assign_handle( opari2_region_11,
& opari2_ctc_11 )
call POMP2_Assign_handle( opari2_region_12,
& opari2_ctc_12 )
call POMP2_Assign_handle( opari2_region_13,
& opari2_ctc_13 )
call POMP2_Assign_handle( opari2_region_14,
& opari2_ctc_14 )
call POMP2_Assign_handle( opari2_region_15,
& opari2_ctc_15 )
call POMP2_Assign_handle( opari2_region_16,
& opari2_ctc_16 )
end
|