Skip to content

Commit 700a729

Browse files
authored
Merge pull request #1795 from krisdale/update-fortran-guided-mat-mul-openmp
Update source file to resolve build error
2 parents d520f10 + e1b190c commit 700a729

File tree

1 file changed

+5
-3
lines changed
  • DirectProgramming/Fortran/guided_matrix_mul_OpenMP/src

1 file changed

+5
-3
lines changed

DirectProgramming/Fortran/guided_matrix_mul_OpenMP/src/03_mm_GPU.f90

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,17 @@ program matrix_multiply
22
use omp_lib
33
implicit none
44
integer :: i, j, k, myid, m, n
5-
real(8), allocatable, dimension(:,:) :: a, b, c, c_serial
6-
5+
real, allocatable, dimension(:,:) :: a, b, c, c_serial
6+
!
7+
! Different Intel GPUs have varying amounts of memory. If the program
8+
! fails at runtime, try decreasing the value of "n".
9+
!
710
n = 2600
811

912
myid = OMP_GET_THREAD_NUM()
1013
if (myid .eq. 0) then
1114
print *, 'matrix size ', n
1215
print *, 'Number of CPU procs is ', OMP_GET_NUM_THREADS()
13-
1416
print *, 'Number of OpenMP Device Available:', omp_get_num_devices()
1517
!$omp target
1618
if (OMP_IS_INITIAL_DEVICE()) then

0 commit comments

Comments
 (0)