9 May 2025 9:25:16.561 PM RANDOM_NUMBER_CONTENTION(): FORTRAN90 version This program demonstrates a case where the use of multiple threads in OpenMP may DEGRADE the performance of a program. In this program, we simply call the FORTRAN90 random number generator many times. Because that function has internal saved variables, when it is accessed by multile threads, there can be huge delays because the threads fight to gain access to the saved variables. The number of processors available: OMP_GET_NUM_PROCS () = 8 Threads Wallclock time (seconds) 1 0.108935E-01 2 0.556959E-02 3 0.379154E-02 4 0.282066E-02 5 0.332501E-02 6 0.279587E-02 7 0.244306E-02 8 0.212971E-02 RANDOM_NUMBER_CONTENTION(): Normal end of execution. 9 May 2025 9:25:16.595 PM 9 May 2025 9:25:16.596 PM RANDOM_NUMBER_CONTENTION(): FORTRAN90 version This program demonstrates a case where the use of multiple threads in OpenMP may DEGRADE the performance of a program. In this program, we simply call the FORTRAN90 random number generator many times. Because that function has internal saved variables, when it is accessed by multile threads, there can be huge delays because the threads fight to gain access to the saved variables. The number of processors available: OMP_GET_NUM_PROCS () = 8 Threads Wallclock time (seconds) 1 0.109145E-01 2 0.558166E-02 3 0.376371E-02 4 0.279856E-02 5 0.331344E-02 6 0.279100E-02 7 0.244831E-02 8 0.213606E-02 RANDOM_NUMBER_CONTENTION(): Normal end of execution. 9 May 2025 9:25:16.630 PM 9 May 2025 9:25:16.631 PM RANDOM_NUMBER_CONTENTION(): FORTRAN90 version This program demonstrates a case where the use of multiple threads in OpenMP may DEGRADE the performance of a program. In this program, we simply call the FORTRAN90 random number generator many times. Because that function has internal saved variables, when it is accessed by multile threads, there can be huge delays because the threads fight to gain access to the saved variables. The number of processors available: OMP_GET_NUM_PROCS () = 8 Threads Wallclock time (seconds) 1 0.108427E-01 2 0.561447E-02 3 0.376310E-02 4 0.279943E-02 5 0.331251E-02 6 0.281279E-02 7 0.244894E-02 8 0.216190E-02 RANDOM_NUMBER_CONTENTION(): Normal end of execution. 9 May 2025 9:25:16.665 PM 9 May 2025 9:25:16.666 PM RANDOM_NUMBER_CONTENTION(): FORTRAN90 version This program demonstrates a case where the use of multiple threads in OpenMP may DEGRADE the performance of a program. In this program, we simply call the FORTRAN90 random number generator many times. Because that function has internal saved variables, when it is accessed by multile threads, there can be huge delays because the threads fight to gain access to the saved variables. The number of processors available: OMP_GET_NUM_PROCS () = 8 Threads Wallclock time (seconds) 1 0.108527E-01 2 0.558713E-02 3 0.375224E-02 4 0.278277E-02 5 0.331269E-02 6 0.279556E-02 7 0.244412E-02 8 0.213712E-02 RANDOM_NUMBER_CONTENTION(): Normal end of execution. 9 May 2025 9:25:16.700 PM