- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I had this working fine last year. I am calling my Intel Fortran DLL from Anaconda Python using:
```
import sys
import ctypes as ct
lib = ct.CDLL('..\\..\\bin\\Debug\\x64\\solver_lib.dll')
```
Since then, I have been playing with a trial version of NAG to evaluate their solvers. My linker therefore has NLW6I293E_nag.lib in the Additional Dependencies list. Now when I try to run this python script again, on the "lib =" line, I get a popup which says:
> python.exe - Entry Point Not Found
The procedure entry point for_stop_core_quiet could not be located in the dynamic link library C:\Program Files\NAG\NL29\nlw6i293el\bin\NLW6I293E_nag.dll.
Why is this happening? How do I fix it?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That function is part of the Intel Runtime library, libifcore. I am not sure why a NAG-compiled DLL would need Intel's libifcore. You did compile NLW61293E_nag.dll with the nag compiler, correct?
You could try adding the path to Intel's libifcore.dll to your library path environment variable? Really confused why a NAG compiled DLL would need our Intel runtime library.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No I didn't compile NLW61293E_nag.dll, it comes from NAG with their trial. I am using the Intel Compiler for my application, and linking in their LIB.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I apologize, I simply do not understand your application.
You have a Python main program. It is calling into the NAG math libraries? If so, you should not need Intel compiler and libraries at all.
Are you using the Command Line or Visual Studio?
Does your python driver also call other DLLs you compiled with the Intel compiler?
I am having difficulty seeing how this application needs anything from Intel.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry, here is more detail.
I have an application written in Fortran and compiled and linked under Intel Visual Fortran using Microsoft Visual Studio. An EXE plus bunch of DLLs.
Last year I wrote a Python wrapper to run this application. It loads the DLL, locates the entry point, runs it and extracts results using JSON. This all worked fine last year.
Then last month I wanted to trial a NAG optimizer (nothing to do with Python, just the standalone Fortran application), so I downloaded and installed their trial version. This required inclusion of their LIB file (NLW6I293E_nag.lib) into my VFPROJ so that I can call their DLL (NLW6I293E_nag.dll). I did a few tests with mixed results. But the NAG lib remained in my VFPROJ.
Now today I'm revisiting the Python wrapper I worked on last year. And I get the above error. So inclusion of the NAG library leads to the Python error.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It may be that the Intel Runtime libraries are not being found. Specifically libifcore DLLs.
One year ago Intel had a different directory structure. Did you upgrade to the 2024.0 compiler? If so then the location for libifcore has changed. Here is an article on where we store our runtime DLLs.
I'll assume it is the same PC and not a new one from last year.
Do you run the python wrapper from the command line or from within Visual Studio?
If command line, what does
echo %PATH% show for Intel paths, and can you find libifcore in those paths?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I run Python from an Anaconda command prompt, which is:
%windir%\System32\cmd.exe "/K" C:\Users\acf\anaconda3\Scripts\activate.bat C:\Users\acf\anaconda3
I don't see any Intel directories in %PATH% under this cmd
I am running Intel Fortran 64 bit, Version 2021.8.0 Build 20221119_000000
Same PC as last year.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
From the Anaconda command prompt, can you run the oneAPI setvars.bat?
"C:\Program Files (x86)\Intel\oneAPI\setvars.bat"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, that runs.
Also I don't get the Windows pop-up error about the NAG DLL.
However the Anaconda directories are removed from the path after running that batch file. I'm not sure if that will be a problem regarding Python use in the future.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Normally it creates a load of new path directories and puts the existing paths item on the end so it sounds like it failed. Maybe the path exceeds the max length?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
One problem I have encountered regularly wrt DLLs on Windows is that you simply do not always get a message about missing DLLs. Sometimes the program simply stops.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes that is what I normally expect. But it didn't do that. The anaconda directories were at the beginning of the PATH, see left hand bit below.
The right hand bit shows what happened after I ran the Intel BAT file. The anaconda directories were removed (they don't appear later), and replaced by all the Intel directories.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am using the latest version maybe your older one has some issue?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Who knows, I'm using Version 2021.8.0 Build 20221119_000000. It seems to work so I'll leave things as they are until I really need to upgrade.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page