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

**URL:** <https://pyfr.discourse.group/t/openmp-windows-10-oserror-winerror-126-the-specified-module-could-not-be-found/208>\
**Category:** General\
**Created:** [5 April 2018 13:35 UTC](https://pyfr.discourse.group/t/openmp-windows-10-oserror-winerror-126-the-specified-module-could-not-be-found/208 "2018-04-05T13:35:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Magnus](https://avatars.discourse-cdn.com/v4/letter/m/e9c0ed/32.png) [@Magnus](https://pyfr.discourse.group/u/Magnus)\
**Post date:** [5 April 2018 13:35 UTC](https://pyfr.discourse.group/t/openmp-windows-10-oserror-winerror-126-the-specified-module-could-not-be-found/208/1 "2018-04-05T13:35:00Z")

</div>

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](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

```auto
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](https://pyfr.discourse.group/uploads/short-url/lqIIVuOCT9ccskYXq1xdbAz37cX.txt) (13.8 KB)

---

<div class="post-metadata">

**Author:** ![Magnus](https://avatars.discourse-cdn.com/v4/letter/m/e9c0ed/32.png) [@Magnus](https://pyfr.discourse.group/u/Magnus)\
**Post date:** [8 April 2018 15:55 UTC](https://pyfr.discourse.group/t/openmp-windows-10-oserror-winerror-126-the-specified-module-could-not-be-found/208/2 "2018-04-08T15:55:13Z")

</div>

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](https://groups.google.com/forum/#!searchin/pyfrmailinglist/KeyError%243A%2420%3Cclass%2420%2427numpy.int32%2427%3E%7Csort:date/pyfrmailinglist/UYBMh6Uf-qI/AIW3NnRLIQwJ)
