ImportError: DLL load failed: The specified module could not be found.

5,226 views
Skip to first unread message

sampath methuku

unread,
Mar 27, 2012, 1:54:04 PM3/27/12
to mpi4py
form mpi4py import MPI
comm = MPI.COMM_WORLD

rank = comm.Get_rank()
N = 100000000
if rank == 0:
s = sum(range(N/2))
comm.send(s,dest=2,tag=11)
elif rank == 1:
s = sum(range(N/2+1,N))
comm.send(s,dest=2,tag=11)
elif rank == 2:
s1 = comm.recv(source=0, tag=11)
s2 = comm.recv(source=1, tag=11)
print (s1+s2)


i want find the sum of 10000000 numbers parallely . i am doing sum of
first half in core 1, second half in core 3
on core 2 summing the results of core 1 and 3
but on windows by running on python 3.2 i am getting following
error

from mpi4py import MPI
ImportError: DLL load failed: The specified module could not be found.


please give me the solution for this error

Lisandro Dalcin

unread,
Mar 27, 2012, 3:27:54 PM3/27/12
to mpi...@googlegroups.com

You have not provided us any useful information to figure out what's
going on in your system... What MPI implementation are you using? What
compiler did you use to build mpi4py? Please note that I do not have
too much Windows expertise. Perhaps using this tool to figure out
what's the missing DLL will help you: http://www.dependencywalker.com/


--
Lisandro Dalcin
---------------
CIMEC (INTEC/CONICET-UNL)
Predio CONICET-Santa Fe
Colectora RN 168 Km 472, Paraje El Pozo
3000 Santa Fe, Argentina
Tel: +54-342-4511594 (ext 1011)
Tel/Fax: +54-342-4511169

michael...@gmail.com

unread,
Dec 15, 2015, 12:52:32 PM12/15/15
to mpi4py, sampa...@gmail.com
Hi there, I am having the same problem.

I have Open MPI v1.6.2-x64 and mpi4py v2.0.0 installed.

How would you recommend using the dependancywalker program to identify which DLLs are missing?

Should I point it to one of the OpenMPI executables?

Kind regards
Michael

Aron Ahmadia

unread,
Dec 15, 2015, 12:57:33 PM12/15/15
to mpi4py, sampa...@gmail.com
How did you install mpi4py?  Is your LD_LIBRARY_PATH environment path set?  Can you try running the code without LD_LIBRARY_PATH set?

--
You received this message because you are subscribed to the Google Groups "mpi4py" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mpi4py+un...@googlegroups.com.
To post to this group, send email to mpi...@googlegroups.com.
Visit this group at https://groups.google.com/group/mpi4py.
To view this discussion on the web visit https://groups.google.com/d/msgid/mpi4py/6c420192-1d8c-4a01-8382-21ee7d5ce801%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Lisandro Dalcin

unread,
Dec 15, 2015, 3:32:48 PM12/15/15
to mpi4py
I guess you are using Windows, right? How did you install mpi4py? If
you used pip, then note that "pip install mpi4py" will install a
binary wheel built to work with Microsoft MPI v6 (but I guess using
the latest MSMPI v7 should work).

As both MPICH and OpenMPI have discontinued their support for the
Windows platform, I do not officially support building mpi4py with
these MPI implementations. It should be possible, but you are somewhat
at your own.
> --
> You received this message because you are subscribed to the Google Groups
> "mpi4py" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to mpi4py+un...@googlegroups.com.
> To post to this group, send email to mpi...@googlegroups.com.
> Visit this group at https://groups.google.com/group/mpi4py.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/mpi4py/6c420192-1d8c-4a01-8382-21ee7d5ce801%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--
Lisandro Dalcin
============
Research Scientist
Computer, Electrical and Mathematical Sciences & Engineering (CEMSE)
Numerical Porous Media Center (NumPor)
King Abdullah University of Science and Technology (KAUST)
http://numpor.kaust.edu.sa/

4700 King Abdullah University of Science and Technology
al-Khawarizmi Bldg (Bldg 1), Office # 4332
Thuwal 23955-6900, Kingdom of Saudi Arabia
http://www.kaust.edu.sa

Office Phone: +966 12 808-0459

Michael Kruger

unread,
Dec 16, 2015, 12:42:45 AM12/16/15
to mpi...@googlegroups.com
Hi Lisandro.

Yes, I am on Windows and I installed mpi4py using pip.

So I tried to resolve the problem. First I noticed that I didn't have cl.exe anywhere on my computer so I installed Visual Studio Express to get access to this, and put in in my system path.

So now anywhere I am on my computer when I run "mpicc" in cmd I get:

Microsoft (R) C/C++ Optimizing Compiler Version 19.00.23506 for x86
Copyright (C) Microsoft Corporation.  All rights reserved.
usage: cl [ option... ] filename... [ /link linkoption... ]

Which tells me I have access to openMPI and openMPI has access to cl.exe.

But still getting the "DLL not found" error in Python.


--
You received this message because you are subscribed to a topic in the Google Groups "mpi4py" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mpi4py/VA7Aihi64R0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mpi4py+un...@googlegroups.com.

To post to this group, send email to mpi...@googlegroups.com.
Visit this group at https://groups.google.com/group/mpi4py.

For more options, visit https://groups.google.com/d/optout.



--
Groete/Regards
Michael Kruger

michael...@gmail.com

unread,
Dec 16, 2015, 1:02:30 AM12/16/15
to mpi4py, sampa...@gmail.com
Hi Aaron. I am not sure if the LD_LIBRARY_PATH is set, I am not exactly sure what it is even to be honost. Please see my reply to Lisandro for what I so far.

Regards.


On Tuesday, March 27, 2012 at 7:54:04 PM UTC+2, sampath methuku wrote:

Yury V. Zaytsev

unread,
Dec 16, 2015, 2:42:51 PM12/16/15
to mpi...@googlegroups.com
On Wed, 2015-12-16 at 07:42 +0200, Michael Kruger wrote:
>
> Which tells me I have access to openMPI and openMPI has access to
> cl.exe.

So, any particular reason to stick to unsupported OpenMPI instead of
Microsoft MPI, given the fact that you're on Windows anyways?

--
Sincerely yours,
Yury V. Zaytsev


Michael Kruger

unread,
Dec 17, 2015, 1:41:15 AM12/17/15
to mpi...@googlegroups.com
Hi Yury.

The only reason would be ignorance. I'm not yet very familiar with anything parallel processing.

I will check out Microsoft MPI, thanks for the suggestion!

Cheers.

--
You received this message because you are subscribed to a topic in the Google Groups "mpi4py" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mpi4py/VA7Aihi64R0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mpi4py+un...@googlegroups.com.
To post to this group, send email to mpi...@googlegroups.com.
Visit this group at https://groups.google.com/group/mpi4py.

For more options, visit https://groups.google.com/d/optout.



--
Groete/Regards
Michael Kruger

Yury V. Zaytsev

unread,
Dec 17, 2015, 4:09:13 PM12/17/15
to mpi...@googlegroups.com
On Thu, 2015-12-17 at 08:41 +0200, Michael Kruger wrote:
>
> I will check out Microsoft MPI, thanks for the suggestion!

Ok, I see, in that case, I definitively recommend you

1) Uninstalling OpenMPI
2) Uninstalling mpi4py
3) Installing Microsoft MPI
4) Re-installing mpi4py with pip so that a wheel gets installed

In theory, after that, it should just work out of the box, even without
requiring a working compiler.

Michael Kruger

unread,
Dec 20, 2015, 3:22:44 AM12/20/15
to mpi...@googlegroups.com
Great, that worked!

Thank you very much.

Regards

--
You received this message because you are subscribed to a topic in the Google Groups "mpi4py" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mpi4py/VA7Aihi64R0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mpi4py+un...@googlegroups.com.
To post to this group, send email to mpi...@googlegroups.com.
Visit this group at https://groups.google.com/group/mpi4py.

For more options, visit https://groups.google.com/d/optout.



--
Groete/Regards
Michael Kruger
Reply all
Reply to author
Forward
0 new messages