getfem-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Getfem-users] GMM++ and Visual Studio 2008


From: Cédric Venet
Subject: Re: [Getfem-users] GMM++ and Visual Studio 2008
Date: Sun, 10 Oct 2010 12:09:55 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; fr; rv:1.9.2.9) Gecko/20100915 Lightning/1.0b2 Thunderbird/3.1.4

Le 09/10/2010 22:34, Danesh Daroui a écrit :

Thanks for your tip. Well, the correct term is _SECURE_SCL and it can be passed to compiler to turn it off by adding /D "_SECURE_SCL=0". But, I have read somewhere that it can make your code

sorry for the typo, I didn't check it first.

unstable and get many runtime crashes. However, I have not tested yet. Microsoft have also announced that

Like I said, its an abi incompatible change (in the STL). So all the library that you like and use the STL must be compiled with this flag. If you do it, there is no problem. If you forget => strange runtime crash. I use this flag for all my project for 3+years and never had any problem. If you see strange bug in the stl, you know where it cames from.


this flag is off by default in release mode in Visual Studio's later version. So the problem is fixed in
Visual Studio 2010.

yes, like I said "well known gotcha which has been fixed in VS2010"


Thanks again for your help,

D.


On 2010-10-09 16:34, Cédric Venet wrote:
WOW! I really hope that this will fix the problem. I will check it tomorrow, but can you please let me know what does this flag do?

check on the internet, its a well known gotcha which has been fixed in VS2010. basically, it disable some iterator checking which is strangely active even in release mode.



Another question! Do I have to add the line

#define _SCL_SECURE 0

to all my header and code sources even source of GMM++ or just on my own source files or even on file is enough?

easiest way is to add  /D"_SCL_SECURE=0" (or the like) to your command line when compiling your code *and* gmm (if its not header only?)
or add it first in all the C++ files.


What about those pragmas you mentioned?

check msdn. if needed add, they must be defined before including the gmn headers.




Thanks



On 2010-10-08 10:09, Cédric Venet wrote:
hi,

try to define _SCL_SECURE=0 (warning ABI incompatible so all the code you link must use this flag)
for code using the stl heavily, it can result in 100x speedup.

perhaps also:

#pragma inline_recursion
#pragma inline_depth

and check all the optimisation are on.

regards
Cédric


On 07/10/2010 23:23, Danesh Daroui wrote:
>































>































> Hi,































>































> I have recently ported our code written with GMM++ to



64-bit















system































> and recompiled the code in Visual Studio 2008. The
weird















thing is































> that when I run the code, GMM++ function compiled with



Visual















Studio































> 2008 has extremely poor performance comparing to the
old















32-bit code































> compiled with MingW on Windows. I also compiled the
code



with















Intel































> C++ Compiler 11.1 in Visual Studio 2008, and the



performance















of































> GMM++ functions were still very very low and they
worked



very















slow.































> What is the reason? I thought, maybe the GMM++ code is



suited















to be































> compiled with gcc, but in the web site it is stated
that



the















code is































> compatible with Intel C++ Compiler 8.0. Has anybody had



same































> experience?































>































> Thanks,































>































> D.































>































>































> _______________________________________________



Getfem-users















mailing































> list address@hidden















https://mail.gna.org/listinfo/getfem-users































>





-- 
Danesh Daroui
Ph.D Student
Lulea University of Technology
http://www.ltu.se

address@hidden
Tel: +46-(0)920-492451
Cell phone: +46-(0)704-399847



-- 
Danesh Daroui
Ph.D Student
Lulea University of Technology
http://www.ltu.se

address@hidden
Tel: +46-(0)920-492451
Cell phone: +46-(0)704-399847


reply via email to

[Prev in Thread] Current Thread [Next in Thread]