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

已查看 2,012 次
跳至第一个未读帖子

Magnus

未读,
2018年4月5日 09:35:002018/4/5
收件人 PyFR Mailing List
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)


openmp_error.txt

Magnus

未读,
2018年4月8日 11:55:132018/4/8
收件人 PyFR Mailing List
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'>
回复全部
回复作者
转发
0 个新帖子