I am trying to run an OpenMP Fortran code using Intel Fortran.
At the beginning of my code I allocate 7 very large matrices:
! Allocate
REAL, ALLOCATABLE :: m1(:,:,:,:,:,:,:,:,:)
REAL, ALLOCATABLE :: m2(:,:,:,:,:,:,:,:,:)
REAL, ALLOCATABLE :: m3(:,:,:,:,:,:,:,:,:)
REAL, ALLOCATABLE :: m4(:,:,:,:,:,:,:,:,:)
REAL, ALLOCATABLE :: m5(:,:,:,:,:,:,:,:,:)
REAL, ALLOCATABLE :: m6(:,:,:,:,:,:,:,:,:)
REAL, ALLOCATABLE :: m7(:,:,:,:,:,:,:,:,:)
ALLOCATE(m1(2,161,20,2,2,21,30,2,2))
ALLOCATE(m2(2,161,20,2,2,21,30,2,2))
ALLOCATE(m3(2,161,20,2,2,21,30,2,2))
ALLOCATE(m4(2,161,20,2,2,21,30,2,2))
ALLOCATE(m5(2,161,20,2,2,21,30,2,2))
ALLOCATE(m6(1,161,20,2,2,21,30,2,2))
ALLOCATE(m7(1,161,20,2,2,21,30,2,2))
I then run a code with a big parallelized loop.
!$omp parallel do default(private) shared(m1, m2, m3, m4, m5, m7, someothervariables)
Some of the matrices m1
to m7
are indeed used in subroutines, which might lead to creation of temporary arrays.
In any case the code runs fine if done serially. But it crashes with the following error if run with openMP regardless of the number of cores I am using:
The machine I am using has 128GB
of ram. Not sure if this is the limiting factor or not. If I decrease the last index of each matrix to 1, the code runs fine in 24 cores. Given that I am increasing the size of the memory used by 2, it should run in 12 cores, at least no?
Maybe I am doing some big error, or perhaps is just some Fortran option that needs to be changed ...