make getenv style variable test fully portable

This commit is contained in:
Axel Kohlmeyer
2022-10-03 09:37:05 -04:00
parent ea512ce2bb
commit 658df50e97
2 changed files with 5 additions and 3 deletions

View File

@ -118,8 +118,7 @@ SUBROUTINE f_lammps_setup_extract_variable () BIND(C)
CALL lmp%command('variable ex equal exp(v_lp)')
CALL lmp%command('variable fmt format ex %.6G')
CALL lmp%command('variable fmt_pad format ex %08.6g')
! USERNAME should exist on all platforms (incl. Windows)
CALL lmp%command('variable username getenv USERNAME')
CALL lmp%command('variable username getenv FORTRAN_USER')
CALL lmp%command('variable greeting file ' // absolute_path('greetings.txt'))
CALL lmp%command('variable atfile atomfile ' &
// absolute_path('atomdata.txt'))