qupled 1.3.3__cp310-cp310-macosx_13_0_x86_64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- qupled/.dylibs/libSQLiteCpp.0.dylib +0 -0
- qupled/.dylibs/libgsl.28.dylib +0 -0
- qupled/.dylibs/libgslcblas.0.dylib +0 -0
- qupled/.dylibs/libomp.dylib +0 -0
- qupled/.dylibs/libsqlite3.3.50.1.dylib +0 -0
- qupled/__init__.py +1 -0
- qupled/database.py +640 -0
- qupled/esa.py +27 -0
- qupled/hf.py +263 -0
- qupled/include/fmt/args.h +235 -0
- qupled/include/fmt/chrono.h +2240 -0
- qupled/include/fmt/color.h +643 -0
- qupled/include/fmt/compile.h +535 -0
- qupled/include/fmt/core.h +2969 -0
- qupled/include/fmt/format-inl.h +1678 -0
- qupled/include/fmt/format.h +4535 -0
- qupled/include/fmt/os.h +455 -0
- qupled/include/fmt/ostream.h +245 -0
- qupled/include/fmt/printf.h +675 -0
- qupled/include/fmt/ranges.h +738 -0
- qupled/include/fmt/std.h +537 -0
- qupled/include/fmt/xchar.h +259 -0
- qupled/lib/cmake/fmt/fmt-config-version.cmake +43 -0
- qupled/lib/cmake/fmt/fmt-config.cmake +31 -0
- qupled/lib/cmake/fmt/fmt-targets-release.cmake +19 -0
- qupled/lib/cmake/fmt/fmt-targets.cmake +116 -0
- qupled/lib/libfmt.a +0 -0
- qupled/lib/pkgconfig/fmt.pc +11 -0
- qupled/mpi.py +69 -0
- qupled/native.cpython-310-darwin.so +0 -0
- qupled/output.py +92 -0
- qupled/qstls.py +68 -0
- qupled/qstlsiet.py +37 -0
- qupled/qvsstls.py +59 -0
- qupled/rpa.py +27 -0
- qupled/stls.py +94 -0
- qupled/stlsiet.py +97 -0
- qupled/vsstls.py +203 -0
- qupled-1.3.3.dist-info/METADATA +81 -0
- qupled-1.3.3.dist-info/RECORD +43 -0
- qupled-1.3.3.dist-info/WHEEL +6 -0
- qupled-1.3.3.dist-info/licenses/LICENSE +674 -0
- qupled-1.3.3.dist-info/top_level.txt +1 -0
@@ -0,0 +1,259 @@
|
|
1
|
+
// Formatting library for C++ - optional wchar_t and exotic character support
|
2
|
+
//
|
3
|
+
// Copyright (c) 2012 - present, Victor Zverovich
|
4
|
+
// All rights reserved.
|
5
|
+
//
|
6
|
+
// For the license information refer to format.h.
|
7
|
+
|
8
|
+
#ifndef FMT_XCHAR_H_
|
9
|
+
#define FMT_XCHAR_H_
|
10
|
+
|
11
|
+
#include <cwchar>
|
12
|
+
|
13
|
+
#include "format.h"
|
14
|
+
|
15
|
+
#ifndef FMT_STATIC_THOUSANDS_SEPARATOR
|
16
|
+
# include <locale>
|
17
|
+
#endif
|
18
|
+
|
19
|
+
FMT_BEGIN_NAMESPACE
|
20
|
+
namespace detail {
|
21
|
+
|
22
|
+
template <typename T>
|
23
|
+
using is_exotic_char = bool_constant<!std::is_same<T, char>::value>;
|
24
|
+
|
25
|
+
inline auto write_loc(std::back_insert_iterator<detail::buffer<wchar_t>> out,
|
26
|
+
loc_value value, const format_specs<wchar_t>& specs,
|
27
|
+
locale_ref loc) -> bool {
|
28
|
+
#ifndef FMT_STATIC_THOUSANDS_SEPARATOR
|
29
|
+
auto& numpunct =
|
30
|
+
std::use_facet<std::numpunct<wchar_t>>(loc.get<std::locale>());
|
31
|
+
auto separator = std::wstring();
|
32
|
+
auto grouping = numpunct.grouping();
|
33
|
+
if (!grouping.empty()) separator = std::wstring(1, numpunct.thousands_sep());
|
34
|
+
return value.visit(loc_writer<wchar_t>{out, specs, separator, grouping, {}});
|
35
|
+
#endif
|
36
|
+
return false;
|
37
|
+
}
|
38
|
+
} // namespace detail
|
39
|
+
|
40
|
+
FMT_BEGIN_EXPORT
|
41
|
+
|
42
|
+
using wstring_view = basic_string_view<wchar_t>;
|
43
|
+
using wformat_parse_context = basic_format_parse_context<wchar_t>;
|
44
|
+
using wformat_context = buffer_context<wchar_t>;
|
45
|
+
using wformat_args = basic_format_args<wformat_context>;
|
46
|
+
using wmemory_buffer = basic_memory_buffer<wchar_t>;
|
47
|
+
|
48
|
+
#if FMT_GCC_VERSION && FMT_GCC_VERSION < 409
|
49
|
+
// Workaround broken conversion on older gcc.
|
50
|
+
template <typename... Args> using wformat_string = wstring_view;
|
51
|
+
inline auto runtime(wstring_view s) -> wstring_view { return s; }
|
52
|
+
#else
|
53
|
+
template <typename... Args>
|
54
|
+
using wformat_string = basic_format_string<wchar_t, type_identity_t<Args>...>;
|
55
|
+
inline auto runtime(wstring_view s) -> runtime_format_string<wchar_t> {
|
56
|
+
return {{s}};
|
57
|
+
}
|
58
|
+
#endif
|
59
|
+
|
60
|
+
template <> struct is_char<wchar_t> : std::true_type {};
|
61
|
+
template <> struct is_char<detail::char8_type> : std::true_type {};
|
62
|
+
template <> struct is_char<char16_t> : std::true_type {};
|
63
|
+
template <> struct is_char<char32_t> : std::true_type {};
|
64
|
+
|
65
|
+
template <typename... T>
|
66
|
+
constexpr auto make_wformat_args(const T&... args)
|
67
|
+
-> format_arg_store<wformat_context, T...> {
|
68
|
+
return {args...};
|
69
|
+
}
|
70
|
+
|
71
|
+
inline namespace literals {
|
72
|
+
#if FMT_USE_USER_DEFINED_LITERALS && !FMT_USE_NONTYPE_TEMPLATE_ARGS
|
73
|
+
constexpr auto operator""_a(const wchar_t* s, size_t)
|
74
|
+
-> detail::udl_arg<wchar_t> {
|
75
|
+
return {s};
|
76
|
+
}
|
77
|
+
#endif
|
78
|
+
} // namespace literals
|
79
|
+
|
80
|
+
template <typename It, typename Sentinel>
|
81
|
+
auto join(It begin, Sentinel end, wstring_view sep)
|
82
|
+
-> join_view<It, Sentinel, wchar_t> {
|
83
|
+
return {begin, end, sep};
|
84
|
+
}
|
85
|
+
|
86
|
+
template <typename Range>
|
87
|
+
auto join(Range&& range, wstring_view sep)
|
88
|
+
-> join_view<detail::iterator_t<Range>, detail::sentinel_t<Range>,
|
89
|
+
wchar_t> {
|
90
|
+
return join(std::begin(range), std::end(range), sep);
|
91
|
+
}
|
92
|
+
|
93
|
+
template <typename T>
|
94
|
+
auto join(std::initializer_list<T> list, wstring_view sep)
|
95
|
+
-> join_view<const T*, const T*, wchar_t> {
|
96
|
+
return join(std::begin(list), std::end(list), sep);
|
97
|
+
}
|
98
|
+
|
99
|
+
template <typename Char, FMT_ENABLE_IF(!std::is_same<Char, char>::value)>
|
100
|
+
auto vformat(basic_string_view<Char> format_str,
|
101
|
+
basic_format_args<buffer_context<type_identity_t<Char>>> args)
|
102
|
+
-> std::basic_string<Char> {
|
103
|
+
auto buf = basic_memory_buffer<Char>();
|
104
|
+
detail::vformat_to(buf, format_str, args);
|
105
|
+
return to_string(buf);
|
106
|
+
}
|
107
|
+
|
108
|
+
template <typename... T>
|
109
|
+
auto format(wformat_string<T...> fmt, T&&... args) -> std::wstring {
|
110
|
+
return vformat(fmt::wstring_view(fmt), fmt::make_wformat_args(args...));
|
111
|
+
}
|
112
|
+
|
113
|
+
// Pass char_t as a default template parameter instead of using
|
114
|
+
// std::basic_string<char_t<S>> to reduce the symbol size.
|
115
|
+
template <typename S, typename... T, typename Char = char_t<S>,
|
116
|
+
FMT_ENABLE_IF(!std::is_same<Char, char>::value &&
|
117
|
+
!std::is_same<Char, wchar_t>::value)>
|
118
|
+
auto format(const S& format_str, T&&... args) -> std::basic_string<Char> {
|
119
|
+
return vformat(detail::to_string_view(format_str),
|
120
|
+
fmt::make_format_args<buffer_context<Char>>(args...));
|
121
|
+
}
|
122
|
+
|
123
|
+
template <typename Locale, typename S, typename Char = char_t<S>,
|
124
|
+
FMT_ENABLE_IF(detail::is_locale<Locale>::value&&
|
125
|
+
detail::is_exotic_char<Char>::value)>
|
126
|
+
inline auto vformat(
|
127
|
+
const Locale& loc, const S& format_str,
|
128
|
+
basic_format_args<buffer_context<type_identity_t<Char>>> args)
|
129
|
+
-> std::basic_string<Char> {
|
130
|
+
return detail::vformat(loc, detail::to_string_view(format_str), args);
|
131
|
+
}
|
132
|
+
|
133
|
+
template <typename Locale, typename S, typename... T, typename Char = char_t<S>,
|
134
|
+
FMT_ENABLE_IF(detail::is_locale<Locale>::value&&
|
135
|
+
detail::is_exotic_char<Char>::value)>
|
136
|
+
inline auto format(const Locale& loc, const S& format_str, T&&... args)
|
137
|
+
-> std::basic_string<Char> {
|
138
|
+
return detail::vformat(loc, detail::to_string_view(format_str),
|
139
|
+
fmt::make_format_args<buffer_context<Char>>(args...));
|
140
|
+
}
|
141
|
+
|
142
|
+
template <typename OutputIt, typename S, typename Char = char_t<S>,
|
143
|
+
FMT_ENABLE_IF(detail::is_output_iterator<OutputIt, Char>::value&&
|
144
|
+
detail::is_exotic_char<Char>::value)>
|
145
|
+
auto vformat_to(OutputIt out, const S& format_str,
|
146
|
+
basic_format_args<buffer_context<type_identity_t<Char>>> args)
|
147
|
+
-> OutputIt {
|
148
|
+
auto&& buf = detail::get_buffer<Char>(out);
|
149
|
+
detail::vformat_to(buf, detail::to_string_view(format_str), args);
|
150
|
+
return detail::get_iterator(buf, out);
|
151
|
+
}
|
152
|
+
|
153
|
+
template <typename OutputIt, typename S, typename... T,
|
154
|
+
typename Char = char_t<S>,
|
155
|
+
FMT_ENABLE_IF(detail::is_output_iterator<OutputIt, Char>::value&&
|
156
|
+
detail::is_exotic_char<Char>::value)>
|
157
|
+
inline auto format_to(OutputIt out, const S& fmt, T&&... args) -> OutputIt {
|
158
|
+
return vformat_to(out, detail::to_string_view(fmt),
|
159
|
+
fmt::make_format_args<buffer_context<Char>>(args...));
|
160
|
+
}
|
161
|
+
|
162
|
+
template <typename Locale, typename S, typename OutputIt, typename... Args,
|
163
|
+
typename Char = char_t<S>,
|
164
|
+
FMT_ENABLE_IF(detail::is_output_iterator<OutputIt, Char>::value&&
|
165
|
+
detail::is_locale<Locale>::value&&
|
166
|
+
detail::is_exotic_char<Char>::value)>
|
167
|
+
inline auto vformat_to(
|
168
|
+
OutputIt out, const Locale& loc, const S& format_str,
|
169
|
+
basic_format_args<buffer_context<type_identity_t<Char>>> args) -> OutputIt {
|
170
|
+
auto&& buf = detail::get_buffer<Char>(out);
|
171
|
+
vformat_to(buf, detail::to_string_view(format_str), args,
|
172
|
+
detail::locale_ref(loc));
|
173
|
+
return detail::get_iterator(buf, out);
|
174
|
+
}
|
175
|
+
|
176
|
+
template <typename OutputIt, typename Locale, typename S, typename... T,
|
177
|
+
typename Char = char_t<S>,
|
178
|
+
bool enable = detail::is_output_iterator<OutputIt, Char>::value &&
|
179
|
+
detail::is_locale<Locale>::value &&
|
180
|
+
detail::is_exotic_char<Char>::value>
|
181
|
+
inline auto format_to(OutputIt out, const Locale& loc, const S& format_str,
|
182
|
+
T&&... args) ->
|
183
|
+
typename std::enable_if<enable, OutputIt>::type {
|
184
|
+
return vformat_to(out, loc, detail::to_string_view(format_str),
|
185
|
+
fmt::make_format_args<buffer_context<Char>>(args...));
|
186
|
+
}
|
187
|
+
|
188
|
+
template <typename OutputIt, typename Char, typename... Args,
|
189
|
+
FMT_ENABLE_IF(detail::is_output_iterator<OutputIt, Char>::value&&
|
190
|
+
detail::is_exotic_char<Char>::value)>
|
191
|
+
inline auto vformat_to_n(
|
192
|
+
OutputIt out, size_t n, basic_string_view<Char> format_str,
|
193
|
+
basic_format_args<buffer_context<type_identity_t<Char>>> args)
|
194
|
+
-> format_to_n_result<OutputIt> {
|
195
|
+
using traits = detail::fixed_buffer_traits;
|
196
|
+
auto buf = detail::iterator_buffer<OutputIt, Char, traits>(out, n);
|
197
|
+
detail::vformat_to(buf, format_str, args);
|
198
|
+
return {buf.out(), buf.count()};
|
199
|
+
}
|
200
|
+
|
201
|
+
template <typename OutputIt, typename S, typename... T,
|
202
|
+
typename Char = char_t<S>,
|
203
|
+
FMT_ENABLE_IF(detail::is_output_iterator<OutputIt, Char>::value&&
|
204
|
+
detail::is_exotic_char<Char>::value)>
|
205
|
+
inline auto format_to_n(OutputIt out, size_t n, const S& fmt, T&&... args)
|
206
|
+
-> format_to_n_result<OutputIt> {
|
207
|
+
return vformat_to_n(out, n, detail::to_string_view(fmt),
|
208
|
+
fmt::make_format_args<buffer_context<Char>>(args...));
|
209
|
+
}
|
210
|
+
|
211
|
+
template <typename S, typename... T, typename Char = char_t<S>,
|
212
|
+
FMT_ENABLE_IF(detail::is_exotic_char<Char>::value)>
|
213
|
+
inline auto formatted_size(const S& fmt, T&&... args) -> size_t {
|
214
|
+
auto buf = detail::counting_buffer<Char>();
|
215
|
+
detail::vformat_to(buf, detail::to_string_view(fmt),
|
216
|
+
fmt::make_format_args<buffer_context<Char>>(args...));
|
217
|
+
return buf.count();
|
218
|
+
}
|
219
|
+
|
220
|
+
inline void vprint(std::FILE* f, wstring_view fmt, wformat_args args) {
|
221
|
+
auto buf = wmemory_buffer();
|
222
|
+
detail::vformat_to(buf, fmt, args);
|
223
|
+
buf.push_back(L'\0');
|
224
|
+
if (std::fputws(buf.data(), f) == -1)
|
225
|
+
FMT_THROW(system_error(errno, FMT_STRING("cannot write to file")));
|
226
|
+
}
|
227
|
+
|
228
|
+
inline void vprint(wstring_view fmt, wformat_args args) {
|
229
|
+
vprint(stdout, fmt, args);
|
230
|
+
}
|
231
|
+
|
232
|
+
template <typename... T>
|
233
|
+
void print(std::FILE* f, wformat_string<T...> fmt, T&&... args) {
|
234
|
+
return vprint(f, wstring_view(fmt), fmt::make_wformat_args(args...));
|
235
|
+
}
|
236
|
+
|
237
|
+
template <typename... T> void print(wformat_string<T...> fmt, T&&... args) {
|
238
|
+
return vprint(wstring_view(fmt), fmt::make_wformat_args(args...));
|
239
|
+
}
|
240
|
+
|
241
|
+
template <typename... T>
|
242
|
+
void println(std::FILE* f, wformat_string<T...> fmt, T&&... args) {
|
243
|
+
return print(f, L"{}\n", fmt::format(fmt, std::forward<T>(args)...));
|
244
|
+
}
|
245
|
+
|
246
|
+
template <typename... T> void println(wformat_string<T...> fmt, T&&... args) {
|
247
|
+
return print(L"{}\n", fmt::format(fmt, std::forward<T>(args)...));
|
248
|
+
}
|
249
|
+
|
250
|
+
/**
|
251
|
+
Converts *value* to ``std::wstring`` using the default format for type *T*.
|
252
|
+
*/
|
253
|
+
template <typename T> inline auto to_wstring(const T& value) -> std::wstring {
|
254
|
+
return format(FMT_STRING(L"{}"), value);
|
255
|
+
}
|
256
|
+
FMT_END_EXPORT
|
257
|
+
FMT_END_NAMESPACE
|
258
|
+
|
259
|
+
#endif // FMT_XCHAR_H_
|
@@ -0,0 +1,43 @@
|
|
1
|
+
# This is a basic version file for the Config-mode of find_package().
|
2
|
+
# It is used by write_basic_package_version_file() as input file for configure_file()
|
3
|
+
# to create a version-file which can be installed along a config.cmake file.
|
4
|
+
#
|
5
|
+
# The created file sets PACKAGE_VERSION_EXACT if the current version string and
|
6
|
+
# the requested version string are exactly the same and it sets
|
7
|
+
# PACKAGE_VERSION_COMPATIBLE if the current version is >= requested version.
|
8
|
+
# The variable CVF_VERSION must be set before calling configure_file().
|
9
|
+
|
10
|
+
set(PACKAGE_VERSION "10.2.1")
|
11
|
+
|
12
|
+
if (PACKAGE_FIND_VERSION_RANGE)
|
13
|
+
# Package version must be in the requested version range
|
14
|
+
if ((PACKAGE_FIND_VERSION_RANGE_MIN STREQUAL "INCLUDE" AND PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION_MIN)
|
15
|
+
OR ((PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "INCLUDE" AND PACKAGE_VERSION VERSION_GREATER PACKAGE_FIND_VERSION_MAX)
|
16
|
+
OR (PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "EXCLUDE" AND PACKAGE_VERSION VERSION_GREATER_EQUAL PACKAGE_FIND_VERSION_MAX)))
|
17
|
+
set(PACKAGE_VERSION_COMPATIBLE FALSE)
|
18
|
+
else()
|
19
|
+
set(PACKAGE_VERSION_COMPATIBLE TRUE)
|
20
|
+
endif()
|
21
|
+
else()
|
22
|
+
if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)
|
23
|
+
set(PACKAGE_VERSION_COMPATIBLE FALSE)
|
24
|
+
else()
|
25
|
+
set(PACKAGE_VERSION_COMPATIBLE TRUE)
|
26
|
+
if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION)
|
27
|
+
set(PACKAGE_VERSION_EXACT TRUE)
|
28
|
+
endif()
|
29
|
+
endif()
|
30
|
+
endif()
|
31
|
+
|
32
|
+
|
33
|
+
# if the installed or the using project don't have CMAKE_SIZEOF_VOID_P set, ignore it:
|
34
|
+
if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "" OR "8" STREQUAL "")
|
35
|
+
return()
|
36
|
+
endif()
|
37
|
+
|
38
|
+
# check that the installed version has the same 32/64bit-ness as the one which is currently searching:
|
39
|
+
if(NOT CMAKE_SIZEOF_VOID_P STREQUAL "8")
|
40
|
+
math(EXPR installedBits "8 * 8")
|
41
|
+
set(PACKAGE_VERSION "${PACKAGE_VERSION} (${installedBits}bit)")
|
42
|
+
set(PACKAGE_VERSION_UNSUITABLE TRUE)
|
43
|
+
endif()
|
@@ -0,0 +1,31 @@
|
|
1
|
+
|
2
|
+
####### Expanded from @PACKAGE_INIT@ by configure_package_config_file() #######
|
3
|
+
####### Any changes to this file will be overwritten by the next CMake run ####
|
4
|
+
####### The input file was fmt-config.cmake.in ########
|
5
|
+
|
6
|
+
get_filename_component(PACKAGE_PREFIX_DIR "${CMAKE_CURRENT_LIST_DIR}/../../../" ABSOLUTE)
|
7
|
+
|
8
|
+
macro(set_and_check _var _file)
|
9
|
+
set(${_var} "${_file}")
|
10
|
+
if(NOT EXISTS "${_file}")
|
11
|
+
message(FATAL_ERROR "File or directory ${_file} referenced by variable ${_var} does not exist !")
|
12
|
+
endif()
|
13
|
+
endmacro()
|
14
|
+
|
15
|
+
macro(check_required_components _NAME)
|
16
|
+
foreach(comp ${${_NAME}_FIND_COMPONENTS})
|
17
|
+
if(NOT ${_NAME}_${comp}_FOUND)
|
18
|
+
if(${_NAME}_FIND_REQUIRED_${comp})
|
19
|
+
set(${_NAME}_FOUND FALSE)
|
20
|
+
endif()
|
21
|
+
endif()
|
22
|
+
endforeach()
|
23
|
+
endmacro()
|
24
|
+
|
25
|
+
####################################################################################
|
26
|
+
|
27
|
+
if (NOT TARGET fmt::fmt)
|
28
|
+
include(${CMAKE_CURRENT_LIST_DIR}/fmt-targets.cmake)
|
29
|
+
endif ()
|
30
|
+
|
31
|
+
check_required_components(fmt)
|
@@ -0,0 +1,19 @@
|
|
1
|
+
#----------------------------------------------------------------
|
2
|
+
# Generated CMake target import file for configuration "Release".
|
3
|
+
#----------------------------------------------------------------
|
4
|
+
|
5
|
+
# Commands may need to know the format version.
|
6
|
+
set(CMAKE_IMPORT_FILE_VERSION 1)
|
7
|
+
|
8
|
+
# Import target "fmt::fmt" for configuration "Release"
|
9
|
+
set_property(TARGET fmt::fmt APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
|
10
|
+
set_target_properties(fmt::fmt PROPERTIES
|
11
|
+
IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "CXX"
|
12
|
+
IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/libfmt.a"
|
13
|
+
)
|
14
|
+
|
15
|
+
list(APPEND _cmake_import_check_targets fmt::fmt )
|
16
|
+
list(APPEND _cmake_import_check_files_for_fmt::fmt "${_IMPORT_PREFIX}/lib/libfmt.a" )
|
17
|
+
|
18
|
+
# Commands beyond this point should not need to know the version.
|
19
|
+
set(CMAKE_IMPORT_FILE_VERSION)
|
@@ -0,0 +1,116 @@
|
|
1
|
+
# Generated by CMake
|
2
|
+
|
3
|
+
if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.8)
|
4
|
+
message(FATAL_ERROR "CMake >= 3.0.0 required")
|
5
|
+
endif()
|
6
|
+
if(CMAKE_VERSION VERSION_LESS "3.0.0")
|
7
|
+
message(FATAL_ERROR "CMake >= 3.0.0 required")
|
8
|
+
endif()
|
9
|
+
cmake_policy(PUSH)
|
10
|
+
cmake_policy(VERSION 3.0.0...3.30)
|
11
|
+
#----------------------------------------------------------------
|
12
|
+
# Generated CMake target import file.
|
13
|
+
#----------------------------------------------------------------
|
14
|
+
|
15
|
+
# Commands may need to know the format version.
|
16
|
+
set(CMAKE_IMPORT_FILE_VERSION 1)
|
17
|
+
|
18
|
+
# Protect against multiple inclusion, which would fail when already imported targets are added once more.
|
19
|
+
set(_cmake_targets_defined "")
|
20
|
+
set(_cmake_targets_not_defined "")
|
21
|
+
set(_cmake_expected_targets "")
|
22
|
+
foreach(_cmake_expected_target IN ITEMS fmt::fmt fmt::fmt-header-only)
|
23
|
+
list(APPEND _cmake_expected_targets "${_cmake_expected_target}")
|
24
|
+
if(TARGET "${_cmake_expected_target}")
|
25
|
+
list(APPEND _cmake_targets_defined "${_cmake_expected_target}")
|
26
|
+
else()
|
27
|
+
list(APPEND _cmake_targets_not_defined "${_cmake_expected_target}")
|
28
|
+
endif()
|
29
|
+
endforeach()
|
30
|
+
unset(_cmake_expected_target)
|
31
|
+
if(_cmake_targets_defined STREQUAL _cmake_expected_targets)
|
32
|
+
unset(_cmake_targets_defined)
|
33
|
+
unset(_cmake_targets_not_defined)
|
34
|
+
unset(_cmake_expected_targets)
|
35
|
+
unset(CMAKE_IMPORT_FILE_VERSION)
|
36
|
+
cmake_policy(POP)
|
37
|
+
return()
|
38
|
+
endif()
|
39
|
+
if(NOT _cmake_targets_defined STREQUAL "")
|
40
|
+
string(REPLACE ";" ", " _cmake_targets_defined_text "${_cmake_targets_defined}")
|
41
|
+
string(REPLACE ";" ", " _cmake_targets_not_defined_text "${_cmake_targets_not_defined}")
|
42
|
+
message(FATAL_ERROR "Some (but not all) targets in this export set were already defined.\nTargets Defined: ${_cmake_targets_defined_text}\nTargets not yet defined: ${_cmake_targets_not_defined_text}\n")
|
43
|
+
endif()
|
44
|
+
unset(_cmake_targets_defined)
|
45
|
+
unset(_cmake_targets_not_defined)
|
46
|
+
unset(_cmake_expected_targets)
|
47
|
+
|
48
|
+
|
49
|
+
# Compute the installation prefix relative to this file.
|
50
|
+
get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH)
|
51
|
+
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
|
52
|
+
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
|
53
|
+
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
|
54
|
+
if(_IMPORT_PREFIX STREQUAL "/")
|
55
|
+
set(_IMPORT_PREFIX "")
|
56
|
+
endif()
|
57
|
+
|
58
|
+
# Create imported target fmt::fmt
|
59
|
+
add_library(fmt::fmt STATIC IMPORTED)
|
60
|
+
|
61
|
+
set_target_properties(fmt::fmt PROPERTIES
|
62
|
+
INTERFACE_COMPILE_FEATURES "cxx_std_11"
|
63
|
+
INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include"
|
64
|
+
)
|
65
|
+
|
66
|
+
# Create imported target fmt::fmt-header-only
|
67
|
+
add_library(fmt::fmt-header-only INTERFACE IMPORTED)
|
68
|
+
|
69
|
+
set_target_properties(fmt::fmt-header-only PROPERTIES
|
70
|
+
INTERFACE_COMPILE_DEFINITIONS "FMT_HEADER_ONLY=1"
|
71
|
+
INTERFACE_COMPILE_FEATURES "cxx_std_11"
|
72
|
+
INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include"
|
73
|
+
)
|
74
|
+
|
75
|
+
# Load information for each installed configuration.
|
76
|
+
file(GLOB _cmake_config_files "${CMAKE_CURRENT_LIST_DIR}/fmt-targets-*.cmake")
|
77
|
+
foreach(_cmake_config_file IN LISTS _cmake_config_files)
|
78
|
+
include("${_cmake_config_file}")
|
79
|
+
endforeach()
|
80
|
+
unset(_cmake_config_file)
|
81
|
+
unset(_cmake_config_files)
|
82
|
+
|
83
|
+
# Cleanup temporary variables.
|
84
|
+
set(_IMPORT_PREFIX)
|
85
|
+
|
86
|
+
# Loop over all imported files and verify that they actually exist
|
87
|
+
foreach(_cmake_target IN LISTS _cmake_import_check_targets)
|
88
|
+
if(CMAKE_VERSION VERSION_LESS "3.28"
|
89
|
+
OR NOT DEFINED _cmake_import_check_xcframework_for_${_cmake_target}
|
90
|
+
OR NOT IS_DIRECTORY "${_cmake_import_check_xcframework_for_${_cmake_target}}")
|
91
|
+
foreach(_cmake_file IN LISTS "_cmake_import_check_files_for_${_cmake_target}")
|
92
|
+
if(NOT EXISTS "${_cmake_file}")
|
93
|
+
message(FATAL_ERROR "The imported target \"${_cmake_target}\" references the file
|
94
|
+
\"${_cmake_file}\"
|
95
|
+
but this file does not exist. Possible reasons include:
|
96
|
+
* The file was deleted, renamed, or moved to another location.
|
97
|
+
* An install or uninstall procedure did not complete successfully.
|
98
|
+
* The installation package was faulty and contained
|
99
|
+
\"${CMAKE_CURRENT_LIST_FILE}\"
|
100
|
+
but not all the files it references.
|
101
|
+
")
|
102
|
+
endif()
|
103
|
+
endforeach()
|
104
|
+
endif()
|
105
|
+
unset(_cmake_file)
|
106
|
+
unset("_cmake_import_check_files_for_${_cmake_target}")
|
107
|
+
endforeach()
|
108
|
+
unset(_cmake_target)
|
109
|
+
unset(_cmake_import_check_targets)
|
110
|
+
|
111
|
+
# This file does not depend on other imported targets which have
|
112
|
+
# been exported from the same project but in a separate export set.
|
113
|
+
|
114
|
+
# Commands beyond this point should not need to know the version.
|
115
|
+
set(CMAKE_IMPORT_FILE_VERSION)
|
116
|
+
cmake_policy(POP)
|
qupled/lib/libfmt.a
ADDED
Binary file
|
@@ -0,0 +1,11 @@
|
|
1
|
+
prefix=/Users/runner/work/qupled/qupled/build/lib.macosx-10.9-x86_64-cpython-310/qupled
|
2
|
+
exec_prefix=/Users/runner/work/qupled/qupled/build/lib.macosx-10.9-x86_64-cpython-310/qupled
|
3
|
+
libdir=${exec_prefix}/lib
|
4
|
+
includedir=${prefix}/include
|
5
|
+
|
6
|
+
Name: fmt
|
7
|
+
Description: A modern formatting library
|
8
|
+
Version: 10.2.1
|
9
|
+
Libs: -L${libdir} -lfmt
|
10
|
+
Cflags: -I${includedir}
|
11
|
+
|
qupled/mpi.py
ADDED
@@ -0,0 +1,69 @@
|
|
1
|
+
import functools
|
2
|
+
|
3
|
+
from qupled import native
|
4
|
+
|
5
|
+
|
6
|
+
class MPI:
|
7
|
+
"""Class to handle the calls to the MPI API"""
|
8
|
+
|
9
|
+
def rank(self):
|
10
|
+
"""Get rank of the process"""
|
11
|
+
return native.MPI.rank()
|
12
|
+
|
13
|
+
def is_root(self):
|
14
|
+
"""Check if the current process is root (rank 0)"""
|
15
|
+
return native.MPI.is_root()
|
16
|
+
|
17
|
+
def barrier(self):
|
18
|
+
"""Setup an MPI barrier"""
|
19
|
+
native.MPI.barrier()
|
20
|
+
|
21
|
+
def timer(self):
|
22
|
+
"""Get wall time"""
|
23
|
+
return native.MPI.timer()
|
24
|
+
|
25
|
+
@staticmethod
|
26
|
+
def run_only_on_root(func):
|
27
|
+
"""Python decorator for all methods that have to be run only by root"""
|
28
|
+
|
29
|
+
@functools.wraps(func)
|
30
|
+
def wrapper(*args, **kwargs):
|
31
|
+
if native.MPI.is_root():
|
32
|
+
return func(*args, **kwargs)
|
33
|
+
|
34
|
+
return wrapper
|
35
|
+
|
36
|
+
@staticmethod
|
37
|
+
def synchronize_ranks(func):
|
38
|
+
"""Python decorator for all methods that need rank synchronization"""
|
39
|
+
|
40
|
+
@functools.wraps(func)
|
41
|
+
def wrapper(*args, **kwargs):
|
42
|
+
func(*args, **kwargs)
|
43
|
+
native.MPI.barrier()
|
44
|
+
|
45
|
+
return wrapper
|
46
|
+
|
47
|
+
@staticmethod
|
48
|
+
def record_time(func):
|
49
|
+
"""Python decorator for all methods that have to be timed"""
|
50
|
+
|
51
|
+
@functools.wraps(func)
|
52
|
+
def wrapper(*args, **kwargs):
|
53
|
+
mpi = native.MPI
|
54
|
+
tic = mpi.timer()
|
55
|
+
func(*args, **kwargs)
|
56
|
+
toc = mpi.timer()
|
57
|
+
dt = toc - tic
|
58
|
+
hours = dt // 3600
|
59
|
+
minutes = (dt % 3600) // 60
|
60
|
+
seconds = dt % 60
|
61
|
+
if mpi.is_root():
|
62
|
+
if hours > 0:
|
63
|
+
print("Elapsed time: %d h, %d m, %d s." % (hours, minutes, seconds))
|
64
|
+
elif minutes > 0:
|
65
|
+
print("Elapsed time: %d m, %d s." % (minutes, seconds))
|
66
|
+
else:
|
67
|
+
print("Elapsed time: %.1f s." % seconds)
|
68
|
+
|
69
|
+
return wrapper
|
Binary file
|
qupled/output.py
ADDED
@@ -0,0 +1,92 @@
|
|
1
|
+
from . import database
|
2
|
+
|
3
|
+
|
4
|
+
class DataBase:
|
5
|
+
"""Class to read and delete data from a database generated by qupled"""
|
6
|
+
|
7
|
+
# Read runs in the database
|
8
|
+
@staticmethod
|
9
|
+
def inspect_runs(database_name: str | None = None) -> dict:
|
10
|
+
"""Reads runs from the database and returns the content in the form of a dictionary.
|
11
|
+
|
12
|
+
Args:
|
13
|
+
database_name: Name of the database to read from. Defaults to None.
|
14
|
+
|
15
|
+
Returns:
|
16
|
+
A dictionary whose keys are the run ids and values are the corresponding runs information.
|
17
|
+
"""
|
18
|
+
db_handler = database.DataBaseHandler(database_name)
|
19
|
+
return db_handler.inspect_runs()
|
20
|
+
|
21
|
+
# Read runs in the database
|
22
|
+
@staticmethod
|
23
|
+
def read_run(
|
24
|
+
run_id: int,
|
25
|
+
database_name: str | None = None,
|
26
|
+
input_names: list[str] | None = None,
|
27
|
+
result_names: list[str] | None = None,
|
28
|
+
) -> dict:
|
29
|
+
"""
|
30
|
+
Reads a run from the database.
|
31
|
+
|
32
|
+
Args:
|
33
|
+
run_id: The ID of the run to read.
|
34
|
+
database_name: The name of the database. Defaults to None.
|
35
|
+
input_names: A list of input names to retrieve. Defaults to None.
|
36
|
+
result_names: A list of result names to retrieve. Defaults to None.
|
37
|
+
|
38
|
+
Returns:
|
39
|
+
dict: A dictionary containing the run data.
|
40
|
+
"""
|
41
|
+
db_handler = database.DataBaseHandler(database_name)
|
42
|
+
return db_handler.get_run(run_id, input_names, result_names)
|
43
|
+
|
44
|
+
# Read inputs in the database
|
45
|
+
@staticmethod
|
46
|
+
def read_inputs(
|
47
|
+
run_id: int, database_name: str | None = None, names: list[str] | None = None
|
48
|
+
) -> dict:
|
49
|
+
"""Reads inputs from the database and returns the content in the form of a dictionary.
|
50
|
+
|
51
|
+
Args:
|
52
|
+
run_id: Identifier of the run to read input for.
|
53
|
+
database_name: Name of the database to read from (default is None).
|
54
|
+
names: A list of quantities to read (default is None, which reads all available quantities).
|
55
|
+
|
56
|
+
Returns:
|
57
|
+
A dictionary whose keys are the quantities listed in names and values are the corresponding inputs.
|
58
|
+
"""
|
59
|
+
db_handler = database.DataBaseHandler(database_name)
|
60
|
+
return db_handler.get_inputs(run_id, names if names is not None else [])
|
61
|
+
|
62
|
+
# Read results in the database
|
63
|
+
@staticmethod
|
64
|
+
def read_results(
|
65
|
+
run_id: int, database_name: str | None = None, names: list[str] | None = None
|
66
|
+
) -> dict:
|
67
|
+
"""Reads results from the database and returns the content in the form of a dictionary.
|
68
|
+
|
69
|
+
Args:
|
70
|
+
run_id: Identifier of the run to read results for.
|
71
|
+
database_name: Name of the database to read from (default is None).
|
72
|
+
names: A list of quantities to read (default is None, which reads all available quantities).
|
73
|
+
|
74
|
+
Returns:
|
75
|
+
A dictionary whose keys are the quantities listed in names and values are the corresponding results.
|
76
|
+
"""
|
77
|
+
db_handler = database.DataBaseHandler(database_name)
|
78
|
+
return db_handler.get_results(run_id, names)
|
79
|
+
|
80
|
+
# Delete results from the database
|
81
|
+
@staticmethod
|
82
|
+
def delete_run(run_id: int, database_name: str | None = None):
|
83
|
+
"""
|
84
|
+
Deletes a run entry from the database based on the provided run ID.
|
85
|
+
|
86
|
+
Args:
|
87
|
+
run_id: The unique identifier of the run to be deleted.
|
88
|
+
database_name: The name of the database to connect to.
|
89
|
+
If None, the default database will be used.
|
90
|
+
"""
|
91
|
+
db_handler = database.DataBaseHandler(database_name)
|
92
|
+
return db_handler.delete_run(run_id)
|