Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28435 Discussions

build a custom dll for MKL routines

Brian_Murphy
New Contributor II
1,035 Views

To combat file bloat, I am trying to build a custom DLL with a subset of MKL routines by following the instructions given here.  But I can't even get out the gate.

I tried their following simple example:

#source Visual Studio environment variables
call vcvarsall.bat x86
#run custom dll builder script
nmake ia32

 and got this:

**********************************************************************
** Visual Studio 2019 Developer Command Prompt v16.7.7
** Copyright (c) 2020 Microsoft Corporation
**********************************************************************

C:\Users\Cheers\Documents\Visual Studio 2019\Projects\Xlrotor>"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" x86
**********************************************************************
** Visual Studio 2019 Developer Command Prompt v16.7.7
** Copyright (c) 2020 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x86'

C:\Users\Cheers\Documents\Visual Studio 2019\Projects\Xlrotor>nmake ia32

Microsoft (R) Program Maintenance Utility Version 14.27.29112.0
Copyright (C) Microsoft Corporation.  All rights reserved.

NMAKE : fatal error U1073: don't know how to make 'ia32'
Stop.

What am I missing?  Have I got the wrong nmake tool?  I tried specifying export=myfilelist.txt but get the same fatal error.

0 Kudos
1 Solution
Brian_Murphy
New Contributor II
963 Views
0 Kudos
5 Replies
jimdempseyatthecove
Honored Contributor III
1,016 Views

Try:

call vcvarsall.bat intel64

x86 is intended to generate as ia32 or x64 as determined at runtime.

Jim Dempsey

0 Kudos
Brian_Murphy
New Contributor II
1,007 Views

Thanks for the suggestion, Jim.

When I tried intel64 it tells me that is not a valid option.  I was able to get it to work with compilervars.bat -arch intel64, but nmake still would not work.

Also, ia32 does not appear to be a valid option for nmake.  Is ia32 supposed to be an input file or an option?  Please post the output of nmake -? from your system.

I may have the wrong nmake tool.  For example, it does not have options used in another sample command shown on the web page.   Are there different nmake's from Intel and Microsoft?  The one described on the web page seems to be an Intel one.  The only nmake.exe I can find on my system is from Microsoft.  The x64 version seems to take precedence based on its folder coming first in the command prompt's PATH.

C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\bin\Hostx86\x64\nmake.exe
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\bin\Hostx86\x86\nmake.exe

C:\Users\Cheers\Documents\Visual Studio 2019\Projects\Xlrotor\temp>nmake -?

Microsoft (R) Program Maintenance Utility Version 14.27.29112.0
Copyright (C) Microsoft Corporation.  All rights reserved.

Usage:  NMAKE @commandfile
        NMAKE [options] [/f makefile] [/x stderrfile] [macrodefs] [targets]

Options:

/A Build all evaluated targets
/B Build if time stamps are equal
/C Suppress output messages
/D Display build information
/E Override env-var macros
/ERRORREPORT:{NONE|PROMPT|QUEUE|SEND} Report errors to Microsoft
/G Display !include filenames
/HELP Display brief usage message
/I Ignore exit codes from commands
/K Build unrelated targets on error
/N Display commands but do not execute
/NOLOGO Suppress copyright message
/P Display NMAKE information
/Q Check time stamps but do not build
/R Ignore predefined rules/macros
/S Suppress executed-commands display
/T Change time stamps but do not build
/U Dump inline files
/Y Disable batch-mode
/? Display brief usage message

 

0 Kudos
mecej4
Honored Contributor III
996 Views

Brian, you are barking up the wrong tree. The argument that you have to provide to nmake is the target, which has to be one of the targets provided for and defined in the makefile. The list of targets, from which you have to choose one, is:

  • libia32
  • libintel64
  • dllia32
  • dllintel64
  • help

This is all explained on the page to which you yourself provided a link.

0 Kudos
Brian_Murphy
New Contributor II
991 Views

I'm lost.  Could be the wrong tree, or maybe I can't see the forest through the trees.

I've never used nmake before or any sort of make tool.  So this is all new to me. Does that web page assume you are fluent with nmake?  What's a makefile?

The web page gives nmake ia32 as an example, but it doesn't work.  Is that not a complete command?.

I apologize for being so green at this.  I want to put MKL_DCSRCOO, MKL_ZCSRCOO, PARDISO and MKL_DCSRGEMV in a DLL file by itself.  How is that done?

0 Kudos
Brian_Murphy
New Contributor II
964 Views

I got the answer to my problem from the MKL forum.

0 Kudos
Reply