Jiggling & Wiggling

2006/06/08

A bug of intel fortran compiler 9.0

Filed under: Software — roylez @ 3:39 上午

Today I was doing some molecular dynamics programming, then it was found that one parameter of the simulation changed strangely. That parameter should be a constant throughtout the run, and the program compiled under compaq visual fortran in windows platform could ran without this error. I first thought this was because the compatiblity of the code migrated from windows, but finaly I was surprised that it was a very silly bug of the compiler: intel fortran compiler 9. Okay, let’s see where that hole is.

My origin code is like the following.

if ( AllowQuenching .eqv. .true. .and. QuenchBegin <= stepcount .and. QuenchEnd > stepcount ) then
refTmp = refTmp + (aimTmp-reftmp)/(QuenchEnd-stepcount)
end if

The variable AllowingQuenching was always set to be .False. so that refTmp would never be changed. But to my surprise when AllowQuenching .eqv. .true. gave a false value, the whole if test gave a .True.!? However, when I replaced AllowQuenching .eqv. .true. with AllowQuenching, everything went well. For a compiler with great reputation, this is really silly.

Advertisements

发表评论 »

还没有评论。

RSS feed for comments on this post. TrackBack URI

发表评论

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / 更改 )

Twitter picture

You are commenting using your Twitter account. Log Out / 更改 )

Facebook photo

You are commenting using your Facebook account. Log Out / 更改 )

Google+ photo

You are commenting using your Google+ account. Log Out / 更改 )

Connecting to %s

通过访问 WordPress.com 创建免费网站或博客.

%d 博主赞过: