- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have recently switched to new version of Fortran compiler Dependencies after Building a dll is correctly in the following example Release Build.
When changing w= 0. into w=1. there is an additional amount of needed DLL's (could be seen e.g. in the dependency walker) Why is this? Can you please help me with this issue.
Best Regards
Gnter
---
Minimal example:
SUBROUTINE cwert1(wv)
implicit none
integer v
real w
real :: wv
character*1 zeichen
v = 1
w= 0.
zeichen='-'
select case (zeichen)
case ('-')
v = -1
end select
wv = v*w
end
---
Microsoft Visual Studio 2010Version 10.0.40219.1 SP1Rel
Microsoft .NET Framework
Version 4.0.30319 SP1Rel Installed Version: Professional Microsoft Office Developer Tools 01018-532-2002163-70123
Microsoft Visual Basic 2010 01018-532-2002163-70123
Microsoft Visual C# 2010 01018-532-2002163-70123
Microsoft Visual C++ 2010 01018-532-2002163-70123
Microsoft Visual F# 2010 01018-532-2002163-70123
Microsoft Visual Studio 2010 Team Explorer 01018-532-2002163-70123
Microsoft Visual Web Developer 2010 01018-532-2002163-70123
Crystal Reports Templates for Microsoft Visual Studio 2010 Intel Visual Fortran Package ID: w_fcompxe_2011.7.258
Intel Visual Fortran Composer XE 2011 Update 7 Integration for Microsoft Visual Studio* 2010, 12.1.3518.2010, Copyright (C) 2002-2011 Intel Corporation
Intel C++ Composer XE 2011 Update 7 Package ID: w_ccompxe_2011.7.258
Intel C++ Composer XE 2011 Update 7 Integration for Microsoft Visual Studio* 2010, Version 12.1.1104.2010, Copyright 2002-2011 Intel Corporation
Intel Inspector XE 2011 Update 7
Intel Inspector XE 2011 Update 7, (build 189290), Copyright 2009-2011 Intel Corporation. All rights reserved. Intel VTune Amplifier XE 2011 Update 5
Intel VTune Amplifier XE 2011 Update 5, (build 186533), Copyright 2009-2011 Intel Corporation. All rights reserved.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
But I would have expected a similaroptimisation for w=1.0 to produce wv = -1.0 since the compiler can determine that (a) zeichen is always '-' therfore (b) v is always -1 therefore (c) wv is always -1.0
How this affects the dlls I don't know.
Les
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for your quick reply. I posted a minimal Example. In the original code this optimization is not possible.
I switched the optimization Level to Disable (/Od). I have the same problem...
Gnter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
At /Od, there is no difference in the required DLLs between the two cases. Both make a call to a Fortran library routine _for_cpstr to handle the assignment to zeichen. Whether 0 or 1 is assigned to w makes no difference. This routine call is what pulls in the Fortran run-time DLLs.
With standard optimization, the compiler sees that for the w=0 case that wv will always be set to 0, so it removes everything else. For w=1, while it could, theoretically, notice that v will always be -1, it doesn't do so, so it generates the code to assign to zeichen and do the SELECT CASE.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am working with guenter together.
It is possible to change w=1, if you remark the line v=-1 (!v=-1).
You just need the usual runtimes (no libif-runtimes needed).
Same when you uncomment v=-1 and remark wv = v*w (!wv = v*w).
SUBROUTINE cwert1(wv)
implicit none
integer v
real w
real :: wv
character*1 zeichen
v = 1
w= 1.
zeichen='-'
! select case (zeichen)
! case ('-')
v = -1
! end select
wv = v*w
end
This is working too :
------------------------
SUBROUTINE cwert1(wv)
implicit none
integer v
real w
real :: wv
character*1 zeichen
v = 1
w= 1.
zeichen='-'
! select case (zeichen)
! case ('-')
v = -1
! end select
wv = v*w
wv=ichar(zeichen)
v=ichar(zeichen)
end
There are no runtimes needed. Same Here :
---------------------------------------------------
SUBROUTINE cwert1(wv)
implicit none
integer v
real w
real :: wv
character*1 zeichen
v = 1
w= 1.
zeichen='-'
select case (zeichen)
case ('-')
v = -1
end select
wv = v*w
wv=ichar(zeichen)
v=ichar(zeichen)
end
But whats not working (meaning a bunch of runtimes needed):
-------------------------------------------------------------------------
SUBROUTINE cwert1(wv)
implicit none
integer v
real w
real :: wv
character*1 zeichen
v = 1
w= 1.
zeichen='-'
select case (zeichen)
case ('-')
v = -1
end select
wv = v*w
! wv=ichar(zeichen)
! v=ichar(zeichen)
end

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