IO: Replace non-standard SYSTEM with Fortran 2008 EXECUTE_COMMAND_LINE.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
This commit is contained in:
Grzegorz Kowal 2021-12-17 14:47:25 -03:00
parent 27fd2fb6e1
commit e977548f41

View File

@ -1967,13 +1967,13 @@ module io
#ifdef __INTEL_COMPILER
inquire(directory = dname, exist = test)
do while(.not. test)
if (.not. test) call system("mkdir -p " // trim(dname))
if (.not. test) call execute_command_line("mkdir -p " // trim(dname))
inquire(directory = dname, exist = test)
end do
#else /* __INTEL_COMPILER */
inquire(file = dname, exist = test)
do while(.not. test)
if (.not. test) call system("mkdir -p " // trim(dname))
if (.not. test) call execute_command_line("mkdir -p " // trim(dname))
inquire(file = dname, exist = test)
end do
#endif /* __INTEL_COMPILER */
@ -1988,7 +1988,7 @@ module io
call get_parameter_file(fname, status)
if (status == 0) then
call system("cp -a " // trim(fname) // " " // trim(dname))
call execute_command_line("cp -a " // trim(fname) // " " // trim(dname))
else
call print_message(loc, "Cannot get the location of parameter file!")
return
@ -2391,13 +2391,13 @@ module io
#ifdef __INTEL_COMPILER
inquire(directory = dname, exist = test)
do while(.not. test)
if (.not. test) call system("mkdir -p " // trim(dname))
if (.not. test) call execute_command_line("mkdir -p " // trim(dname))
inquire(directory = dname, exist = test)
end do
#else /* __INTEL_COMPILER */
inquire(file = dname, exist = test)
do while(.not. test)
if (.not. test) call system("mkdir -p " // trim(dname))
if (.not. test) call execute_command_line("mkdir -p " // trim(dname))
inquire(file = dname, exist = test)
end do
#endif /* __INTEL_COMPILER */
@ -2414,7 +2414,7 @@ module io
call get_parameter_file(fname, status)
if (status == 0) then
call system("cp -a " // trim(fname) // " " // trim(dname))
call execute_command_line("cp -a " // trim(fname) // " " // trim(dname))
else
call print_message(loc, "Cannot get the location of parameter file!")
return