Openmp Windows 10. OSError: [WinError 126] The specified module could not be found

Hi,
I’ve encountered some problems with trying to use openmp with windows. I’ve followed https://pyfr.discourse.group/t/how-i-installed-pyfr-1-6-0-with-cuda-backend-and-dependancies-on-windows-10/167 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)

openmp_error.txt (13.8 KB)

The problem appears to be that the path was not handled correctly. The backslashes used for the path in windows were interpreted as escapes and I got “\x08in” and not “\bin”.

I changed this in row 125-127 in pyfr\backends\openmp\compiler.py

If an exception is raised, load from the original path

except OSError:

escape_dict={’\a’:r’\a’,
‘\b’:r’\b’,
‘\c’:r’\c’,
‘\f’:r’\f’,
‘\n’:r’\n’,
‘\r’:r’\r’,
‘\t’:r’\t’,
‘\v’:r’\v’,
‘’’:r’’’,
‘"’:r’"’}

new_string=’’
for char in lpath:
try:
new_string += escape_dict[char]
except KeyError:
new_string += char
lpath = new_string

return CDLL(lpath)

This seems to work!

Now I got this problem instead
KeyError: <class ‘numpy.int32’>

as described here: https://groups.google.com/forum/#!searchin/pyfrmailinglist/KeyError$3A$20%3Cclass$20$27numpy.int32$27%3E%7Csort:date/pyfrmailinglist/UYBMh6Uf-qI/AIW3NnRLIQwJ