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.
17"%e␅ ␎%&iles (x86)/Intel/oneAPI/mpi/latest/bin/"
18"%e␅ ␎%&iles (x86)/Intel/oneAPI/mpi/latest/bin/release/"
19"v8WV ␎%&iles (x86)/Intel/oneAPI/mpi/latest/libfabric/bin/"
20ƹ
"8WV ␎%&iles (x86)/Intel/oneAPI/mpi/latest/libfabric/bin/utils/"
21"␖8WV iles (x86)/Intel/oneAPI/tbb/latest/redist/intel64/vc_mt/"
22ƹ
"8WV ␎%&iles (x86)/Intel/oneAPI/mpi/latest/libfabric/bin/util"
23"8WV iles (x86)/Intel/oneAPI/compiler/latest/windows/redist/intel64_win/compiler"
24"␇8WV ␎%&iles (x86)/Intel/oneAPI/compiler/latest/windows/redist/ia32_win/compiler"
28"8WV ␎%&ystem32/WindowsPowerShell/v1.0/"
29"&8WV ␎%&ystem32/WbemSSH/"
31"v8WV ␎%&iles (x86)/Intel/oneAPI/mpi/latest/libfabr"
32"␟8WV ␎%&iles/MATLAB/R2024a/runtime/win64"
33" ]N␕ ]N␕ iles/MATLAB/R2020 "
34"H'8WV iles/MATLAB/R2023b/runtime/win64"
35"38WV rogram Files/MATLAB/R202P␙ "
36"␟8WV ␎%&iles/MATLAB/R2024a/runtime/win64"
37"8WV rogram Files/MATLAB/R202 ␙ "
38"8WV ␎%&ystem32/WindowsPowerShell/v"
39"%e␅ ␎%&iles (x86)/Intel/oneAPI/mpi/latest/bin/re"
40"8WV iles/Microsoft SQL Server/Client SDK/ODBC/170/Tools/Binn/"
41"n8WV ␎%& iles/Git/cmd"
42۷
"8WV ␎%&ystem32/gs10.00.0 "
44"%e␅ rogram Files/MATLAB/R2020b/runtime/win64"
45۷
"8WV ␎%&ystem32/gs10.00.0 "
46"%e␅ ␎%&iles (x86)//R2019b/runti1 "
47"ystem32/gs10.00.0 AT! \N␂␕"
48"%e␅ ␎%&iles (x86)//R2019b/runti1 T/X64/"
49"ystem32/gs10.00.0 AT! \N␂␕e/Q %e␅ "
50"ystem32/gs10.00.0 AT! \N␂␕e/Q %e␅ NCQ \N␂␕ "
51"iles (x86)//R2019b/runti1 T/X64/I/vpl/lateP "
52"0 AT! \N␂␕e/Q %e␅ NCQ \N␂␕ sA iles (x"
53"9b/runti1 T/X64/I/vpl/lateP I/a 0 AT! \N␂␕"
54"9b/runti1 T/X64/I/vpl/lateP I/a 0 AT! "
55"9b/runti1 T/X64/I/vpl/lateP I/a 0 AT! "
56"%e␅ NCQ \N␂␕ sA iles (x/mpi/late` "
57"9b/runti1 T/X64/I/vpl/lateP I/a 0 AT! l64"
58"%e␅ NCQ \N␂␕ sA iles (x/mpi/late` /iQ "
59"T/X64/I/vpl/lateP I/a 0 AT! l64st/bin"
60"%e␅ NCQ \N␂␕ sA iles (x/mpi/late` /"
61"8WV A T/X64/I/vpl/lateP I/a 0 AT! l64st"
62"%e␅ NCQ \N␂␕ sA iles (x/mpi/late` /sQ "
63"T/X64/I/vpl/lateP I/a 0 AT! l64sttest/Q "
64"␇8WV ␎%&iles (x86)/Intel/oneAPI/compiler/latest/windows/redist/ia32"
65"\N␂␕ sA iles (x/mpi/late` /sQ ties/laQ "
66"P I/a 0 AT! l64sttest/Q ugger/latest/Q \N␂␕ "
67"iles (x/mpi/late` /sQ ties/laQ an/mingwQ "
68"0 AT! l64sttest/Q ugger/latest/Q \N␂␕"
69"iles (x/mpi/late` /sQ ties/laQ an/mingwQ w64/bin"
70"0 AT! l64sttest/Q ugger/latest/Q \N␂␕ls"
71"iles (x/mpi/late` /sQ "
72"an/mingwQ w64/binDatA 0 AT! l64sttest/Q ugg"
73"\N␂␕ls1 iles (x/mpi/lat"
74"p2]RV Q an/mingwQ w64/binDa"
91"%e␅ ␎%&iles (x86)/Intel/oneAPI/mpi/latest/bin/"
92"%e␅ ␎%&iles (x86)/Intel/oneAPI/mpi/latest/bin/release/"
93"S8WV ␎%&iles (x86)/Intel/oneAPI/mpi/latest/libfabric/bin/"
94"8WV ␎%&iles (x86)/Intel/oneAPI/mpi/latest/libfabric/bin/utils/"
95"8WV iles (x86)/Intel/oneAPI/tbb/latest/redist/intel64/vc_mt/"
96"8WV ␎%&iles (x86)/Intel/oneAPI/mpi/latest/libfabric/bin/util"
97"8WV iles (x86)/Intel/oneAPI/compiler/latest/windows/redist/intel64_win/compiler"
98"&8WV ␎%&iles (x86)/Intel/oneAPI/compiler/latest/windows/redist/ia32_win/compiler"
101"Q8WV ␎%&ystem32/Wbem"
102"V8WV ␎%&ystem32/WindowsPowerShell/v1.0/"
103"8WV ␎%&ystem32/OpenSSH/"
105"S8WV ␎%&iles (x86)/Intel/oneAPI/mpi/latest/libfabr"
106"V'8WV ␎%&iles/MATLAB/R2024a/runtime/win64"
107"8WV ␎%&ystem32/OpenSSH/4a/bin"
108"␆8WV iles/MATLAB/R2023b/runtime/win64"
109"Q8WV ␎%&ystem32/WbemR2023b/bin"
110"V'8WV ␎%&iles/MATLAB/R2024a/runtime/win64"
111"%e␅ ␎%&B/R2023b/binR2022b/bin"
112"V8WV ␎%&ystem32/WindowsPowerShell/v"
113"%e␅ ␎%&iles (x86)/Intel/oneAPI/mpi/latest/bin/re"
114"&8WV ␎%&iles/Microsoft SQL Server/Client SDK/ODBC/170/Tools/Binn/"
116"8WV ␎%&iles/gs/gs10.00.0 "
118"%e␅ ␎%&iles (x86)/Intel/oneAPI/mpi/late"
119"%e␅ ␎%&iles/MATLAB/R2020 "
120"0]N␕ 0]N␕ iles/MATLAB/R2019b/runtime/win64"
121"8WV ␎%&iles/Git/cmdR2010 "
122"0]N␕ 0]N␕ iles/MATLAB/R2019b/runtime/win64@ "
123"P]N␕ @f]RV iles (x86)/Pulse Secure/VC142.CRT/X86/"
124"P]N␕ P]N␕ iles (x86)/Common Files/Pulse Secure/TNC Client Plugin/"
125"␐]N␕ ␐]N␕ iles (x86)/Intel/oneAPI/vpl/late@ "
126"p]N␕ p]N␕ iles (x86)/Intel/oneAPI/tbb/latest/redist/intel64/vc_mt"
127" g]RV \N␂␕ iles (x86)/Intel/oneAPI/mpi/latest/libfabric/bin "
128"p]N␕ p]N␕ iles (x86)/Intel/oneAPI/tbb/latest/redist/intel6"
129" g]RV \N␂␕ iles (x86)/Intel/oneAPI/mpi/latest/libfabric/b"
130"]N␕ ]N␕ iles (x86)/Intel/oneAPI/mpi/late@ "
131"\N␂␕ \N␂␕ iles (x86)/Intel/oneAPI/mkl/latest/redist/intel64"
132" ^N␕ ^N␕ iles (x86)/Intel/oneAPI/mkl/latest/bin/intel64"
133"␐]N␕ ␐]N␕ iles (x86)/Intel/oneAPI/itac/lat@ "
134"\N␂␕ \N␂␕ iles (x86)/Intel/oneAPI/itac/lat@ "
135"\N␂␕ \N␂␕ iles (x86)/Intel/oneAPI/ippcp/latest/redist/intel64"
136"%e␅ iles (x86)/Intel/oneAPI/ipp/latest/redist/intel6P"
137"&8WV ␎%&iles/Microsoft SQL Server/Client SDK/ODBC/1"
138"&8WV ␎%&iles (x86)/Intel/oneAPI/compiler/latest/windows/redist/ia32"
139"r8WV rogram Files (x86)/Intel/oneAPI/dev-utilities/latest/bin"
140"4]RV \N␂␕ iles (x86)/Intel/oneAPI/debugger/latest/gdb/intel64/bin"
141"4]RV \N␂␕ r/AppData/Local/quickstart_fortran/mingw64/bin"
142"4]RV \N␂␕ r/AppData/Local/quickstart_fortr@ "
143"␃8WV sers/amir/AppData/Local/quickstart_fortran/MinGit/mingw64/bin"
144"4]RV \N␂␕ r/AppData/Local/quickstart_fortr@ "
145" ]N␕ ]N␕ iles/CMake/bin"
146"s8WV sers/amir/AppData/Local/Programs/Microsoft VS Code/bin"
147"]RV f]RV r/.dotnet/tools"
148"]RV \N␂␕ r/AppData/Local/Pandoc/"
153"18WV ␎%&iles (x86)/Intel/oneAPI/mpi/latest/bin/"
154"%e␅ ␎%&iles (x86)/Intel/oneAPI/mpi/latest/bin/release/"
155"18WV ␎%&iles (x86)/Intel/oneAPI/mpi/latest/libfabric/bin/"
156"8WV ␎%&iles (x86)/Intel/oneAPI/mpi/latest/libfabric/bin/utils/"
157"␖8WV iles (x86)/Intel/oneAPI/tbb/latest/redist/intel64/vc_mt/"
158"8WV ␎%&iles (x86)/Intel/oneAPI/mpi/latest/libfabric/bin/util"
159"8WV iles (x86)/Intel/oneAPI/compiler/latest/windows/redist/intel64_win/compiler"
160"l8WV ␎%&iles (x86)/Intel/oneAPI/compiler/latest/windows/redist/ia32_win/compiler"
161"68WV ␎%&iles (x86)/Intel/oneAPI/vpl/latest/bin"
162"18WV ␎%&iles (x86)/Intel/oneAPI/mpi/latest/libfabric/bin//vc_mt"
163"%e␅ ␎%&iles (x86)/Intel/oneAPI/mpi/latest/bin/release/n/utils"
164"!8WV ␎%&iles (x86)/Intel/oneAPI/mpi/latest/libfabric/bin"
165"8WV ␎%&iles (x86)/Intel/oneAPI/mpi/latest/bin/release"
166"8WV iles (x86)/Intel/oneAPI/mpi/latest/bin"
167"S8WV ␎%&iles (x86)/Intel/oneAPI/mkl/latest/redist/intel64"
168"8WV ␎%&iles (x86)/Intel/oneAPI/mkl/latest/bin/intel64"
169"68WV ␎%&iles (x86)/Intel/oneAPI/vpl/latest/binn"
170"18WV ␎%&iles (x86)/Intel/oneAPI/mpi/latest/bin/"
171"a8WV ␎%&iles (x86)/Intel/oneAPI/ippcp/latest/redist/intel64"
172"l8WV ␎%&iles (x86)/Intel/oneAPI/compiler/latest/windows/r"
173"%e␅ iles (x86)/Intel/oneAPI/dpcpp-ct/latest/bin"
174"%e␅ rogram Files (x86)/Intel/oneAPI/dnnl/latest/cpu_dpcpp_gpu_dpcpp/bin"
175"!8WV rogram Files (x86)/Intel/oneAPI/dev-utilities/latest/bin"
176"!8WV ␎%&iles (x86)/Intel/oneAPI/mpi/latest/libfabric/binl64/bin"
179spread(
getPathMatch(key
= SK_
'intel:oneapi', sep
= SK_
':'),
2,
1)
180"8WV ␎%&iles (x86)/Intel/oneAPI/mpi/latest/bin/"
181"%e␅ ␎%&iles (x86)/Intel/oneAPI/mpi/latest/bin/release/"
182"8WV ␎%&iles (x86)/Intel/oneAPI/mpi/latest/libfabric/bin/"
183"8WV ␎%&iles (x86)/Intel/oneAPI/mpi/latest/libfabric/bin/utils/"
184"f8WV iles (x86)/Intel/oneAPI/tbb/latest/redist/intel64/vc_mt/"
185"8WV ␎%&iles (x86)/Intel/oneAPI/mpi/latest/libfabric/bin/util"
186"8WV iles (x86)/Intel/oneAPI/compiler/latest/windows/redist/intel64_win/compiler"
187"k8WV ␎%&iles (x86)/Intel/oneAPI/compiler/latest/windows/redist/ia32_win/compiler"
188"V'8WV ␎%&iles (x86)/Intel/oneAPI/vpl/latest/bin"
189"8WV ␎%&iles (x86)/Intel/oneAPI/mpi/latest/libfabric/bin//vc_mt"
190"%e␅ ␎%&iles (x86)/Intel/oneAPI/mpi/latest/bin/release/n/utils"
191"k8WV ␎%&iles (x86)/Intel/oneAPI/compiler/latest/windows/"
192"8WV iles (x86)/Intel/oneAPI/mpi/latest/bin/release"
193"␆8WV iles (x86)/Intel/oneAPI/mpi/latest/bin"
194"c8WV iles (x86)/Intel/oneAPI/mkl/latest/redist/intel64"
195"␑8WV iles (x86)/Intel/oneAPI/mkl/latest/bin/intel64"
196"V'8WV ␎%&iles (x86)/Intel/oneAPI/vpl/latest/binn"
197"8WV ␎%&iles (x86)/Intel/oneAPI/mpi/latest/bin/"
198"Q8WV iles (x86)/Intel/oneAPI/ippcp/latest/redist/intel64"
199"␁8WV iles (x86)/Intel/oneAPI/ipp/latest/redist/intel64"
200"8WV iles (x86)/Intel/oneAPI/dpcpp-ct/latest/bin"
201"%e␅ rogram Files (x86)/Intel/oneAPI/dnnl/latest/cpu_dpcpp_gpu_dpcpp/bin"
202"%e␅ iles (x86)/Intel/oneAPI/dev-utilities/latest/bin"
203"k8WV ␎%&iles (x86)/Intel/oneAPI/compiler/latest/windows/l64/bin"
206spread(
getPathMatch(key
= SK_
'intel:oneapi', inc
= SK_
'mpiexec', sep
= SK_
':'),
2,
1)
207"8WV ␎%&iles (x86)/Intel/oneAPI/mpi/latest/bin/"
208"8WV ␎%&iles (x86)/Intel/oneAPI/mpi/latest/bin"
211spread(
getPathMatch(key
= SK_
'intel:oneapi', inc
= SK_
'vars.sh', sep
= SK_
':'),
2,
1)
215spread(
getPathMatch(key
= SK_
'open:mpi', sep
= SK_
':'),
2,
1)
219spread(
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.