48 real(RP) ,
dimension(:,:),
intent(in) :: tab
49 character(len=*),
intent(in) :: fic
50 logical ,
intent(in),
optional :: transpose
57 &
'io : writeArray_f = '&
59 open(unit=60,file=fic)
69 write(60,
'(7g27.16)', advance=
'no') tab(jj, ii)
71 write(60,
'(7g27.16)', advance=
'yes')
78 write(60,
'(7g27.16)', advance=
'no') tab(ii,jj)
80 write(60,
'(7g27.16)', advance=
'yes')
90 real(RP) ,
dimension(:),
intent(in) :: vec
91 character(len=*),
intent(in) :: fic
96 &
'io : writeVec_f = ',&
99 open(unit=60,file=fic)
109 integer,
dimension(:),
intent(in) :: vec
110 character(len=*) ,
intent(in) :: fic
115 &
'io : writeVec_i = ',&
118 open(unit=60,file=fic)
129 real(RP),
dimension(:),
intent(out) :: vec
130 character(len=*) ,
intent(in) :: fic
135 if(sz/=
size(vec,1))
call quit(
'io: readVec_f' )
137 open(unit=60,file=fic)
149 real(RP),
dimension(:,:),
intent(out) :: vec
150 character(len=*) ,
intent(in) :: fic
155 if(sz/=
size(vec,2))
call quit(
'io: readArray_f' )
157 open(unit=60,file=fic)
159 read(60,*) vec(1:
size(vec,1), ii)
169 integer,
dimension(:),
intent(out) :: vec
170 character(len=*) ,
intent(in) :: fic
175 &
'io : readVec_i = ',&
179 if(sz/=
size(vec,1))
call quit(
'io: readVec_i' )
182 open(unit=60,file=fic)
193 character(len=*) ,
intent(in) :: fic
196 character(len=120) :: sh_comm
199 &
"io: count_lines "//trim(fic) )
201 sh_comm=
'wc -l '//trim(fic)//
' > xxxx' 202 call system(trim(sh_comm))
208 call system(trim(sh_comm))
215 character(len=*),
intent(in) :: filename
218 inquire( file=trim(filename), exist=res )
integer function count_lines(fic)
Count lines in a file.
integer, parameter, public rp
real(kind=RP) = real precision in the code REAL_TOL = epsilon to test real equality ...
subroutine writevec_i(vec, fic)
write vector to file, integer case
REAL NUMBERS PRECISION IN CHORAL: selects simple/double/quad
IO: module for input/output
subroutine readvec_i(vec, fic)
read vector from file, integer case
subroutine writevec_f(vec, fic)
write vector to file, float case
logical function, public file_exists(filename)
Check if the file exists.
integer choral_verb
Verbosity level.
DEFINITION OF GLOBAL VARIABLES FOR THE LIBRARY CHORAL
subroutine readarray_f(vec, fic)
read array from file, float case
subroutine writearray_f(tab, fic, transpose)
write array to file, float case
subroutine readvec_f(vec, fic)
read vector from file, float case