Compile Time Actions
Each parallel region (either found automatically or via directive):
- is converted into a subroutine call executed by each parallel thread
- The subroutine contains the execution body of the parallel region
- the arguments to the subroutine contain scheduling parameters (loop ranges)
-
-
-
-
- the new subroutine name:
- derived from _mpdo_sub_#
- will appear in the profile
- data in the parallel region:
- private data:
- local (automatic) variables in the newly created subroutine
- shared data
- will be passed well known address to the new subroutine
Subroutine daxpy(n,a,x,y)
Subroutine daxpy(n,a,x,y)
_LOCAL_NTRIP = n/__mp_sug_numthreads_func$()
_LOCAL_START = 1+__mp_my_thread_id()*_LOCAL_NTRIP
call sproc$(_mpdo_daxpy_1,%VAL(PR_SALL),args)
subroutine _mpdo_daxpy_1(_LOCAL_START,
do I=_LOCAL_START,_LOCAL_NTRIP