comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: ERROR_MOD_NOT_FOUND when using call_external
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: ERROR_MOD_NOT_FOUND when using call_external [message #37318] Wed, 10 December 2003 08:30
Karl Schultz is currently offline  Karl Schultz
Messages: 341
Registered: October 1999
Senior Member
"Brian" <brian.huether@NOdlrSPAM.de> wrote in message
news:33269b572f090788e59fd6a07c85fc8d@news.teranews.com...
> Wow. That is interesting! All I did was go to preferences and and add the
> path. I know the path is ok, because I also have a procedure file there
and
> IDL finds that procedure ok. Well, I feel like I am a step closer. Can you
> give me more info about your system? What version of IDL, etc?

It depends on which path you are talking about. The path I think you are
changing is the IDL !PATH, which controls where .pro, .sav, and include
files are found.

I moved the fftw DLL from my bin.x86 into C:/bin, which is in my Windows
path, and it still worked. So, you could put the fftw DLL into any dir in
your Windows path. Windows executables also look in the same dir as the
executable, which explains why it also works when the DLL is placed there.

>
> thanks!
>
> -brian
>
> "Karl Schultz" <kschultz_no_spam@rsinc.com> schrieb im Newsbeitrag
> news:vtbusmdr32aled@corp.supernews.com...
>>
>> "Brian" <brian.huether@NOdlrSPAM.de> wrote in message
>> news:e648955426f3d43b5606a3f898bc6d98@news.teranews.com...
>>> I got the fftw binary from www.fftw.org and am trying to call it from
> IDL.
>> I
>>> have searched the forum and have found little info about this error.
>>>
>>> Here is how I am calling it:
>>>
>>> array = call_external('fftw3.dll', 'fftw_malloc', 32, /CDECL)
>>>
>>> My path is set up so that IDL knows where the dll is. I also get the
> error
>>> without /CDECL. I have also tried prepending the function name with an
>>> undeline as someone in another post that I came across had suggested.
>>>
>>> At this point I have no clue what to do. I don't have the means nor
the
>>> skills to recompile dlls such that they work properly with IDL. I am
>> hoping
>>> this works out of the box.
>>>
>>> Any ideas?
>>
>> I downloaded the binary DLL file, put it in my bin/bin.x86 directory and
> the
>> call_external invocation you listed above works - array gets set to a
LONG
>> value (a pointer, I guess).
>>
>> So, I'm thinking that the problem lies in telling IDL where the dll is.
> If
>> you tell us how you are trying to specify the location of the DLL, maybe
> we
>> can help further. Or just drop the DLL into your distribution
bin/bin.x86
>> directory and get on with it if that isn't too distasteful to you
>>
>> Karl
>>
>>
>
>
Re: ERROR_MOD_NOT_FOUND when using call_external [message #37320 is a reply to message #37318] Wed, 10 December 2003 01:17 Go to previous message
Brian is currently offline  Brian
Messages: 27
Registered: March 2001
Junior Member
Ok, I did what you did and it worked. But now the question is, do I need to
write a DLM wrapper to truly use this? In the manual it says

The basic usage of FFTW to compute a one-dimensional DFT of size N is
simple, and it
typically looks something like this code:
#include <fftw3.h>
...
{
fftw_complex *in, *out;
fftw_plan p;
...
in = fftw_malloc(sizeof(fftw_complex) * N);
out = fftw_malloc(sizeof(fftw_complex) * N);
p = fftw_plan_dft_1d(N, in, out, FFTW_FORWARD, FFTW_ESTIMATE);
...
fftw_execute(p); /* repeat as needed */
...
fftw_destroy_plan(p);
fftw_free(in); fftw_free(out);
}
(When you compile, you must also link with the fftw3 library,
e.g. -lfftw3 -lm on
Unix systems.)
First you allocate the input and output arrays. You can allocate them in any
way that
you like, but we recommend using fftw_malloc, which behaves like malloc
except that it
properly aligns the array when SIMD instructions (such as SSE and Altivec)
are available
(see Section 3.1.1 [SIMD alignment and
tw malloc], page 15).

I am just confused how I pass an array in IDL to this dll.

-brian

"Brian" <brian.huether@NOdlrSPAM.de> schrieb im Newsbeitrag
news:33269b572f090788e59fd6a07c85fc8d@news.teranews.com...
> Wow. That is interesting! All I did was go to preferences and and add the
> path. I know the path is ok, because I also have a procedure file there
and
> IDL finds that procedure ok. Well, I feel like I am a step closer. Can you
> give me more info about your system? What version of IDL, etc?
>
> thanks!
>
> -brian
>
> "Karl Schultz" <kschultz_no_spam@rsinc.com> schrieb im Newsbeitrag
> news:vtbusmdr32aled@corp.supernews.com...
>>
>> "Brian" <brian.huether@NOdlrSPAM.de> wrote in message
>> news:e648955426f3d43b5606a3f898bc6d98@news.teranews.com...
>>> I got the fftw binary from www.fftw.org and am trying to call it from
> IDL.
>> I
>>> have searched the forum and have found little info about this error.
>>>
>>> Here is how I am calling it:
>>>
>>> array = call_external('fftw3.dll', 'fftw_malloc', 32, /CDECL)
>>>
>>> My path is set up so that IDL knows where the dll is. I also get the
> error
>>> without /CDECL. I have also tried prepending the function name with an
>>> undeline as someone in another post that I came across had suggested.
>>>
>>> At this point I have no clue what to do. I don't have the means nor
the
>>> skills to recompile dlls such that they work properly with IDL. I am
>> hoping
>>> this works out of the box.
>>>
>>> Any ideas?
>>
>> I downloaded the binary DLL file, put it in my bin/bin.x86 directory and
> the
>> call_external invocation you listed above works - array gets set to a
LONG
>> value (a pointer, I guess).
>>
>> So, I'm thinking that the problem lies in telling IDL where the dll is.
> If
>> you tell us how you are trying to specify the location of the DLL, maybe
> we
>> can help further. Or just drop the DLL into your distribution
bin/bin.x86
>> directory and get on with it if that isn't too distasteful to you
>>
>> Karl
>>
>>
>
>
Re: ERROR_MOD_NOT_FOUND when using call_external [message #37322 is a reply to message #37320] Tue, 09 December 2003 22:44 Go to previous message
Brian is currently offline  Brian
Messages: 27
Registered: March 2001
Junior Member
Wow. That is interesting! All I did was go to preferences and and add the
path. I know the path is ok, because I also have a procedure file there and
IDL finds that procedure ok. Well, I feel like I am a step closer. Can you
give me more info about your system? What version of IDL, etc?

thanks!

-brian

"Karl Schultz" <kschultz_no_spam@rsinc.com> schrieb im Newsbeitrag
news:vtbusmdr32aled@corp.supernews.com...
>
> "Brian" <brian.huether@NOdlrSPAM.de> wrote in message
> news:e648955426f3d43b5606a3f898bc6d98@news.teranews.com...
>> I got the fftw binary from www.fftw.org and am trying to call it from
IDL.
> I
>> have searched the forum and have found little info about this error.
>>
>> Here is how I am calling it:
>>
>> array = call_external('fftw3.dll', 'fftw_malloc', 32, /CDECL)
>>
>> My path is set up so that IDL knows where the dll is. I also get the
error
>> without /CDECL. I have also tried prepending the function name with an
>> undeline as someone in another post that I came across had suggested.
>>
>> At this point I have no clue what to do. I don't have the means nor the
>> skills to recompile dlls such that they work properly with IDL. I am
> hoping
>> this works out of the box.
>>
>> Any ideas?
>
> I downloaded the binary DLL file, put it in my bin/bin.x86 directory and
the
> call_external invocation you listed above works - array gets set to a LONG
> value (a pointer, I guess).
>
> So, I'm thinking that the problem lies in telling IDL where the dll is.
If
> you tell us how you are trying to specify the location of the DLL, maybe
we
> can help further. Or just drop the DLL into your distribution bin/bin.x86
> directory and get on with it if that isn't too distasteful to you
>
> Karl
>
>
Re: ERROR_MOD_NOT_FOUND when using call_external [message #37340 is a reply to message #37322] Tue, 09 December 2003 08:44 Go to previous message
Karl Schultz is currently offline  Karl Schultz
Messages: 341
Registered: October 1999
Senior Member
"Brian" <brian.huether@NOdlrSPAM.de> wrote in message
news:e648955426f3d43b5606a3f898bc6d98@news.teranews.com...
> I got the fftw binary from www.fftw.org and am trying to call it from IDL.
I
> have searched the forum and have found little info about this error.
>
> Here is how I am calling it:
>
> array = call_external('fftw3.dll', 'fftw_malloc', 32, /CDECL)
>
> My path is set up so that IDL knows where the dll is. I also get the error
> without /CDECL. I have also tried prepending the function name with an
> undeline as someone in another post that I came across had suggested.
>
> At this point I have no clue what to do. I don't have the means nor the
> skills to recompile dlls such that they work properly with IDL. I am
hoping
> this works out of the box.
>
> Any ideas?

I downloaded the binary DLL file, put it in my bin/bin.x86 directory and the
call_external invocation you listed above works - array gets set to a LONG
value (a pointer, I guess).

So, I'm thinking that the problem lies in telling IDL where the dll is. If
you tell us how you are trying to specify the location of the DLL, maybe we
can help further. Or just drop the DLL into your distribution bin/bin.x86
directory and get on with it if that isn't too distasteful to you

Karl
Re: ERROR_MOD_NOT_FOUND when using call_external [message #37353 is a reply to message #37340] Tue, 09 December 2003 04:23 Go to previous message
Brian is currently offline  Brian
Messages: 27
Registered: March 2001
Junior Member
If I can have IDL use fftw at a time savings of 2-5 times for very large
arrays, then the day I have spent looking into it is utterly insignificant.
That and the fact that I can spend $0 to implement fftw in IDL for all my
colleagues, compared with new motherboard, new CPU (and my purchasing dept
would not go for that anyway), makes it a no-brainer for me to expend some
effort.

Matlab6 already uses the library, so I doubt it is that fragile. Matlab is
my program of choice, but I am a visiting engineer at my institute and am
trying to get their FFTs in IDL sped up.

later,

brian

"Craig Markwardt" <craigmnet@REMOVEcow.physics.wisc.edu> schrieb im
Newsbeitrag news:onsmju9vz0.fsf@cow.physics.wisc.edu...
>
> "Brian" <brian.huether@NOdlrSPAM.de> writes:
>
>> I got the fftw binary from www.fftw.org and am trying to call it from
IDL. I
>> have searched the forum and have found little info about this error.
> ...
>>
>> Any ideas?
>
> I guess one question I have is, are you really saving that much of
> your time, considering that you have already spent a day or more
> playing around with external libraries?
>
> And, if you really are compute bound, why not add some more CPUs? Why
> add the fragility of an external library?
>
> Craig
>
> --
> ------------------------------------------------------------ --------------
> Craig B. Markwardt, Ph.D. EMAIL: craigmnet@REMOVEcow.physics.wisc.edu
> Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
> ------------------------------------------------------------ --------------
Re: ERROR_MOD_NOT_FOUND when using call_external [message #37354 is a reply to message #37353] Tue, 09 December 2003 01:33 Go to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
"Brian" <brian.huether@NOdlrSPAM.de> writes:

> I got the fftw binary from www.fftw.org and am trying to call it from IDL. I
> have searched the forum and have found little info about this error.
...
>
> Any ideas?

I guess one question I have is, are you really saving that much of
your time, considering that you have already spent a day or more
playing around with external libraries?

And, if you really are compute bound, why not add some more CPUs? Why
add the fragility of an external library?

Craig

--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@REMOVEcow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Do I need a DLM Wrapper for this?
Next Topic: Windows XP memory limitation?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 17:32:01 PDT 2025

Total time taken to generate the page: 0.01428 seconds