-
Notifications
You must be signed in to change notification settings - Fork 0
539 lines (496 loc) · 21 KB
/
ecosystem.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
name: Eco
on:
push:
branches:
- master
pull_request:
merge_group:
permissions:
contents: read # to fetch code (actions/checkout)
jobs:
ecosystem:
strategy:
fail-fast: true
matrix:
cfg:
- runs-on: ubuntu-latest
python-version: "3.10"
mkl-version: ""
base-channel: "conda-forge"
pytest-marker-expr: "addon and not long"
cmargs: >
-D CMAKE_VERBOSE_MAKEFILE=OFF
-D BUILD_SHARED_LIBS=ON
- runs-on: macos-latest
python-version: "3.9"
mkl-version: ""
base-channel: "conda-forge"
pytest-marker-expr: "addon and not long"
target-sdk: "10.10"
cmargs: >
-D CMAKE_VERBOSE_MAKEFILE=OFF
-D BUILD_SHARED_LIBS=ON
-D OpenMP_C_FLAG="-fopenmp=libiomp5"
-D OpenMP_CXX_FLAG="-fopenmp=libiomp5"
# Notes:
# * libiomp5 is picking up naturally but left explicit as guide
- runs-on: windows-latest
python-version: "3.9"
mkl-version: "=2022.1"
base-channel: "conda-forge"
pytest-marker-expr: "addon and not long and not d2ints"
cmargs: >
-D CMAKE_VERBOSE_MAKEFILE=OFF
-D BUILD_SHARED_LIBS=OFF
-D CMAKE_CXX_FLAGS="/arch:AVX /wd4018 /wd4101 /wd4996"
-D OpenMP_LIBRARY_DIRS="D:\a\psi4\psi4\iomp5md\conda\win\2019.1"
-D psi4_SKIP_ENABLE_Fortran=ON
# Notes:
# * See mkl-version notes at end
# * "not d2ints" allows Windows accessing c-f L2 to pass
name: "Eco • 🐍 ${{ matrix.cfg.python-version }} • ${{ matrix.cfg.runs-on }}"
runs-on: ${{ matrix.cfg.runs-on }}
defaults:
run:
shell: bash -l {0}
steps:
# fetch-depth: 0 gets git history so Psi4 version is computable
- name: Checkout Psi4
uses: actions/checkout@v2
with:
fetch-depth: 0
# see CMAKE_OSX_SYSROOT and CMAKE_Fortran_FLAGS for use
# mac_ver line returns, e.g., "10.15" for Catalina & "11.6" for Big Sur. but phracker doesn't support all minor, so some logic to hardcode.
- name: Prepare compiler environment, SDK (M)
if: runner.os == 'macOS'
run: |
macos_Mm=$(SYSTEM_VERSION_COMPAT=0 python -c "import platform; Mmp = platform.mac_ver()[0]; Mm = '.'.join(Mmp.split('.')[:2]); print(Mm)")
macos_M=$(SYSTEM_VERSION_COMPAT=0 python -c "import platform; Mmp = platform.mac_ver()[0]; M = '.'.join(Mmp.split('.')[:1]); print(M)")
echo $macos_Mm $macos_M
if [[ "${macos_M}" == "11" ]]; then
macos_Mm=11.3
elif [[ "${macos_M}" == "12" ]]; then
# until phracker merges and releases 12 via https://github.com/phracker/MacOSX-SDKs/pull/44
macos_Mm=11.3
fi
echo $macos_Mm
curl -L https://github.com/phracker/MacOSX-SDKs/releases/download/${macos_Mm}/MacOSX${{ matrix.cfg.target-sdk }}.sdk.tar.xz | sudo tar xf - -C /opt/
# equivalent to `call vcvarsall.bat x64`. see Azure script to follow cmdline.
- name: Prepare compiler environment, vcvarsall (W)
if: runner.os == 'Windows'
uses: ilammy/msvc-dev-cmd@v1
with:
arch: x64
# see OpenMP_LIBRARY_DIRS for use
- name: Prepare OpenMP build environment, libiomp5md.lib (W)
if: runner.os == 'Windows'
run: git clone https://github.com/psi4/iomp5md.git
- name: Write Conda environment files
run: |
#
# Buildtime (L, M, W)
#
cat > build.yaml <<EOF
name: baseenv
channels:
- ${{ matrix.cfg.base-channel }}
- nodefaults
dependencies:
- libblas=*=*mkl
- python=${{ matrix.cfg.python-version }}
# build
- boost-cpp
- cmake
- c-compiler
- cxx-compiler
- eigen
- fortran-compiler
- llvm-openmp
- mkl-devel${{ matrix.cfg.mkl-version }}
- ninja
- numpy
- pybind11
- pydantic<2.0
# qc req'd
- gau2grid
- conda-forge/label/libint_dev::libint=2.7.3dev1
- optking
- qcelemental
- qcengine
- libxc-c
# qc opt'l
# - psi4/label/dev::ambit
# - psi4/label/dev::chemps2
# - psi4/label/dev::libecpint
- dkh
- pygdma
# - psi4/label/dev::pcmsolver
# - psi4/label/dev::simint
# runtime
# pip
# * note that this is the reliable way to patch in dev versions of py deps,
# as internal builds need path adjustments, force removals of conda version,
# and can still be insufficient for qcfractal.
#- pip
#- pip:
# - git+https://github.com/loriab/[email protected]
EOF
if [[ "${{ runner.os }}" == "Linux" ]]; then
:
# sed -i "s;;;g" build.yaml
fi
if [[ "${{ runner.os }}" == "macOS" ]]; then
:
# sed -E -i.bak "s;;;g" build.yaml
fi
if [[ "${{ runner.os }}" == "Windows" ]]; then
sed -i "s;- fortran-compiler;;g" build.yaml
sed -i "s;- llvm-openmp;- intel-openmp;g" build.yaml
fi
#
# Runtime for single-channel (L, M, W)
#
cat > run.yaml <<EOF
name: baseenv
channels:
- ${{ matrix.cfg.base-channel }}
- nodefaults
dependencies:
# non-qc req'd
- libblas=*=*mkl
- mkl${{ matrix.cfg.mkl-version }}
- msgpack-python
- networkx
- numpy
- python=${{ matrix.cfg.python-version }}
- scipy
- toml
- pydantic<2.0
# non-qc opt'l
- memory_profiler
# qc req'd
- gau2grid
- conda-forge/label/libint_dev::libint=2.7.3dev1
- optking
- qcelemental
- qcengine
- libxc-c
# qc req'd from buildtime
#- psi4/label/dev::ambit
#- psi4/label/dev::chemps2
- dkh
#- psi4/label/dev::libecpint
- pygdma
#- psi4/label/dev::pcmsolver
#- psi4/label/dev::simint
# qc opt'l
- adcc
- basis_set_exchange
- cppe
- dftd3-python
- dftd4-python
- pylibefp
#- psi4/label/dev::fockci
- gcp-correction
- geometric
#- psi4/label/dev::mp2d
- openfermion>=1.0
- openfermionpsi4
- pyddx
- pymdi
- qcfractal
- qcportal
#- psi4/label/dev::resp
#- psi4/label/dev::snsmp2
- tomli
# test
- pytest
- pytest-xdist
# pip
- pip
- pip:
- git+https://github.com/i-pi/i-pi.git@master-py3
#- git+https://github.com/loriab/[email protected]
# toml needed for psi4 to load parameters from dftd4-python
# one of mkl=${{ matrix.cfg.mkl-version }} or mkl-devel=${{ matrix.cfg.mkl-version }} needed to avoid DLL runtime error
EOF
if [[ "${{ runner.os }}" == "Linux" ]]; then
sed -i "s;- qcfractal;- qcarchive/label/next::qcfractal;g" run.yaml # >=0.50b10
sed -i "s;- qcportal;- postgresql;g" run.yaml
fi
if [[ "${{ runner.os }}" == "macOS" ]]; then
sed -E -i.bak "s;- qcfractal;- qcfractal=0.15.8.1;g" run.yaml
sed -E -i.bak "s;- qcportal;- qcportal=0.15.8;g" run.yaml
fi
if [[ "${{ runner.os }}" == "Windows" ]]; then
# nyi
sed -i "s;- adcc;;g" run.yaml
sed -i "s;- pyddx;;g" run.yaml
sed -i "s;- cppe;;g" run.yaml
sed -i "s;- qcfractal;;g" run.yaml
sed -i "s;- qcportal;;g" run.yaml
sed -i "s;- openfermion>=1.0;;g" run.yaml
sed -i "s;- openfermionpsi4;;g" run.yaml
sed -i "s;- memory_profiler;;g" run.yaml
fi
printf "\n<<< build.yaml >>>\n"
cat build.yaml
printf "\n<<< run.yaml >>>\n"
cat run.yaml
- name: Setup Conda
uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: baseenv
environment-file: build.yaml
show-channel-urls: true
python-version: ${{ matrix.cfg.python-version }}
auto-activate-base: false
miniforge-variant: Mambaforge
use-mamba: true
add-pip-as-python-dependency: true
channels: conda-forge
- name: Buildtime Conda environment
run: |
mamba info
mamba list
#- name: Switch to Mamba solver (L, M)
# if: matrix.cfg.base-channel != 'conda-forge'
# run: |
# conda install -n base conda-libmamba-solver
# conda config --set solver libmamba
- name: Configure Psi4, Conda defaults GNU (L)
if: runner.os == 'Linux'
run: |
cmake \
-S. \
-B objdir \
-G Ninja \
-D CMAKE_BUILD_TYPE=Release \
-D CMAKE_INSTALL_PREFIX=./install \
-D CMAKE_C_COMPILER=${CC} \
-D CMAKE_CXX_COMPILER=${CXX} \
-D CMAKE_Fortran_COMPILER=${FC} \
-D CMAKE_PREFIX_PATH="${CONDA_PREFIX}" \
-D CMAKE_INSIST_FIND_PACKAGE_pybind11=ON \
-D CMAKE_INSIST_FIND_PACKAGE_gau2grid=ON \
-D CMAKE_INSIST_FIND_PACKAGE_Libint2=ON \
-D CMAKE_INSIST_FIND_PACKAGE_optking=ON \
-D CMAKE_INSIST_FIND_PACKAGE_qcelemental=ON \
-D CMAKE_INSIST_FIND_PACKAGE_qcengine=ON \
-D CMAKE_INSIST_FIND_PACKAGE_Libxc=ON \
-D ENABLE_ambit=OFF \
-D CMAKE_INSIST_FIND_PACKAGE_ambit=ON \
-D ENABLE_CheMPS2=OFF \
-D CMAKE_INSIST_FIND_PACKAGE_CheMPS2=ON \
-D ENABLE_dkh=ON \
-D CMAKE_INSIST_FIND_PACKAGE_dkh=ON \
-D ENABLE_ecpint=OFF \
-D CMAKE_INSIST_FIND_PACKAGE_ecpint=ON \
-D ENABLE_gdma=ON \
-D CMAKE_INSIST_FIND_PACKAGE_gdma=ON \
-D ENABLE_PCMSolver=OFF \
-D CMAKE_INSIST_FIND_PACKAGE_PCMSolver=OFF \
-D ENABLE_simint=OFF \
-D SIMINT_VECTOR=sse \
-D CMAKE_INSIST_FIND_PACKAGE_simint=ON \
-D ENABLE_v2rdm_casscf=ON \
-D CMAKE_DISABLE_FIND_PACKAGE_v2rdm_casscf=ON \
-D ENABLE_OPENMP=ON \
-D ENABLE_XHOST=OFF \
${{ matrix.cfg.cmargs }}
- name: Configure Psi4, Conda defaults Clang (M)
if: runner.os == 'macOS'
run: |
cmake \
-S. \
-B objdir \
-G Ninja \
-D CMAKE_BUILD_TYPE=Release \
-D CMAKE_INSTALL_PREFIX=./install \
-D CMAKE_C_COMPILER=${CC} \
-D CMAKE_CXX_COMPILER=${CXX} \
-D CMAKE_Fortran_COMPILER=${FC} \
-D CMAKE_PREFIX_PATH="${CONDA_PREFIX}" \
-D CMAKE_INSIST_FIND_PACKAGE_pybind11=ON \
-D CMAKE_INSIST_FIND_PACKAGE_gau2grid=ON \
-D CMAKE_INSIST_FIND_PACKAGE_Libint2=ON \
-D CMAKE_INSIST_FIND_PACKAGE_optking=ON \
-D CMAKE_INSIST_FIND_PACKAGE_qcelemental=ON \
-D CMAKE_INSIST_FIND_PACKAGE_qcengine=ON \
-D CMAKE_INSIST_FIND_PACKAGE_Libxc=ON \
-D ENABLE_ambit=OFF \
-D CMAKE_INSIST_FIND_PACKAGE_ambit=ON \
-D ENABLE_CheMPS2=OFF \
-D CMAKE_INSIST_FIND_PACKAGE_CheMPS2=ON \
-D ENABLE_dkh=ON \
-D CMAKE_INSIST_FIND_PACKAGE_dkh=ON \
-D ENABLE_ecpint=OFF \
-D CMAKE_INSIST_FIND_PACKAGE_ecpint=ON \
-D ENABLE_gdma=ON \
-D CMAKE_INSIST_FIND_PACKAGE_gdma=ON \
-D ENABLE_PCMSolver=OFF \
-D CMAKE_INSIST_FIND_PACKAGE_PCMSolver=OFF \
-D ENABLE_simint=OFF \
-D SIMINT_VECTOR=sse \
-D CMAKE_INSIST_FIND_PACKAGE_simint=ON \
-D ENABLE_v2rdm_casscf=ON \
-D CMAKE_DISABLE_FIND_PACKAGE_v2rdm_casscf=ON \
-D ENABLE_OPENMP=ON \
-D ENABLE_XHOST=OFF \
-D CMAKE_Fortran_FLAGS="-isysroot /opt/MacOSX${{ matrix.cfg.target-sdk }}.sdk" \
-D CMAKE_OSX_DEPLOYMENT_TARGET=${{ matrix.cfg.target-sdk }} \
-D CMAKE_OSX_SYSROOT="/opt/MacOSX${{ matrix.cfg.target-sdk }}.sdk" \
${{ matrix.cfg.cmargs }}
- name: Configure Psi4, LLVM clang-cl (W)
if: runner.os == 'Windows'
run: |
cmake \
-S . \
-B objdir \
-G Ninja \
-D CMAKE_BUILD_TYPE=Release \
-D CMAKE_INSTALL_PREFIX=./install \
-D CMAKE_C_COMPILER=clang-cl \
-D CMAKE_CXX_COMPILER=clang-cl \
-D CMAKE_PREFIX_PATH="${CONDA_PREFIX}" \
-D CMAKE_INSIST_FIND_PACKAGE_pybind11=ON \
-D CMAKE_INSIST_FIND_PACKAGE_gau2grid=ON \
-D CMAKE_INSIST_FIND_PACKAGE_Libint2=ON \
-D CMAKE_INSIST_FIND_PACKAGE_optking=ON \
-D CMAKE_INSIST_FIND_PACKAGE_qcelemental=ON \
-D CMAKE_INSIST_FIND_PACKAGE_qcengine=ON \
-D CMAKE_INSIST_FIND_PACKAGE_Libxc=ON \
-D ENABLE_dkh=ON \
-D CMAKE_INSIST_FIND_PACKAGE_dkh=ON \
-D ENABLE_gdma=ON \
-D CMAKE_INSIST_FIND_PACKAGE_gdma=ON \
-D ENABLE_OPENMP=ON \
-D ENABLE_XHOST=OFF \
${{ matrix.cfg.cmargs }}
- name: Compile & Install Psi4
run: cmake --build objdir --config Release --target install -j
- name: Linked dependencies, ldd (L)
if: runner.os == 'Linux'
run: ldd objdir/stage/lib/psi4/core.*.so
- name: Linked dependencies, otool (M)
if: runner.os == 'macOS'
run: otool -L objdir/stage/lib/psi4/core.*.so
- name: Linked dependencies, objdump (W)
if: runner.os == 'Windows'
shell: cmd /C CALL {0}
run: objdump.exe -p objdir\stage\lib\psi4\core.*.pyd | grep dll
# Notes: This is clearing away the whole build environment (to make explicit the build and
# runtime dependencies and addons). Then it's creating a new runtime environment based on
# psi4 and base channel dependencies and addons. This is created at the same environment
# name (so same location on disk as the build env) for non-relocatability reasons.
- name: Runtime Conda environment(s)
run: |
echo "::group::Prepare Environment"
conda deactivate
mamba remove -n baseenv --all
mamba env create --file run.yaml
#if [[ "${{ matrix.cfg.base-channel }}" != "conda-forge" ]]; then
#conda env create --file aux.yaml
#fi
conda activate baseenv
echo "::endgroup::"
mamba info
mamba list -n baseenv
#if [[ "${{ matrix.cfg.base-channel }}" != "conda-forge" ]]; then
#conda list -n auxenv
if [[ "${{ runner.os }}" != "Windows" ]]; then
# on Windows, cmd varies: `qcengine.exe`
qcengine info
fi
- name: Patch QCFractal for Python
if: runner.os == 'macOS'
run: |
cat /Users/runner/miniconda3/envs/baseenv/lib/python${{ matrix.cfg.python-version }}/site-packages/qcfractal/queue/executor_adapter.py
sed -E -i.bak "s;for result in self.queue.values\(\);for result in list(self.queue.values());g" /Users/runner/miniconda3/envs/baseenv/lib/python${{ matrix.cfg.python-version }}/site-packages/qcfractal/queue/executor_adapter.py
cat /Users/runner/miniconda3/envs/baseenv/lib/python${{ matrix.cfg.python-version }}/site-packages/qcfractal/queue/executor_adapter.py
- name: Test OpenMP
working-directory: ./install/lib
run: python -c "from psi4 import core; core.set_num_threads(42); assert core.get_num_threads() == 42"
- name: Test Run, Spot, Run
working-directory: ./objdir
run: |
export PATH=../install/bin:$PATH
#export KMP_DUPLICATE_LIB_OK=TRUE
psi4 ../tests/tu1-h2o-energy/input.dat -o stdout
# step works but is redundant with next two; enable for debugging
- name: Test Addons with CTest
if: false
working-directory: ./objdir
run: ctest -L addon -j2 --output-on-failure
- name: "Test Addons with Pytest, base channel only `-c ${{ matrix.cfg.base-channel }} -c psi4/label/dev` (L, M, W)"
if: matrix.cfg.base-channel == 'conda-forge'
working-directory: ./objdir
# (1st entry PYTHONPATH) need to find the Psi4 module
run: PYTHONPATH=stage/lib pytest --cache-clear -v -rws --durations=50 --durations-min=40 --strict-markers --color yes -n auto -m "${{ matrix.cfg.pytest-marker-expr }}" stage/lib/psi4/tests/
#run: PYTHONPATH=stage/lib pytest --cache-clear -v -rws --durations=50 --durations-min=40 --strict-markers --color yes -n auto -m "addon and not long and not d2ints" stage/lib/psi4/tests/
#- name: "Test Addons with Pytest, base + community channel `-c ${{ matrix.cfg.base-channel }} -c psi4/label/dev -c conda-forge` (L, M)"
# if: matrix.cfg.base-channel != 'conda-forge'
# working-directory: ./objdir
# run: |
# conda activate --stack auxenv
# printenv | grep CONDA_PREFIX
# if [[ "${{ runner.os }}" == "Linux" ]]; then
# # (1st entry) need to find the Psi4 module
# # (2nd entry) Linux needs the baseenv (CONDA_PREFIX_1) to avoid dual OpenMP init since defaults mkl are intel/iomp5 and c-f mkl is llvm/omp
# # (3rd entry) need to find the new addon modules in the auxenv (CONDA_PREFIX; stack activation only merges bin/)
# export PYTHONPATH=stage/lib/:$CONDA_PREFIX_1/lib/python${{ matrix.cfg.python-version }}/site-packages:$CONDA_PREFIX/lib/python${{ matrix.cfg.python-version }}/site-packages
# fi
# if [[ "${{ runner.os }}" == "macOS" ]]; then
# # (1st entry) need to find the Psi4 module
# # (2nd entry) need to find the new addon modules in the auxenv (CONDA_PREFIX; stack activation only merges bin/)
# export PYTHONPATH=stage/lib/:$CONDA_PREFIX/lib/python${{ matrix.cfg.python-version }}/site-packages
# fi
# echo $PYTHONPATH
# pytest --cache-clear -v -rws --durations=50 --durations-min=40 --strict-markers --color yes -n auto -m "addon and not long" stage/lib/psi4/tests/
- name: Write user Conda environment files
run: |
echo "::group::Prepare Environment"
mamba install ruamel_yaml -c ${{ matrix.cfg.base-channel }}
echo "::endgroup::"
cat > userenvs.py <<EOF
from pathlib import Path
from ruamel_yaml import YAML
file1 = Path("build.yaml")
yaml1 = YAML(typ="rt")
yaml1.indent(mapping=2, sequence=4, offset=2)
data1 = yaml1.load(file1)
file2 = Path("run.yaml")
yaml2 = YAML(typ="rt")
data2 = yaml2.load(file2)
for dep in data2["dependencies"]:
if dep not in data1["dependencies"]:
data1["dependencies"].append(dep)
outfile = Path("devtools") / "conda-envs" / "${{ runner.os }}-buildrun-maxeco.yaml"
yaml1.dump(data1, outfile)
EOF
python userenvs.py
cat devtools/conda-envs/${{ runner.os }}-buildrun-maxeco.yaml
#if [[ "${{ matrix.cfg.base-channel }}" != "conda-forge" ]]; then
#cp aux.yaml devtools/conda-envs/${{ runner.os }}-aux-maxeco.yaml
#fi
git diff --color-words
# Notes
# -----
# Error: (W) "OMP: Error #15: Initializing libiomp5md.dll, but found libomp.dll already initialized." or analysis shows linked to libomp.dll
# Soln: feed OpenMP_LIBRARY_DIRS so selects correct libiomp5md.lib so analysis shows linked to libiomp5md.dll
# Error (W) " File "D:\a\psi4\psi4\objdir\stage\lib\psi4\__init__.py", line 55, in <module>
# from . import core
# ImportError: DLL load failed while importing core: The specified module could not be found."
# Soln:
# Have mkl-devel=<mkl-version> -or- mkl=<mkl-version> in runtime environment to match mkl-devel=<mkl-version> in build env.
# Having intel-openmp=<mkl-version> in build and run seems fine but not necessary.
# Error: (W) "DLL load failed while importing _multiarray_umath: The specified module could not be found."
# Soln: Add `C:\tools\miniconda3\Library\mingw-w64\bin` to PATH
# Using Intel's OpenMP on Windows needs libiomp5md.lib (import library) and libiomp5md.dll at buildtime and libiomp5md.dll at runtime.
# No conda package provides libiomp5md.lib, so we stashed one from 2019.1 on GH and clone it here for the build.
# We feed the cloned path to the build via OpenMP_LIBRARY_DIRS. 2019.1 has been the iomp5 version for a long time.
# But by now, only defaults conda channel has a complementary intel-openmp=2019.1 package with the dll.
# In order to update the version and to allow a single channel base, conda-forge, using mkl-version=2021.4 still with that
# same 2019.1 iomp5, and it seems to work fine. Is all this really necessary? I don't know.
# There is another libiomp5md.lib that comes with llvm and lives at "C:\Program Files\LLVM\lib\libiomp5md.lib".
# Attempts to use it quickly fell off the narrow path-of-compilability-and-runability but should be explored again.