Generate and return a list of directory paths matching a requested system application.
More...
Generate and return a list of directory paths matching a requested system application.
This is a convenience wrapper for the lower-level generic interface setPathMatch.
- Parameters
-
[in] | key | : The input scalar character of default kind SK of arbitrary length type parameter containing a list of search keywords separated by the specified input sep character.
If the input key is empty, the entire list of paths will be returned in the output list .
Similarly, an empty search keyword item in the input key evaluates to match all paths.
(optional. If missing, the entire list of paths will be returned in the output list .) |
[in] | inc | : The input scalar character of the same type and kind as the input key of arbitrary length type parameter containing the (partial) name of a target file, subfolder, or application that should be present in the output directory paths.
If the input inc is missing or empty, the entire list of paths matching key will be returned in the output list .
(optional, default = "" ) |
[in] | sep | : The input scalar non-blank character of the type and kind as key of length type parameter 1 , containing the character to be used for separating search keywords provided in key.
The recommended value for sep is the returned value from getPathSep.
(optional, default = getPathSep) |
[out] | failed | : The output scalar logical of default kind LK that is .true. if and only if the procedure accomplishes the task successfully, otherwise, it is .false. .
(optional. If missing and the procedure fails, the program will halt by calling error stop .) |
[in,out] | errmsg | : The input/output scalar character of default kind SK of arbitrary length type parameter.
If present and an error occurs, it is assigned an explanatory message describing the nature of the error that has occurred.
A length of LEN_IOMSG characters is likely sufficient to capture most error messages in full.
(optional. Its presence is relevant only if failed is also present.) |
- Returns
list
: The output allocatable
vector of type css_type each element of which contains a system application path found to match the search keywords in the input key
and to contain an application matching the specified inc
, without case-sensitivity.
The output vector will have a size of 0
if no matching application path is found.
Possible calling interfaces ⛓
type(css_type), allocatable :: list(:)
list
= getPathMatch(key
= key, inc
= inc, sep
= sep, failed
= failed,
errmsg = errmsg)
Generate and return a list of directory paths matching a requested system application.
This module contains the derived types for generating allocatable containers of scalar,...
This module contains classes and procedures for manipulating system file/folder paths.
This is the css_type type for generating instances of container of scalar of string objects.
- Note
- Dropping both optional input arguments in this generic interface is equivalent to retrieving a list of all application paths found in the environmental
PATH
variable of the processor.
- See also
- getPathMatch
setPathMatch
Example usage ⛓
9 type(display_type) :: disp
14 call disp%warn
%show(
"GNU gfortran compiler as of version 13.1, has a bug with the use of `spread()` for containers below, leading to content corruption.", width
= 72_IK)
18 call disp%show(
"spread(getPathMatch(), 2, 1)")
23 call disp%show(
"spread(getPathMatch(key = SK_''), 2, 1)")
28 call disp%show(
"spread(getPathMatch(key = SK_'intel:oneapi'), 2, 1)")
33 call disp%show(
"spread(getPathMatch(key = SK_'intel:oneapi', sep = SK_':'), 2, 1)")
34 call disp%show(
spread(
getPathMatch(key
= SK_
'intel:oneapi', sep
= SK_
':'),
2,
1) , deliml
= SK_
"""" )
38 call disp%show(
"spread(getPathMatch(key = SK_'intel:oneapi', inc = SK_'mpiexec', sep = SK_':'), 2, 1)")
39 call disp%show(
spread(
getPathMatch(key
= SK_
'intel:oneapi', inc
= SK_
'mpiexec', sep
= SK_
':'),
2,
1) , deliml
= SK_
"""" )
43 call disp%show(
"spread(getPathMatch(key = SK_'intel:oneapi', inc = SK_'vars.sh', sep = SK_':'), 2, 1)")
44 call disp%show(
spread(
getPathMatch(key
= SK_
'intel:oneapi', inc
= SK_
'vars.sh', sep
= SK_
':'),
2,
1) , deliml
= SK_
"""" )
48 call disp%show(
"spread(getPathMatch(key = SK_'open:mpi', sep = SK_':'), 2, 1)")
49 call disp%show(
spread(
getPathMatch(key
= SK_
'open:mpi', sep
= SK_
':'),
2,
1) , deliml
= SK_
"""" )
53 call disp%show(
"spread(getPathMatch(key = SK_'mpich', sep = SK_':'), 2, 1)")
This is a generic method of the derived type display_type with pass attribute.
This is a generic method of the derived type display_type with pass attribute.
This module contains classes and procedures for input/output (IO) or generic display operations on st...
type(display_type) disp
This is a scalar module variable an object of type display_type for general display.
This module defines the relevant Fortran kind type-parameters frequently used in the ParaMonte librar...
integer, parameter LK
The default logical kind in the ParaMonte library: kind(.true.) in Fortran, kind(....
integer, parameter IK
The default integer kind in the ParaMonte library: int32 in Fortran, c_int32_t in C-Fortran Interoper...
integer, parameter SK
The default character kind in the ParaMonte library: kind("a") in Fortran, c_char in C-Fortran Intero...
Generate and return an object of type display_type.
Example Unix compile command via Intel ifort
compiler ⛓
3ifort -fpp -standard-semantics -O3 -Wl,-rpath,../../../lib -I../../../inc main.F90 ../../../lib/libparamonte* -o main.exe
Example Windows Batch compile command via Intel ifort
compiler ⛓
2set PATH=..\..\..\lib;%PATH%
3ifort /fpp /standard-semantics /O3 /I:..\..\..\include main.F90 ..\..\..\lib\libparamonte*.lib /exe:main.exe
Example Unix / MinGW compile command via GNU gfortran
compiler ⛓
3gfortran -cpp -ffree-line-length-none -O3 -Wl,-rpath,../../../lib -I../../../inc main.F90 ../../../lib/libparamonte* -o main.exe
Example output ⛓ 1 - WARNING: GNU gfortran compiler as of version
13.1, has a bug with the
use of `spread()`
2 - WARNING: for containers below, leading to content corruption.
19"Z␅ ␏ Qiles (x86)/Intel/oneAPI/mpi/latest/bin/"
20"Z␅ ␏ Qiles (x86)/Intel/oneAPI/mpi/latest/bin/release/"
21©
"asU ␏ Qiles (x86)/Intel/oneAPI/mpi/latest/libfabric/bin/"
22ќ©
"sU ␏ Qiles (x86)/Intel/oneAPI/mpi/latest/libfabric/bin/utils/"
23©
"sU iles (x86)/Intel/oneAPI/tbb/latest/redist/intel64/vc_mt/"
24ќ©
"sU ␏ Qiles (x86)/Intel/oneAPI/mpi/latest/libfabric/bin/util"
25©
"cpU iles (x86)/Intel/oneAPI/compiler/latest/windows/redist/intel64_win/compiler"
26©
"hpU ␏ Qiles (x86)/Intel/oneAPI/compiler/latest/windows/redist/ia32_win/compiler"
30©
"␁sU ␏ Qystem32/WindowsPowerShell/v1.0/"
31"Z␅ ␏ QB/R2023b/binSSH/"
32""p©U ␏ Q iles
/dotnet
/"
33"as©U ␏ Q␛iles(x86)
/Intel
/oneAPI
/mpi
/latest
/libfabr
"
34"s©U ␏ Q␛iles
/MATLAB
/R2024a
/runtime
/win64
"
35"p©U ␏ Q␛ystem32TLAB
/R2020
"
36"3#p©U iles/MATLAB/R2023b/runtime/win64"
37©
"nhpU rogram Files/MATLAB/R202`␙ "
38©
">jpU rogram Files/MATLAB/R2020␙ "
39©
"sU ␏ Qiles/MATLAB/R2024a/runtime/win64"
40©
"sU ␏ Q4/binMATLAB/R2020 "
41©
"␁sU ␏ Qystem32/WindowsPowerShell/v"
42"Z␅ ␏ Qiles (x86)/Intel/oneAPI/mpi/latest/bin/re"
43©
"␑sU iles/Microsoft SQL Server/Client SDK/ODBC/170/Tools/Binn/"
45©
"sU ␏ Q4/binMATLAB/R2020 "
47"Z␅ rogram Files/MATLAB/R2020b/runtime/win64"
48©
"sU ␏ Q4/binMATLAB/R2020 "
49"Z␅ ␏ Qiles (x86)//R2019b/runti1 "
50"4/binMATLAB/R2020 ATA Z␅ "
51"iles (x86)//R2019b/runti1 Secure/! s
53"4/binMATLAB/R2020 ATA Z␅ e/A iles ("
55␕s/A 4/binMATLAB/R2020 A"
56"Z␅ e/A iles (x8Q 9b/runti1 Secur"
58␕s/A 4/binMATLAB/R2020 A/A Z␅ e/A iles (x"
60␕s/A 4/binMATLAB/R2020 A/A Z␅ e/A iles ("
62␕s/A 4/binMATLAB/R2020 A/A Z␅ e/A "
64␕s/A 4/binMATLAB/R2020 A/A Z␅ e/A "
65"9b/runti1 Securx8! ␙U s
68␕s/A 4/binMATLAB/R2020 A/A Z␅ e/A l64"
69"9b/runti1 Securx8! ␙U s
71"4/binMATLAB/R2020 A/A Z␅ e/A l64st/bin"
72"9b/runti1 Securx8! ␙U s
74©
"qsU A 4/binMATLAB/R2020 A/A Z␅ e/A l64st"
75"9b/runti1 Securx8! ␙U s
77"4/binMATLAB/R2020 A/A Z␅ e/A l64sttest/Q "
78©
"hpU ␏ Qiles (x86)/Intel/oneAPI/compiler/latest/windows/redist/ia32"
81"0 A/A Z␅ e/A l64sttest/Q ugger/latest/Q Securx"
83␕ /sQ qties/laQ an/mingwQ "
84"Z␅ e/A l64sttest/Q ugger/latest/Q Secur"
86␕ /sQ qties/laQ an/mingwQ w64/bin"
87"Z␅ e/A l64sttest/Q ugger/latest/Q Securls"
90"an/mingwQ w64/binDatA Z␅ e/A l64sttest/Q ugg"
93⹘
"U Q an/mingwQ w64/binDa"
112"Z␅ ␏ Qiles (x86)/Intel/oneAPI/mpi/latest/bin/"
113"Z␅ ␏ Qiles (x86)/Intel/oneAPI/mpi/latest/bin/release/"
114©
"NipU ␏ Qiles (x86)/Intel/oneAPI/mpi/latest/libfabric/bin/"
115©
"ipU ␏ Qiles (x86)/Intel/oneAPI/mpi/latest/libfabric/bin/utils/"
116©
"?pU iles (x86)/Intel/oneAPI/tbb/latest/redist/intel64/vc_mt/"
117©
"ipU ␏ Qiles (x86)/Intel/oneAPI/mpi/latest/libfabric/bin/util"
118©
"cpU iles (x86)/Intel/oneAPI/compiler/latest/windows/redist/intel64_win/compiler"
119©
"hpU ␏ Qiles (x86)/Intel/oneAPI/compiler/latest/windows/redist/ia32_win/compiler"
123©
"␌opU ␏ Qystem32/Wbem"
124©
"pU ␏ Qystem32/WindowsPowerShell/v1.0/"
125©
"OpU ␏ Qystem32/OpenSSH/"
126©
"OpU ␏ Qystem32/Open"
127©
"NipU ␏ Qiles (x86)/Intel/oneAPI/mpi/latest/libfabr"
128©
"␁#pU ␏ Qiles/MATLAB/R2024a/runtime/win64"
129©
"␌opU ␏ Qystem32/WbemR2024a/bin"
130©
"sU iles/MATLAB/R2023b/runtime/win64"
131"Z␅ ␏ QB/R2023b/binR2023b/bin"
132"Z␅ rogram Files/MATLAB/R202@␄ "
133©
"␁#pU ␏ Qiles/MATLAB/R2024a/runtime/win64"
134©
"NpU ␏ Qiles/MATLAB/R2020 "
135©
"pU ␏ Qystem32/WindowsPowerShell/v"
136"Z␅ ␏ Qiles (x86)/Intel/oneAPI/mpi/latest/bin/re"
137©
"sU ␏ Qiles/Microsoft SQL Server/Client SDK/ODBC/170/Tools/Binn/"
139"Z␅ ␏ Qiles/gs/gs10.00.0 "
141"Z␅ ␏ Qiles (x86)/Intel/oneAPI/mpi/late"
143␕ iles/MATLAB/R2020b/bin"
146␕ iles/MATLAB/R2019b/runtime/win64"
150"Z␅ rogram Files (x86)/Pulse Secure/VC142.CRT/X64/"
153␕ iles/MATLAB/R2019b/runtime/win64@ "
154ڐ©
"sU ␏ Qiles (x86)/Common Files/Pulse Secure/TNC Client Plugin/"
156␕ iles/MATLAB/R2020b/binI/vpl/late@ "
157©
"sU ␏ Qiles/Microsoft SQL Server/Client SDK/ODBC/170/Tools/Bin"
158ڐ©
"sU ␏ Qiles (x86)/Common Files/Pulse Secure/TNC Client Plugin"
159©
"sU ␏ Qiles/Microsoft SQL Server/Client SDK/ODBC/170/To"
160ڐ©
"sU ␏ Qiles (x86)/Common Files/Pulse Secure/TNC Clien"
161©
"sU ␏ Qiles/Microsoft SQL Server/Client SDK/O"
162©ڐ©
"qsU Q sU ␏ Qiles (x86)/Common Files/Pulse Sec"
163©
"␛U A sU ␏ Qiles/Microsoft SQL Server/Clie"
164©ڐ©
"qsU Q sU ␏ Qiles (x86)/Common Files"
165๘©
"cU Q ␛U A sU ␏ Qiles/Mi"
166©ڐ©
"QL Server/Clie Files (x8A qsU Q sU ␏ Qile"
167๘©
"n Files A cU Q ␛U A sU ␏ Qi"
168©ڐ©
"QL Server/Clie Files (x8A qsU Q sU ␏ "
169©
"hpU ␏ Qiles (x86)/Intel/oneAPI/compiler/latest/windows/redist/ia32"
170ͪ©
"sU rogram Files (x86)/Intel/oneAPI/dev-utilities/latest/bin"
172␕ iles (x86)/Intel/oneAPI/debugger/latest/gdb/intel64/bin"
174␕ r/AppData/Local/quickstart_fortran/mingw64/bin"
176␕ r/AppData/Local/quickstart_fortr@ "
177©
"kpU sers/amir/AppData/Local/quickstart_fortran/MinGit/mingw64/bin"
179␕ r/AppData/Local/quickstart_fortr@ "
180"Z␅ ␏ Qiles/CMake/bin"
181©
"␎kpU sers/amir/AppData/Local/Programs/Microsoft VS Code/bin"
182Ĺ
"␐U ␛U r/.dotnet/tools"
184␕ r/AppData/Local/Pandoc/"
189©
"JpU ␏ Qiles (x86)/Intel/oneAPI/mpi/latest/bin/"
190"Z␅ ␏ Qiles (x86)/Intel/oneAPI/mpi/latest/bin/release/"
191©
"<HpU ␏ Qiles (x86)/Intel/oneAPI/mpi/latest/libfabric/bin/"
192©
"HpU ␏ Qiles (x86)/Intel/oneAPI/mpi/latest/libfabric/bin/utils/"
193©
"sU iles (x86)/Intel/oneAPI/tbb/latest/redist/intel64/vc_mt/"
194©
"HpU ␏ Qiles (x86)/Intel/oneAPI/mpi/latest/libfabric/bin/util"
195©
"cpU iles (x86)/Intel/oneAPI/compiler/latest/windows/redist/intel64_win/compiler"
196""p©U ␏ Q␛iles(x86)
/Intel
/oneAPI
/compiler
/latest
/windows
/redist
/ia32_win
/compiler
"
197"s©U ␏ Q␛iles(x86)
/Intel
/oneAPI
/vpl
/latest
/bin
"
198"<Hp©U ␏ Q␛iles(x86)
/Intel
/oneAPI
/mpi
/latest
/libfabric
/bin
//vc_mt
"
199"Z␅ ␏ Q␛iles(x86)
/Intel
/oneAPI
/mpi
/latest
/bin
/release
/n
/utils
"
200"␞hp©U ␏ Q␛iles(x86)
/Intel
/oneAPI
/mpi
/latest
/libfabric
/bin
"
201"␞ip©U ␏ Q␛iles(x86)
/Intel
/oneAPI
/mpi
/latest
/bin
/release
"
202"3#p©U iles (x86)/Intel/oneAPI/mpi/latest/bin"
203©
"NipU ␏ Qiles (x86)/Intel/oneAPI/mkl/latest/redist/intel64"
204©
"␞IpU ␏ Qiles (x86)/Intel/oneAPI/mkl/latest/bin/intel64"
205©
"sU ␏ Qiles (x86)/Intel/oneAPI/vpl/latest/binn"
206©
"JpU ␏ Qiles (x86)/Intel/oneAPI/mpi/latest/bin/"
207©
"sU ␏ Qiles (x86)/Intel/oneAPI/ippcp/latest/redist/intel64"
208©
",sU ␏ Qiles (x86)/Intel/oneAPI/ipp/latest/redist/intel64"
209©
"asU iles (x86)/Intel/oneAPI/dpcpp-ct/latest/bin"
210""p©U ␏ Q␛iles(x86)
/Intel
/oneAPI
/compiler
/latest
/windows
/redist
/ia32
"
211"Z␅ iles(x86)
/Intel
/oneAPI
/dev
-utilities
/latest
/bin
"
212"␞hp©U ␏ Q␛iles(x86)
/Intel
/oneAPI
/mpi
/latest
/libfabric
/binl64
/bin
"
215spread(getPathMatch(key = SK_'intel:oneapi', sep = SK_':'), 2, 1)
216"␜s©U ␏ Q␛iles(x86)
/Intel
/oneAPI
/mpi
/latest
/bin
/"
217"Z␅ ␏ Q␛iles(x86)
/Intel
/oneAPI
/mpi
/latest
/bin
/release
/"
218"␛Jp©U ␏ Q␛iles(x86)
/Intel
/oneAPI
/mpi
/latest
/libfabric
/bin
/"
219"?p©U ␏ Q␛iles(x86)
/Intel
/oneAPI
/mpi
/latest
/libfabric
/bin
/utils
/"
220"qs©U iles(x86)
/Intel
/oneAPI
/tbb
/latest
/redist
/intel64
/vc_mt
/"
221"?p©U ␏ Q␛iles(x86)
/Intel
/oneAPI
/mpi
/latest
/libfabric
/bin
/util
"
222"cp©U iles(x86)
/Intel
/oneAPI
/compiler
/latest
/windows
/redist
/intel64_win
/compiler
"
223"NIp©U ␏ Q␛iles(x86)
/Intel
/oneAPI
/compiler
/latest
/windows
/redist
/ia32_win
/compiler
"
224"CBp©U ␏ Q␛iles(x86)
/Intel
/oneAPI
/vpl
/latest
/bin
"
225"␛Jp©U ␏ Q␛iles(x86)
/Intel
/oneAPI
/mpi
/latest
/libfabric
/bin
//vc_mt
"
226"Z␅ ␏ Q␛iles(x86)
/Intel
/oneAPI
/mpi
/latest
/bin
/release
/n
/utils
"
227"NIp©U ␏ Q␛iles(x86)
/Intel
/oneAPI
/compiler
/latest
/windows
/"
228"␛hp©U iles(x86)
/Intel
/oneAPI
/mpi
/latest
/bin
/release
"
229"p©U iles(x86)
/Intel
/oneAPI
/mpi
/latest
/bin
"
230"␞ip©U iles(x86)
/Intel
/oneAPI
/mkl
/latest
/redist
/intel64
"
231"Nip©U iles(x86)
/Intel
/oneAPI
/mkl
/latest
/bin
/intel64
"
232"CBp©U ␏ Q␛iles(x86)
/Intel
/oneAPI
/vpl
/latest
/binn
"
233"␜s©U ␏ Q␛iles(x86)
/Intel
/oneAPI
/mpi
/latest
/bin
/"
234"s©U iles(x86)
/Intel
/oneAPI
/ippcp
/latest
/redist
/intel64
"
235"as©U iles(x86)
/Intel
/oneAPI
/ipp
/latest
/redist
/intel64
"
236"QJp©U iles(x86)
/Intel
/oneAPI
/dpcpp
-ct
/latest
/bin
"
237"Z␅ rogram Files(x86)
/Intel
/oneAPI
/dnnl
/latest
/cpu_dpcpp_gpu_dpcpp
/bin
"
238"Z␅ iles(x86)
/Intel
/oneAPI
/dev
-utilities
/latest
/bin
"
239"NIp©U ␏ Q␛iles(x86)
/Intel
/oneAPI
/compiler
/latest
/windows
/l64
/bin
"
242spread(getPathMatch(key = SK_'intel:oneapi', inc = SK_'mpiexec', sep = SK_':'), 2, 1)
243",s©U ␏ Q␛iles(x86)
/Intel
/oneAPI
/mpi
/latest
/bin
/"
244",s©U ␏ Q␛iles(x86)
/Intel
/oneAPI
/mpi
/latest
/bin
"
247spread(getPathMatch(key = SK_'intel:oneapi', inc = SK_'vars.sh', sep = SK_':'), 2, 1)
251spread(getPathMatch(key = SK_'open:mpi', sep = SK_':'), 2, 1)
255spread(getPathMatch(key = SK_'mpich', sep = SK_':'), 2, 1)
- Test:
- test_pm_sysPath
- Todo:
- High Priority: The current Fortran standard 202x does not allow passing characters of non-default kind to the intrinsic Fortran statements and procedures.
As such, the implementation of this procedure for non-default character
kinds leads to compile-time kind mismatch errors.
This procedure should be converted back to a generic interface in the future when non-default character kinds are also fully supported by the intrinsic functions.
Final Remarks ⛓
If you believe this algorithm or its documentation can be improved, we appreciate your contribution and help to edit this page's documentation and source file on GitHub.
For details on the naming abbreviations, see this page.
For details on the naming conventions, see this page.
This software is distributed under the MIT license with additional terms outlined below.
-
If you use any parts or concepts from this library to any extent, please acknowledge the usage by citing the relevant publications of the ParaMonte library.
-
If you regenerate any parts/ideas from this library in a programming environment other than those currently supported by this ParaMonte library (i.e., other than C, C++, Fortran, MATLAB, Python, R), please also ask the end users to cite this original ParaMonte library.
This software is available to the public under a highly permissive license.
Help us justify its continued development and maintenance by acknowledging its benefit to society, distributing it, and contributing to it.
- Copyright
- Computational Data Science Lab
- Author:
- Amir Shahmoradi, Tuesday March 7, 2017, 7:03 AM, Institute for Computational Engineering and Sciences (ICES), The University of Texas Austin
Definition at line 6227 of file pm_sysPath.F90.