10
0
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-12-22 12:23:43 +01:00

Merge branch 'master' into dev-stable

This commit is contained in:
Anthony Scemama 2023-04-21 13:09:34 +02:00
commit fc24491dbc
4 changed files with 14 additions and 14 deletions

2
configure vendored
View File

@ -232,7 +232,7 @@ EOF
execute << EOF
cd "\${QP_ROOT}"/external
tar --gunzip --extract --file qp2-dependencies/f77-zmq-4.3.2.tar.gz
tar --gunzip --extract --file qp2-dependencies/f77-zmq-4.3.?.tar.gz
cd f77-zmq-*
./configure --prefix=\$QP_ROOT
export ZMQ_H="\$QP_ROOT"/include/zmq.h

@ -1 +1 @@
Subproject commit 6e23ebac001acae91d1c762ca934e09a9b7d614a
Subproject commit e0d0e02e9f5ece138d1520106954a881ab0b8db2

View File

@ -43,8 +43,8 @@ def extract_data(output):
e_ex_line = lines[iline+2]
e_ex = float(e_ex_line.split()[1])
reading = False
data.append((n_det, e, pt2, err_pt2, rpt2, err_rpt2, e_ex))
new_data = " {:8d} {:16.8f} {:e} {:e} {:e} {:e} {:16.8f}".format(n_det, e, pt2, err_pt2, rpt2, err_rpt2, e_ex)
data.append(new_data)
n_det = e = pt2 = err_pt2 = rpt2 = err_rpt2 = e_ex = None
return data
@ -52,6 +52,4 @@ def extract_data(output):
data = extract_data(output)
for item in data:
print(" ".join(str(x) for x in item))
print(item)

View File

@ -1,7 +1,7 @@
subroutine format_w_error(value,error,size_nb,max_nb_digits,format_value,str_error)
implicit none
BEGIN_DOC
! Format for double precision, value(error)
END_DOC
@ -14,7 +14,7 @@ subroutine format_w_error(value,error,size_nb,max_nb_digits,format_value,str_err
! out
! | format_value | character | string FX.Y for the format |
! | str_error | character | string of the error |
! | str_error | character | string of the error |
! internal
! | str_size | character | size in string format |
@ -33,6 +33,7 @@ subroutine format_w_error(value,error,size_nb,max_nb_digits,format_value,str_err
character(len=20) :: str_size, str_nb_digits, str_exp
integer :: nb_digits
!$OMP CRITICAL
! max_nb_digit: Y max
! size_nb = Size of the double: X (FX.Y)
write(str_size,'(I3)') size_nb
@ -40,17 +41,17 @@ subroutine format_w_error(value,error,size_nb,max_nb_digits,format_value,str_err
! Error
write(str_exp,'(1pE20.0)') error
str_error = trim(adjustl(str_exp))
! Number of digit: Y (FX.Y) from the exponent
str_nb_digits = str_exp(19:20)
read(str_nb_digits,*) nb_digits
! If the error is 0d0
if (error <= 1d-16) then
if (error <= 1d-16) then
write(str_nb_digits,*) max_nb_digits
endif
! If the error is too small
! If the error is too small
if (nb_digits > max_nb_digits) then
write(str_nb_digits,*) max_nb_digits
str_error(1:1) = '0'
@ -65,7 +66,8 @@ subroutine format_w_error(value,error,size_nb,max_nb_digits,format_value,str_err
! FX.Y,A1,A1,A1 for value(str_error)
!string = 'F'//trim(adjustl(str_size))//'.'//trim(adjustl(str_nb_digits))//',A1,A1,A1'
! FX.Y just for the value
! FX.Y just for the value
format_value = 'F'//trim(adjustl(str_size))//'.'//trim(adjustl(str_nb_digits))
!$OMP END CRITICAL
end