- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I have been having an issue which I have tried to summarise in the following two pieces of code:
file: testCaller.f90
--------------------
module testCaller
use omp_lib
implicit none
contains
subroutine testCall(a_Matrix, a_Index)
implicit none
double precision, dimension(:,:), allocatable, intent(out):: a_Matrix
integer, intent(in):: a_Index
integer:: k1, k2, id
allocate(a_Matrix(a_Index, a_Index))
!$OMP PARALLEL PRIVATE(k1,k2,id) NUM_THREADS(4)
id = omp_get_thread_num()
write(*,*) 'I am in', id
!$OMP DO
do k1 = 1, a_Index
do k2 = 1, a_Index
a_Matrix(k1,k2) = 0.0d0
end do
end do
!$OMP END DO
!$OMP END PARALLEL
end subroutine testCall
end module testCaller
----------------------------
file: testCalling.f90
----------------------------
program testCalling
use testCaller
implicit none
double precision, dimension(:,:), allocatable:: M
integer:: I
I = 10
call testCall(M,I)
end program testCalling
-----------------------------
compilation instruction:
ifort -openmp -parallel -fpp -c testCaller.f90
ifort -c testCalling.f90
ifort -openmp -parallel -fpp testCaller.o testCalling.o -o testCall.out
Upon execution I get the following error:
forrtl: severe (40): recursive I/O operation, unit -1, file unknown
I hope I have been able to recreate the problem using this, I am not really sure why this is happening. Can someone please provide some insights?
Thanks
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page