- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
System Type x64-based PC
Processor Intel Core2 Duo CPU P8600 @ 2.40GHz, 2401 Mhz, 2 Core(s), 2 Logical Processor(s)
Intel Parallel Studio XE for Windows* (all tools)
Version 2011 (SP1 Update 2 VS)
Intel Math Kernel Library for Windows*
Version 10.3 (9)
Microsoft Visual Studio 2010
Version 10.0.30319.1 RTMRel
Microsoft .NET Framework
Version 4.0.30319 RTMRel
Intel C++ Composer XE 2011 Update 9 Package ID: w_ccompxe_2011.9.300
Intel C++ Composer XE 2011 Update 9 Integration for Microsoft Visual Studio* 2010, Version 12.1.1109.2010, Copyright 2002-2012 Intel Corporation
Intel Inspector XE 2011 Update 9
Intel Inspector XE 2011 Update 9, (build 218166), Copyright 2009-2012 Intel Corporation. All rights reserved.
Intel VTune Amplifier XE 2011 Update 8
Intel VTune Amplifier XE 2011 Update 8, (build 221625), Copyright 2009-2012 Intel Corporation. All rights reserved.
NB. when I look at VS2010 "about" information it does not show the MKL installed. Should it?The errors coming out from the compilation are all for the use of the MKL_INT declaration of the k variable in the for loop. Example, error is
1>AOptionPricer.cpp(310): warning C4244: 'argument' : conversion from '__int64' to 'const int', possible loss of data
and the related code for this error is
for ( MKL_INT k=0 ; k
complex
cA
cA
}
where the line highlighted for this error in VS2010 is
complex
I am doing complex number arithmetic so need y
my includes are
#include "stdafx.h"
#include "nr3.h"
//#include
#include
#include
#include
#include
#include
#include "interp_1d.h"
#include "interp_linear.h"
#include
#include "fftw3.h"
#include "fftw3_mkl.h"
#include "windows.h"
#include "mkl_service.h"
#include "mkl.h"
#include "mkl_vml.h"
and all are shown as found in vs2010 and as i said i have no link errors, only this conversion error.
I had fixed some of the conversion errors using a static_cast for my call to pow below
for (MKL_INT k=0 ; k
v=pow(static_cast
complex
cA
cA
}
but am stuck for a fix for the aforementioned for loop.
Can you please help?
Thanks
Ian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please also check consistency of compilation flags and linking line with MKL.
It looks like you compiled with ILP64.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It is unlikely that one can help when you show only snippets of code. In particular, you did not display the declarations of of pi, a, v and i.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please also check consistency of compilation flags and linking line with MKL.
It looks like you compiled with ILP64.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi , it compiles ok, but when the code runs the program crashes. If I use standard C++ int instead of MKL_INT it compiles and runs and produces rubbish. Declarations;
VecDoub y ;
VecDoub u;
complex
it needs an array for the int for the vector calculations. MKL_INT worked before , but I'm missing something.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
/OUT:"C:\Users\ianbe\Documents\Visual Studio 2010\Projects\AOptionPricer\x64\Release\AOptionPricer.exe" /INCREMENTAL:NO /NOLOGO /LIBPATH:"C:\Program Files (x86)\Intel\Composer XE 2011 SP1\mkl\lib" /LIBPATH:"C:\FFTProj\fftw-3.3.1-dll64" "C:\FFTProj\fftw-3.3.1.pl1-dll32\libfftw3-3.lib" "C:\FFTProj\fftw-3.3.1.pl1-dll32\libfftw3f-3.lib" "C:\FFTProj\fftw-3.3.1.pl1-dll32\libfftw3l-3.lib" "C:\FFTProj\fftw-3.3.1-dll64\libfftw3-3.lib" "C:\FFTProj\fftw-3.3.1-dll64\libfftw3f-3.lib" "C:\FFTProj\fftw-3.3.1-dll64\libfftw3l-3.lib" "kernel32.lib" "user32.lib" "gdi32.lib" "winspool.lib" "comdlg32.lib" "advapi32.lib" "shell32.lib" "ole32.lib" "oleaut32.lib" "uuid.lib" "odbc32.lib" "odbccp32.lib" /MANIFEST /ManifestFile:"x64\Release\AOptionPricer.exe.intermediate.manifest" /ALLOWISOLATION /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG /PDB:"C:\Users\ianbe\Documents\Visual Studio 2010\Projects\AOptionPricer\x64\Release\AOptionPricer.pdb" /SUBSYSTEM:CONSOLE /OPT:REF /OPT:ICF /PGD:"C:\Users\ianbe\Documents\Visual Studio 2010\Projects\AOptionPricer\x64\Release\AOptionPricer.pgd" /LTCG /TLBID:1 /DYNAMICBASE /NXCOMPAT /MACHINE:X64 /ERRORREPORT:QUEUE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Replace
v=pow(static_cast
by
v = k*k;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
thanks for your help, but the code snippet with a present error is
for ( MKL_INT k=0 ; k
complex
cA
cA
}
what I said earlier is that I had the same error for the code snippet with pow, but had corrected it with the cast, and showed this as working code. The above code with the complex number is an example of a line that does not work as expected.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
here's my C++ command line
/I"C:\Program Files (x86)\Intel\Composer XE 2011 SP1\mkl\include" /I"C:\FFTProj\fftw-3.3.1-dll64" /Zi /nologo /W3 /WX- /O2 /Oi /GL /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_UNICODE" /D "UNICODE" /Gm- /EHsc /GS /Gy /fp:precise /Zc:wchar_t /Zc:forScope /Yu"StdAfx.h" /Fp"x64\Release\AOptionPricer.pch" /Fa"x64\Release" /Fo"x64\Release" /Fd"x64\Release\vc100.pdb" /Gd /errorReport:queue
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
MKL_INTis 32-bit intbecause there is no -DMKL_ILP64 in compilation if header
Note, fftw interface uses just simple int, not MKL_INT.
What MKL libraries are used for linkage? I can see just fftw-3.3.1-dll64
So, could you please prepare isolated testcase to reproduce your problem on our side, including compilation and full link line
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok Victor,
shouldI do this as a win32 or CLR console application?
i remember when in vs2008, there was a problem making vs2008 64bit aware with the .Net framework installed. i think it all broke when this was upgraded on my laptop. So, does using the system namespace make a difference when compiling with MKL?
I'm using
Intel Math Kernel Library
Intel MKL on IA-32
Intel MKL on Intel 64
Intel Math Kernel Library for Windows* Version 10.3 (9)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I recreated the project from new in VS2010 and used a CLR console, but I dont think that matters.
I found I am using the IPL64 option
Configuration Properties ->
Intel Performance Libraries ->
Then for
Use ILP64 Interfaces
I selected NO.
This clears down the conversion warnings , thanks.
I'm now left with an fftw error which I remember was solved by an include of the fftw libraries somewhere, just working out where. i.e. the size_t warnings are all for allocating memory to the fft plan.
1> AOptionPricer_testcase.cpp
1>AOptionPricer_testcase.cpp(467): warning C4244: 'argument' : conversion from 'double' to 'size_t', possible loss of data
1>AOptionPricer_testcase.cpp(468): warning C4244: 'argument' : conversion from 'double' to 'size_t', possible loss of data
1>AOptionPricer_testcase.cpp(469): warning C4244: 'argument' : conversion from 'double' to 'size_t', possible loss of data
1>AOptionPricer_testcase.cpp(470): warning C4244: 'argument' : conversion from 'double' to 'size_t', possible loss of data
1>AOptionPricer_testcase.cpp(471): warning C4244: 'argument' : conversion from 'double' to 'size_t', possible loss of data
1>AOptionPricer_testcase.cpp(472): warning C4244: 'argument' : conversion from 'double' to 'size_t', possible loss of data
1>AOptionPricer_testcase.cpp(473): warning C4244: 'argument' : conversion from 'double' to 'int', possible loss of data
1>AOptionPricer_testcase.cpp(474): warning C4244: 'argument' : conversion from 'double' to 'int', possible loss of data
1>AOptionPricer_testcase.cpp(475): warning C4244: 'argument' : conversion from 'double' to 'int', possible loss of data
1> AssemblyInfo.cpp
1> Generating Code...
1> .NETFramework,Version=v4.0.AssemblyAttributes.cpp
1>AOptionPricer_testcase.obj : warning LNK4248: unresolved typeref token (0100001B) for 'fftw_plan_s'; image may not run
1> AOptionPricer_testcase.vcxproj -> c:\users\ianbe\documents\visual studio 2010\Projects\AOptionPricer_testcase\x64\Debug\AOptionPricer_testcase.exe
========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
http://www.dsprelated.com/showmessage/118138/1.php
but I cant see how to do that in vs2010. i keep getting
1>c:\Users\ianbe\documents\visual studio 2010\Projects\AOptionPricer_testcase\AOptionPricer_testcase\libfftw3l-3.dll : fatal error LNK1107: invalid or corrupt file: cannot read at 0x480
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
so back to microsoft for some help.
Anyway, for this thread Victor you gave the correct answer,
Thanks
Ian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ian
1>AOptionPricer_testcase.obj : warning LNK4248: unresolved typeref token (0100001B) for 'fftw_plan_s'; image may not run
1> AOptionPricer_testcase.vcxproj -> c:\users\ianbe\documents\visual studio 2010\Projects\AOptionPricer_testcase\x64\Debug\AOptionPricer_testcase.exe
========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

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