mirror of
https://github.com/QuantumPackage/qp2.git
synced 2025-04-25 17:54:44 +02:00
Fixed trexio bug when $USERB is not specified
This commit is contained in:
parent
9c1f811800
commit
66ce7bba22
@ -72,7 +72,7 @@ subroutine export_trexio(update,full_path)
|
||||
character*(64) :: code(100), author(100), user
|
||||
character*(64), parameter :: qp2_code = "QuantumPackage"
|
||||
|
||||
call getenv("USER",user)
|
||||
call getenv('USER',user)
|
||||
do k=1,N_states
|
||||
rc = trexio_read_metadata_code_num(f(k), code_num)
|
||||
if (rc == TREXIO_ATTR_MISSING) then
|
||||
@ -95,6 +95,7 @@ subroutine export_trexio(update,full_path)
|
||||
call trexio_assert(rc, TREXIO_SUCCESS)
|
||||
endif
|
||||
|
||||
if (trim(user) /= '') then
|
||||
rc = trexio_read_metadata_author_num(f(k), author_num)
|
||||
if (rc == TREXIO_ATTR_MISSING) then
|
||||
i = 1
|
||||
@ -115,6 +116,7 @@ subroutine export_trexio(update,full_path)
|
||||
rc = trexio_write_metadata_author(f(k), author, 64)
|
||||
call trexio_assert(rc, TREXIO_SUCCESS)
|
||||
endif
|
||||
endif
|
||||
enddo
|
||||
|
||||
! ------------------------------------------------------------------------------
|
||||
|
Loading…
x
Reference in New Issue
Block a user