Hi,
I've encountered some problems with trying to use openmp with windows. I've
followed
https://groups.google.com/forum/#!searchin/pyfrmailinglist/windows$2010%7Csort:date/pyfrmailinglist/Kaygd-9ni2k/42IqyZfIBAAJ
for
the setup for the most part.
While trying to run
mpiexec -n 2 pyfr run -b openmp -p euler_vortex_2d.pyfrm euler_vortex_2d.ini
I got the error message
File
"C:\Users\admin\AppData\Local\Programs\Python\Python36\lib\ctypes\__init__.py",
line 348, in __init__
self._handle = _dlopen(self._name, mode)
OSError: [WinError 126] The specified module could not be found
job aborted:
[ranks] message
[0] application aborted
aborting MPI_COMM_WORLD (comm=0x44000000), error 1, comm rank 0
[1] terminated
---- error analysis -----
[0] on BEAST
pyfr aborted the job. abort code 1
---- error analysis -----
I am having really big trouble seeing what this error message means. I
thought it was missing some dll, but cant figure out at all what dll that
would be. I've tried reinstalling pyfr from pip and the setup.py, but it
makes no difference.
Anyone has any idea what is wrong?
(Running on windows 10, microsoft MPI, two xeon cpus, pyfr 1.7.5)
--
You received this message because you are subscribed to the Google Groups "PyFR
Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send an email to [email protected].
Visit this group at https://groups.google.com/group/pyfrmailinglist.
For more options, visit https://groups.google.com/d/optout.
c:\PyFR-1.7.5\examples\euler_vortex_2d>mpiexec -n 2 pyfr run -b openmp -p
euler_vortex_2d.pyfrm euler_vortex_2d.ini
C:\Users\admin\AppData\Local\Programs\Python\Python36\lib\site-packages\h5py\__init__.py:36:
FutureWarning: Conversion of the second argument of issubdtype from `float` to
`np.floating` is deprecated. In future, it will be treated as `np.float64 ==
np.dtype(float).type`.
from ._conv import register_converters as _register_converters
Traceback (most recent call last):
File
"C:\Users\admin\AppData\Local\Programs\Python\Python36\lib\site-packages\pyfr-1.7.5-py3.6.egg\pyfr\util.py",
line 33, in __call__
KeyError: (<function OpenMPKernelProvider._build_kernel at 0x000001C10B734598>,
b'\x80\x03X\x05\x00\x00\x00tfluxq\x00X^\x1e\x00\x00\n\n#include
<omp.h>\n#include <stdlib.h>\n#include <tgmath.h>\n\n#define PYFR_ALIGN_BYTES
32\n#define SOA_SZ 4\n\n#define min(a, b) ((a) < (b) ? (a) : (b))\n#define
max(a, b) ((a) > (b) ? (a) : (b))\n\n// Typedefs\ntypedef double
fpdtype_t;\n\n// OpenMP static loop scheduling functions\n\nstatic inline
int\ngcd(int a, int b)\n{\n return (a == 0) ? b : gcd(b % a,
a);\n}\n\nstatic inline void\nloop_sched_1d(int n, int align, int *b, int
*e)\n{\n int tid = omp_get_thread_num();\n int nth =
omp_get_num_threads();\n\n // Round up n to be a multiple of nth\n int rn
= n + nth - 1 - (n - 1) % nth;\n\n // Nominal tile size\n int sz = rn /
nth;\n\n // Handle alignment\n sz += align - 1 - (sz - 1) % align;\n\n
// Assign the starting and ending index\n *b = sz * tid;\n *e = min(*b +
sz, n);\n\n // Clamp\n if (*b >= n)\n *b = *e = 0;\n}\n\nstatic
inline void\nloop_sched_2d(int nrow, int ncol, int colalign,\n int
*rowb, int *rowe, int *colb, int *cole)\n{\n int tid =
omp_get_thread_num();\n int nth = omp_get_num_threads();\n\n //
Distribute threads\n int nrowth = gcd(nrow, nth);\n int ncolth = nth /
nrowth;\n\n // Row and column indices for our thread\n int rowix = tid /
ncolth;\n int colix = tid % ncolth;\n\n // Round up ncol to be a multiple
of ncolth\n int rncol = ncol + ncolth - 1 - (ncol - 1) % ncolth;\n\n //
Nominal tile size\n int ntilerow = nrow / nrowth;\n int ntilecol = rncol
/ ncolth;\n\n // Handle column alignment\n ntilecol += colalign - 1 -
(ntilecol - 1) % colalign;\n\n // Assign the starting and ending row to each
thread\n *rowb = ntilerow * rowix;\n *rowe = *rowb + ntilerow;\n\n //
Assign the starting and ending column to each thread\n *colb = ntilecol *
colix;\n *cole = min(*colb + ntilecol, ncol);\n\n // Clamp\n if (*colb
>= ncol)\n *colb = *cole = 0;\n}\n\n\n\n\n\n\n\n\n\nvoid tflux(int _ny,
int _nx, fpdtype_t* __restrict__ f_v, int ldf, const fpdtype_t* __restrict__
smats_v, int ldsmats, const fpdtype_t* __restrict__ u_v, int ldu)\n
{\n #define X_IDX (_xi + _xj)\n #define
X_IDX_AOSOA(v, nv) ((_xi/SOA_SZ*(nv) + (v))*SOA_SZ +
_xj)\n int align = PYFR_ALIGN_BYTES / sizeof(fpdtype_t);\n
#pragma omp parallel\n {\n
\n int rb, re, cb, ce;\n
loop_sched_2d(_ny, _nx, align, &rb, &re, &cb, &ce);\n int
nci = ((ce - cb) / SOA_SZ)*SOA_SZ;\n for (int _y = rb; _y <
re; _y++)\n {\n for (int _xi = cb;
_xi < cb + nci; _xi += SOA_SZ)\n {\n
#pragma omp simd\n for (int _xj = 0; _xj <
SOA_SZ; _xj++)\n {\n
\n // Compute the flux\n fpdtype_t ftemp[2][4];\n fpdtype_t p, v[2];\n
{\n\n fpdtype_t invrho_ = 1.0/u_v[ldu*_y + X_IDX_AOSOA(0, 4)], E_ =
u_v[ldu*_y + X_IDX_AOSOA(3, 4)];\n\n // Compute the velocities\n
fpdtype_t rhov_[2];\n rhov_[0] = u_v[ldu*_y + X_IDX_AOSOA(1, 4)];\n v[0]
= invrho_*rhov_[0];\n rhov_[1] = u_v[ldu*_y + X_IDX_AOSOA(2, 4)];\n v[1]
= invrho_*rhov_[1];\n\n // Compute the pressure\n p =
0.3999999999999999*(E_ - 0.5*invrho_*((rhov_[0])*(rhov_[0]) +
(rhov_[1])*(rhov_[1])));\n\n // Density and energy fluxes\n ftemp[0][0] =
rhov_[0];\n ftemp[0][3] = (E_ + p)*v[0];\n ftemp[1][0] = rhov_[1];\n
ftemp[1][3] = (E_ + p)*v[1];\n\n // Momentum fluxes\n ftemp[0][1] =
rhov_[0]*v[0] + p;\n ftemp[0][2] = rhov_[0]*v[1];\n ftemp[1][1] =
rhov_[1]*v[0];\n ftemp[1][2] = rhov_[1]*v[1] + p;\n\n};\n\n // Transform
the fluxes\n f_v[(0*_ny + _y)*ldf + X_IDX_AOSOA(0, 4)] = smats_v[(0*_ny +
_y)*ldsmats + X_IDX_AOSOA(0, 2)]*ftemp[0][0] + smats_v[(0*_ny + _y)*ldsmats +
X_IDX_AOSOA(1, 2)]*ftemp[1][0];\n f_v[(0*_ny + _y)*ldf + X_IDX_AOSOA(1, 4)]
= smats_v[(0*_ny + _y)*ldsmats + X_IDX_AOSOA(0, 2)]*ftemp[0][1] +
smats_v[(0*_ny + _y)*ldsmats + X_IDX_AOSOA(1, 2)]*ftemp[1][1];\n f_v[(0*_ny
+ _y)*ldf + X_IDX_AOSOA(2, 4)] = smats_v[(0*_ny + _y)*ldsmats + X_IDX_AOSOA(0,
2)]*ftemp[0][2] + smats_v[(0*_ny + _y)*ldsmats + X_IDX_AOSOA(1,
2)]*ftemp[1][2];\n f_v[(0*_ny + _y)*ldf + X_IDX_AOSOA(3, 4)] =
smats_v[(0*_ny + _y)*ldsmats + X_IDX_AOSOA(0, 2)]*ftemp[0][3] + smats_v[(0*_ny
+ _y)*ldsmats + X_IDX_AOSOA(1, 2)]*ftemp[1][3];\n f_v[(1*_ny + _y)*ldf +
X_IDX_AOSOA(0, 4)] = smats_v[(1*_ny + _y)*ldsmats + X_IDX_AOSOA(0,
2)]*ftemp[0][0] + smats_v[(1*_ny + _y)*ldsmats + X_IDX_AOSOA(1,
2)]*ftemp[1][0];\n f_v[(1*_ny + _y)*ldf + X_IDX_AOSOA(1, 4)] =
smats_v[(1*_ny + _y)*ldsmats + X_IDX_AOSOA(0, 2)]*ftemp[0][1] + smats_v[(1*_ny
+ _y)*ldsmats + X_IDX_AOSOA(1, 2)]*ftemp[1][1];\n f_v[(1*_ny + _y)*ldf +
X_IDX_AOSOA(2, 4)] = smats_v[(1*_ny + _y)*ldsmats + X_IDX_AOSOA(0,
2)]*ftemp[0][2] + smats_v[(1*_ny + _y)*ldsmats + X_IDX_AOSOA(1,
2)]*ftemp[1][2];\n f_v[(1*_ny + _y)*ldf + X_IDX_AOSOA(3, 4)] =
smats_v[(1*_ny + _y)*ldsmats + X_IDX_AOSOA(0, 2)]*ftemp[0][3] + smats_v[(1*_ny
+ _y)*ldsmats + X_IDX_AOSOA(1, 2)]*ftemp[1][3];\n\n
}\n }\n for (int _xi = cb + nci,
_xj = 0; _xj < ce - _xi;\n _xj++)\n
{\n \n // Compute the flux\n fpdtype_t
ftemp[2][4];\n fpdtype_t p, v[2];\n {\n\n fpdtype_t invrho_ =
1.0/u_v[ldu*_y + X_IDX_AOSOA(0, 4)], E_ = u_v[ldu*_y + X_IDX_AOSOA(3, 4)];\n\n
// Compute the velocities\n fpdtype_t rhov_[2];\n rhov_[0] = u_v[ldu*_y
+ X_IDX_AOSOA(1, 4)];\n v[0] = invrho_*rhov_[0];\n rhov_[1] = u_v[ldu*_y
+ X_IDX_AOSOA(2, 4)];\n v[1] = invrho_*rhov_[1];\n\n // Compute the
pressure\n p = 0.3999999999999999*(E_ - 0.5*invrho_*((rhov_[0])*(rhov_[0]) +
(rhov_[1])*(rhov_[1])));\n\n // Density and energy fluxes\n ftemp[0][0] =
rhov_[0];\n ftemp[0][3] = (E_ + p)*v[0];\n ftemp[1][0] = rhov_[1];\n
ftemp[1][3] = (E_ + p)*v[1];\n\n // Momentum fluxes\n ftemp[0][1] =
rhov_[0]*v[0] + p;\n ftemp[0][2] = rhov_[0]*v[1];\n ftemp[1][1] =
rhov_[1]*v[0];\n ftemp[1][2] = rhov_[1]*v[1] + p;\n\n};\n\n // Transform
the fluxes\n f_v[(0*_ny + _y)*ldf + X_IDX_AOSOA(0, 4)] = smats_v[(0*_ny +
_y)*ldsmats + X_IDX_AOSOA(0, 2)]*ftemp[0][0] + smats_v[(0*_ny + _y)*ldsmats +
X_IDX_AOSOA(1, 2)]*ftemp[1][0];\n f_v[(0*_ny + _y)*ldf + X_IDX_AOSOA(1, 4)]
= smats_v[(0*_ny + _y)*ldsmats + X_IDX_AOSOA(0, 2)]*ftemp[0][1] +
smats_v[(0*_ny + _y)*ldsmats + X_IDX_AOSOA(1, 2)]*ftemp[1][1];\n f_v[(0*_ny
+ _y)*ldf + X_IDX_AOSOA(2, 4)] = smats_v[(0*_ny + _y)*ldsmats + X_IDX_AOSOA(0,
2)]*ftemp[0][2] + smats_v[(0*_ny + _y)*ldsmats + X_IDX_AOSOA(1,
2)]*ftemp[1][2];\n f_v[(0*_ny + _y)*ldf + X_IDX_AOSOA(3, 4)] =
smats_v[(0*_ny + _y)*ldsmats + X_IDX_AOSOA(0, 2)]*ftemp[0][3] + smats_v[(0*_ny
+ _y)*ldsmats + X_IDX_AOSOA(1, 2)]*ftemp[1][3];\n f_v[(1*_ny + _y)*ldf +
X_IDX_AOSOA(0, 4)] = smats_v[(1*_ny + _y)*ldsmats + X_IDX_AOSOA(0,
2)]*ftemp[0][0] + smats_v[(1*_ny + _y)*ldsmats + X_IDX_AOSOA(1,
2)]*ftemp[1][0];\n f_v[(1*_ny + _y)*ldf + X_IDX_AOSOA(1, 4)] =
smats_v[(1*_ny + _y)*ldsmats + X_IDX_AOSOA(0, 2)]*ftemp[0][1] + smats_v[(1*_ny
+ _y)*ldsmats + X_IDX_AOSOA(1, 2)]*ftemp[1][1];\n f_v[(1*_ny + _y)*ldf +
X_IDX_AOSOA(2, 4)] = smats_v[(1*_ny + _y)*ldsmats + X_IDX_AOSOA(0,
2)]*ftemp[0][2] + smats_v[(1*_ny + _y)*ldsmats + X_IDX_AOSOA(1,
2)]*ftemp[1][2];\n f_v[(1*_ny + _y)*ldf + X_IDX_AOSOA(3, 4)] =
smats_v[(1*_ny + _y)*ldsmats + X_IDX_AOSOA(0, 2)]*ftemp[0][3] + smats_v[(1*_ny
+ _y)*ldsmats + X_IDX_AOSOA(1, 2)]*ftemp[1][3];\n\n }\n
}\n }\n #undef X_IDX\n
#undef X_IDX_AOSOA\n
}\n\nq\x01]q\x02(cnumpy\nint32\nq\x03h\x03cnumpy\nint64\nq\x04h\x03h\x04h\x03h\x04h\x03e\x87q\x05.',
b'\x80\x03}q\x00.')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\admin\AppData\Local\Programs\Python\Python36\lib\shutil.py",
line 544, in move
os.rename(src, real_dst)
FileExistsError: [WinError 183] Cannot create a file when that file already
exists:
'C:\\Users\\admin\\AppData\\Local\\pyfr\\pyfr\\Cache\\2624b029-ac70-4dc0-b5d7-38da785c9270'
->
'C:\\Users\\admin\\AppData\\Local\\pyfr\\pyfr\\Cache\\ba6ea04572bb625b8021f05184865a5c3f4331089c354cf1899cff1d7181f4e8.dll'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File
"C:\Users\admin\AppData\Local\Programs\Python\Python36\lib\site-packages\pyfr-1.7.5-py3.6.egg\pyfr\backends\openmp\compiler.py",
line 124, in _cache_set_and_loadlib
File
"C:\Users\admin\AppData\Local\Programs\Python\Python36\lib\site-packages\pyfr-1.7.5-py3.6.egg\pyfr\util.py",
line 178, in mv
File "C:\Users\admin\AppData\Local\Programs\Python\Python36\lib\shutil.py",
line 558, in move
copy_function(src, real_dst)
File "C:\Users\admin\AppData\Local\Programs\Python\Python36\lib\shutil.py",
line 257, in copy2
copyfile(src, dst, follow_symlinks=follow_symlinks)
File "C:\Users\admin\AppData\Local\Programs\Python\Python36\lib\shutil.py",
line 121, in copyfile
with open(dst, 'wb') as fdst:
PermissionError: [Errno 13] Permission denied:
'C:\\Users\\admin\\AppData\\Local\\pyfr\\pyfr\\Cache\\ba6ea04572bb625b8021f05184865a5c3f4331089c354cf1899cff1d7181f4e8.dll'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File
"C:\Users\admin\AppData\Local\Programs\Python\Python36\Scripts\pyfr-script.py",
line 11, in <module>
load_entry_point('pyfr==1.7.5', 'console_scripts', 'pyfr')()
File
"C:\Users\admin\AppData\Local\Programs\Python\Python36\lib\site-packages\pyfr-1.7.5-py3.6.egg\pyfr\__main__.py",
line 110, in main
File
"C:\Users\admin\AppData\Local\Programs\Python\Python36\lib\site-packages\pyfr-1.7.5-py3.6.egg\pyfr\__main__.py",
line 235, in process_run
File
"C:\Users\admin\AppData\Local\Programs\Python\Python36\lib\site-packages\pyfr-1.7.5-py3.6.egg\pyfr\__main__.py",
line 216, in _process_common
File
"C:\Users\admin\AppData\Local\Programs\Python\Python36\lib\site-packages\pyfr-1.7.5-py3.6.egg\pyfr\solvers\__init__.py",
line 16, in get_solver
File
"C:\Users\admin\AppData\Local\Programs\Python\Python36\lib\site-packages\pyfr-1.7.5-py3.6.egg\pyfr\integrators\__init__.py",
line 46, in get_integrator
File
"C:\Users\admin\AppData\Local\Programs\Python\Python36\lib\site-packages\pyfr-1.7.5-py3.6.egg\pyfr\integrators\std\controllers.py",
line 14, in __init__
File
"C:\Users\admin\AppData\Local\Programs\Python\Python36\lib\site-packages\pyfr-1.7.5-py3.6.egg\pyfr\integrators\std\steppers.py",
line 8, in __init__
File
"C:\Users\admin\AppData\Local\Programs\Python\Python36\lib\site-packages\pyfr-1.7.5-py3.6.egg\pyfr\integrators\std\base.py",
line 10, in __init__
File
"C:\Users\admin\AppData\Local\Programs\Python\Python36\lib\site-packages\pyfr-1.7.5-py3.6.egg\pyfr\integrators\base.py",
line 58, in __init__
File
"C:\Users\admin\AppData\Local\Programs\Python\Python36\lib\site-packages\pyfr-1.7.5-py3.6.egg\pyfr\integrators\base.py",
line 88, in _init_system
File
"C:\Users\admin\AppData\Local\Programs\Python\Python36\lib\site-packages\pyfr-1.7.5-py3.6.egg\pyfr\solvers\base\system.py",
line 65, in __init__
File
"C:\Users\admin\AppData\Local\Programs\Python\Python36\lib\site-packages\pyfr-1.7.5-py3.6.egg\pyfr\solvers\base\system.py",
line 174, in _gen_kernels
File
"C:\Users\admin\AppData\Local\Programs\Python\Python36\lib\site-packages\pyfr-1.7.5-py3.6.egg\pyfr\solvers\euler\elements.py",
line 74, in <lambda>
File
"C:\Users\admin\AppData\Local\Programs\Python\Python36\lib\site-packages\pyfr-1.7.5-py3.6.egg\pyfr\backends\base\backend.py",
line 166, in kernel
File
"C:\Users\admin\AppData\Local\Programs\Python\Python36\lib\site-packages\pyfr-1.7.5-py3.6.egg\pyfr\backends\base\kernels.py",
line 161, in kernel_meth
File
"C:\Users\admin\AppData\Local\Programs\Python\Python36\lib\site-packages\pyfr-1.7.5-py3.6.egg\pyfr\util.py",
line 35, in __call__
File
"C:\Users\admin\AppData\Local\Programs\Python\Python36\lib\site-packages\pyfr-1.7.5-py3.6.egg\pyfr\backends\openmp\provider.py",
line 13, in _build_kernel
File
"C:\Users\admin\AppData\Local\Programs\Python\Python36\lib\site-packages\pyfr-1.7.5-py3.6.egg\pyfr\backends\openmp\compiler.py",
line 65, in __init__
File
"C:\Users\admin\AppData\Local\Programs\Python\Python36\lib\site-packages\pyfr-1.7.5-py3.6.egg\pyfr\backends\openmp\compiler.py",
line 127, in _cache_set_and_loadlib
File
"C:\Users\admin\AppData\Local\Programs\Python\Python36\lib\ctypes\__init__.py",
line 348, in __init__
self._handle = _dlopen(self._name, mode)
OSError: [WinError 126] The specified module could not be found
job aborted:
[ranks] message
[0] application aborted
aborting MPI_COMM_WORLD (comm=0x44000000), error 1, comm rank 0
[1] terminated
---- error analysis -----
[0] on BEAST
pyfr aborted the job. abort code 1
---- error analysis -----