ParaMonte Fortran 2.0.0
Parallel Monte Carlo and Machine Learning Library
See the latest version documentation.
pm_os.F90
Go to the documentation of this file.
1!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
2!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
3!!!! !!!!
4!!!! ParaMonte: Parallel Monte Carlo and Machine Learning Library. !!!!
5!!!! !!!!
6!!!! Copyright (C) 2012-present, The Computational Data Science Lab !!!!
7!!!! !!!!
8!!!! This file is part of the ParaMonte library. !!!!
9!!!! !!!!
10!!!! LICENSE !!!!
11!!!! !!!!
12!!!! https://github.com/cdslaborg/paramonte/blob/main/LICENSE.md !!!!
13!!!! !!!!
14!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
15!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
16
33
34!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
35
36module pm_os
37
38 use pm_kind, only: IK, LK, RK, CK, SK
39
40 implicit none
41
42 character(*, SK), parameter :: MODULE_NAME = SK_"@pm_os"
43
44!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
45
103 interface isLinux
104
105 impure module function isLinux() result(itis)
106#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
107 !DEC$ ATTRIBUTES DLLEXPORT :: isLinux
108#endif
109 logical(LK) :: itis
110 end function
111
112 impure module function isLinuxFailed(failed) result(itis)
113#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
114 !DEC$ ATTRIBUTES DLLEXPORT :: isLinuxFailed
115#endif
116 use pm_kind, only: SKG => SK
117 logical(LK) , intent(out) :: failed
118 logical(LK) :: itis
119 end function
120
121 impure module function isLinuxFailedMsg(failed, errmsg) result(itis)
122#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
123 !DEC$ ATTRIBUTES DLLEXPORT :: isLinuxFailedMsg
124#endif
125 logical(LK) , intent(out) :: failed
126 character(*, SK), intent(inout) :: errmsg
127 logical(LK) :: itis
128 end function
129
130 end interface
131
132!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
133
191 interface isDarwin
192
193 impure module function isDarwin() result(itis)
194#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
195 !DEC$ ATTRIBUTES DLLEXPORT :: isDarwin
196#endif
197 logical(LK) :: itis
198 end function
199
200 impure module function isDarwinFailed(failed) result(itis)
201#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
202 !DEC$ ATTRIBUTES DLLEXPORT :: isDarwinFailed
203#endif
204 use pm_kind, only: SKG => SK
205 logical(LK) , intent(out) :: failed
206 logical(LK) :: itis
207 end function
208
209 impure module function isDarwinFailedMsg(failed, errmsg) result(itis)
210#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
211 !DEC$ ATTRIBUTES DLLEXPORT :: isDarwinFailedMsg
212#endif
213 logical(LK) , intent(out) :: failed
214 character(*, SK), intent(inout) :: errmsg
215 logical(LK) :: itis
216 end function
217
218 end interface
219
220!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
221
279 interface isWindows
280
281 impure module function isWindows() result(itis)
282#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
283 !DEC$ ATTRIBUTES DLLEXPORT :: isWindows
284#endif
285 logical(LK) :: itis
286 end function
287
288 impure module function isWindowsFailed(failed) result(itis)
289#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
290 !DEC$ ATTRIBUTES DLLEXPORT :: isWindowsFailed
291#endif
292 use pm_kind, only: SKG => SK
293 logical(LK) , intent(out) :: failed
294 logical(LK) :: itis
295 end function
296
297 impure module function isWindowsFailedMsg(failed, errmsg) result(itis)
298#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
299 !DEC$ ATTRIBUTES DLLEXPORT :: isWindowsFailedMsg
300#endif
301 logical(LK) , intent(out) :: failed
302 character(*, SK), intent(inout) :: errmsg
303 logical(LK) :: itis
304 end function
305
306 end interface
307
308!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
309
310end module pm_os ! LCOV_EXCL_LINE
Generate and return .true. if the runtime operating system is Darwin (macOS).
Definition: pm_os.F90:191
Generate and return .true. if the runtime operating system is Linux.
Definition: pm_os.F90:103
Generate and return .true. if the runtime operating system is Windows.
Definition: pm_os.F90:279
This module defines the relevant Fortran kind type-parameters frequently used in the ParaMonte librar...
Definition: pm_kind.F90:268
integer, parameter RK
The default real kind in the ParaMonte library: real64 in Fortran, c_double in C-Fortran Interoperati...
Definition: pm_kind.F90:543
integer, parameter LK
The default logical kind in the ParaMonte library: kind(.true.) in Fortran, kind(....
Definition: pm_kind.F90:541
integer, parameter CK
The default complex kind in the ParaMonte library: real64 in Fortran, c_double_complex in C-Fortran I...
Definition: pm_kind.F90:542
integer, parameter IK
The default integer kind in the ParaMonte library: int32 in Fortran, c_int32_t in C-Fortran Interoper...
Definition: pm_kind.F90:540
integer, parameter SK
The default character kind in the ParaMonte library: kind("a") in Fortran, c_char in C-Fortran Intero...
Definition: pm_kind.F90:539
This module contains procedures and generic interfaces for inferring the processor operating system.
Definition: pm_os.F90:36
character(*, SK), parameter MODULE_NAME
Definition: pm_os.F90:42