- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This might seem a beginner question but I am a little confused. I was able to run one of the MKL examples in win32 configuration on my 64bit machine. When I wrote my own code, it does compile and linke to the 32 bit libraries, but during debug, as soon as it gets to run gemm (fortran 95 interface) it breaks with an access violation. Then I tried to run to compile/build/run in x64 configuration and it runs without a hitch.
I'm assuming that since the example worked, this is a legitimate expectation of the visual studion ide to run and debug 32bit executables. Even though, on a side, I was also wondering how I can run a win32 executable fromt the command line in vista64?
Any advice on direction will be highly appreciated.
alirezA.
I'm assuming that since the example worked, this is a legitimate expectation of the visual studion ide to run and debug 32bit executables. Even though, on a side, I was also wondering how I can run a win32 executable fromt the command line in vista64?
Any advice on direction will be highly appreciated.
alirezA.
Link Copied
5 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - alireza@starlite.ucsd.edu
This might seem a beginner question but I am a little confused. I was able to run one of the MKL examples in win32 configuration on my 64bit machine. When I wrote my own code, it does compile and linke to the 32 bit libraries, but during debug, as soon as it gets to run gemm (fortran 95 interface) it breaks with an access violation. Then I tried to run to compile/build/run in x64 configuration and it runs without a hitch.
I'm assuming that since the example worked, this is a legitimate expectation of the visual studion ide to run and debug 32bit executables. Even though, on a side, I was also wondering how I can run a win32 executable fromt the command line in vista64?
Any advice on direction will be highly appreciated.
alirezA.
I'm assuming that since the example worked, this is a legitimate expectation of the visual studion ide to run and debug 32bit executables. Even though, on a side, I was also wondering how I can run a win32 executable fromt the command line in vista64?
Any advice on direction will be highly appreciated.
alirezA.
Hi,
the only thing you should observe is which libraries you're linking to, 32 or their 64 counterparts. In VS you can easily arrange yourself many different configurations. In general on x64 machine you can build and run both 32 and 64 versions. Just observe your linked libs (the run-time libs are cleverly managed and resolved by Windows itself).
From command line - running -> like every application, use full path or switch to directory where exe is located, type exe name and hit enter.
If you meant building from command line -> you need to run appropriate environment for compiler (see compiler docs) first, and then you can just run script (makefile) to do the job.
A.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - ArturGuzik
Hi,
the only thing you should observe is which libraries you're linking to, 32 or their 64 counterparts. In VS you can easily arrange yourself many different configurations. In general on x64 machine you can build and run both 32 and 64 versions. Just observe your linked libs (the run-time libs are cleverly managed and resolved by Windows itself).
From command line - running -> like every application, use full path or switch to directory where exe is located, type exe name and hit enter.
If you meant building from command line -> you need to run appropriate environment for compiler (see compiler docs) first, and then you can just run script (makefile) to do the job.
A.
Thanks for the reply.
I thought I was careful about this. Here's the libraries I link for win32 config:
mkl_intel_c.lib mkl_blas95.lib mkl_lapack95.lib mkl_intel_thread.lib mkl_core.lib libiomp5md.lib
And here's the x64 config libraries:
mkl_blas95_lp64.lib mkl_lapack95_lp64.lib mkl_intel_lp64.lib mkl_intel_thread.lib mkl_core.lib libiomp5md.lib
I know the error happens in gemm. Is there 32 bit version of the thread/core/libiomp that I have to use?
Thanks a lot,
alirezA.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'd recommend you put the Fortran 95 interfaces(mkl_blas95.lib and mkl_lapack95.lib) first on the link line. In other words, try this:
mkl_blas95.lib mkl_lapack95.lib mkl_intel_c.lib mkl_intel_thread.lib mkl_core.lib libiomp5md.lib
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Todd Rosenquist (Intel)
I'd recommend you put the Fortran 95 interfaces(mkl_blas95.lib and mkl_lapack95.lib) first on the link line. In other words, try this:
mkl_blas95.lib mkl_lapack95.lib mkl_intel_c.lib mkl_intel_thread.lib mkl_core.lib libiomp5md.lib
Thanks Todd, reordering the libraries worked! Could you exlpain why this should matter? At some point I didn't used mkl_intel_c.lib or the other two and I couldn't build the executable, but does this mean there is some redundancy. And why does the order matter, and how should one determine the proper order? Is there a fundamental reason for this or is it just lack of robustness?
Many thanks,
alirezA.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It's often helpful to give the libraries in the order which requires the least re-scanning. The blas95 library satisfies all your blas95 references in terms of references in those other libraries, so this order avoids another search pass. The link advisor tool on the right hand column of the forum ought to give you some help with this.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page