mirror of
https://gitlab.com/scemama/EZFIO.git
synced 2024-12-22 04:13:34 +01:00
Removed OpenMP because I/O is not thread safe
This commit is contained in:
parent
dba01c4fe0
commit
66d3dd5d8e
@ -2,7 +2,7 @@ VERSION ?= 2.0.7
|
|||||||
RANLIB ?= ranlib
|
RANLIB ?= ranlib
|
||||||
IRPF90 ?= irpf90
|
IRPF90 ?= irpf90
|
||||||
CC ?= gcc
|
CC ?= gcc
|
||||||
FC ?= gfortran -g -ffree-line-length-none -fPIC # -fopenmp
|
FC ?= gfortran -g -ffree-line-length-none -fPIC
|
||||||
FCFLAGS ?= -fPIC
|
FCFLAGS ?= -fPIC
|
||||||
ARCHIVE ?= ar crs
|
ARCHIVE ?= ar crs
|
||||||
RANLIB ?= ranlib
|
RANLIB ?= ranlib
|
||||||
|
@ -220,11 +220,9 @@ subroutine ezfio_read_array_%(type_short)s(dir,fil,rank,dims,dim_max,dat)
|
|||||||
|
|
||||||
allocate (buffer(dim_max))
|
allocate (buffer(dim_max))
|
||||||
read(libezfio_iunit,'(A)') buffer(1:dim_max)
|
read(libezfio_iunit,'(A)') buffer(1:dim_max)
|
||||||
!$OMP PARALLEL DO PRIVATE(i)
|
|
||||||
do i=1,dim_max
|
do i=1,dim_max
|
||||||
read(buffer(i),%(fmt)s) dat(i)
|
read(buffer(i),%(fmt)s) dat(i)
|
||||||
enddo
|
enddo
|
||||||
!$OMP END PARALLEL DO
|
|
||||||
deallocate(buffer)
|
deallocate(buffer)
|
||||||
call libezfio_closez(trim(l_filename),'r')
|
call libezfio_closez(trim(l_filename),'r')
|
||||||
return
|
return
|
||||||
@ -262,12 +260,10 @@ subroutine ezfio_write_array_%(type_short)s(dir,fil,rank,dims,dim_max,dat)
|
|||||||
write(libezfio_iunit,'(30(I20,X))') dims(1:rank)
|
write(libezfio_iunit,'(30(I20,X))') dims(1:rank)
|
||||||
close(unit=libezfio_iunit)
|
close(unit=libezfio_iunit)
|
||||||
allocate (buffer(dim_max))
|
allocate (buffer(dim_max))
|
||||||
!$OMP PARALLEL DO PRIVATE(i)
|
|
||||||
do i=1,dim_max
|
do i=1,dim_max
|
||||||
write(buffer(i)(1:24), %(fmt)s) dat(i)
|
write(buffer(i)(1:24), %(fmt)s) dat(i)
|
||||||
buffer(i)(25:25) = ACHAR(10)
|
buffer(i)(25:25) = ACHAR(10)
|
||||||
enddo
|
enddo
|
||||||
!$OMP END PARALLEL DO
|
|
||||||
call libezfio_reopenz_unformatted(trim(l_filename(1)),'wb',err)
|
call libezfio_reopenz_unformatted(trim(l_filename(1)),'wb',err)
|
||||||
write(libezfio_iunit) buffer
|
write(libezfio_iunit) buffer
|
||||||
call libezfio_closez(trim(l_filename(1)),'w')
|
call libezfio_closez(trim(l_filename(1)),'w')
|
||||||
|
Loading…
Reference in New Issue
Block a user