The SHARED clause declares variables in its list to be shared among all threads in the team.
SHARED (list)
shared (list)
A shared variable exists in only one memory location and all threads can read or write to that address.
It is the programmer’s responsibility to ensure that multiple threads properly access SHARED variables (such as via CRITICAL sections).