18 character(LEN=*),
intent(in) :: dir_name
21 call system(
'mkdir "' // dir_name //
'" 2> NUL')
23 call system(
'mkdir -p "' // dir_name //
'"')
31 character(LEN=*),
intent(in) :: filepath
34 call system(
'del "' // filepath //
'"')
36 call system(
'rm "' // filepath //
'"')
44 character(LEN=*),
intent(in) :: dir_name
47 call system(
'rmdir "' // dir_name //
'" /s /q')
49 call system(
'rm -r "' // dir_name //
'"')
58 character(LEN=*),
intent(in) :: fileloc
59 logical,
intent(inout) :: dircheck
61#ifdef __INTEL_COMPILER
62 inquire (directory=trim(fileloc), exist=dircheck)
64 inquire (file=trim(fileloc), exist=dircheck)
72 character(LEN=*),
intent(out) :: cwd
81 character(LEN=*),
intent(in) :: dirpath
82 character(LEN=*),
intent(out) :: basename
84 character(len=30) :: tmpfilepath
86 write (tmpfilepath,
'(A,I0)')
'basename_', proc_rank
89 call system(
'for /F %i in ("' // trim(dirpath) //
'") do @echo %~ni > ' // trim(tmpfilepath))
91 call system(
'basename "' // trim(dirpath) //
'" > ' // trim(tmpfilepath))
94 open (newunit=iunit, file=trim(tmpfilepath), form=
'formatted', status=
'old')
95 read (iunit,
'(A)') basename
Platform-specific file and directory operations: create, delete, inquire, getcwd, and basename.
impure subroutine s_delete_file(filepath)
Delete a file at the given path using a platform-specific system command.
impure subroutine s_get_basename(dirpath, basename)
Extract the base filename from a directory path using the system basename command.
impure subroutine s_delete_directory(dir_name)
Recursively delete a directory using a platform-specific system command.
impure subroutine s_get_cwd(cwd)
Retrieve the current working directory path via the GETCWD intrinsic.
impure subroutine my_inquire(fileloc, dircheck)
Inquires on the existence of a directory.
impure subroutine s_create_directory(dir_name)
Create a directory and all its parents if it does not exist.
MPI halo exchange, domain decomposition, and buffer packing/unpacking for the simulation solver.