- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This message is a follow on issue to the message with ID#: 8647. I posted it separately here. It is about porting dll project from CVF to IVF.
Under the compaq visual fortran, I build the dll by linkto the single threaded or multithreaded dll libraries, always, the dll file size is about 2MB. Under the Intel visual Fortran 8.0, no matter what libraries I link to, and in the release mode, the minimum dll file size I can achieve is more than 9MB. Anyone can tell me the difference between CVF and IVF when using linked to the same library and possible difference when I distribute the dll?
Regards,
David
Link Copied
- 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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks tcprince,
After some testing on different configurations, I found out that the dramatical size increase is caused by the enabling of runtime data array and string bound checking. Although same setting is done in CVF, the dll size is very small. However, bug has beenobserved in CVF that such checking on the array bound is not working well. After I remove the checking in IVF, the size come close to the one build under CVF.
Regards,
David
- 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
Try the following code in CVF 6.x
real a(10)
if(a(0).gt.1..and.(.FALSE.)) then !The program should catch the array bound exceedance here.
a(0) = 1.0
endif
print*, 'If you see this message, the exceeds array bound has not been caught here'
stop
end
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try the following code in CVF 6.x
real a(10)
if(a(0).gt.1..and.(.FALSE.)) then !The program should catch the array bound exceedance here.
a(0) = 1.0
endif
print*, 'If you see this message, the exceeds array bound has not been caught here'
stop
end
- 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
I have not thought the compiler has been so clever, how about the following example:
!Test the lower bound validation problem
real a(10)
logical lcondition
print*, 'The following code test the index exceeds array bound can/not be caught'
do i = 1,10
call getcondition(i,lcondition)
if(a(0).gt.1..and.lcondition) then !The program should catch the array bound exceedance here.
a(0) = 1.0
endif
print*, 'If you see this message, the exceeds array bound has not been caught here'
enddo
stop
end
subroutine getcondition(i,lcondition)
logical lcondition
integer i
if(i.le.20) then
lcondition = .FALSE.
else
lcondition = .True.
endif
return
end
As the lcondition is a variable now, if the compiler can remove the if clause again, I just think the compiler is too clever.
David
Message Edited by wu_internet on 04-14-2004 07:50 AM
- 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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks, steve.
In that regard, the intel fortran compiler works just differently. All such "if" will be caught up with the array bound checking. Meanwhile, I do not understand why the switch on the checking will increase the dll file size so dramatically.
David.
- 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