forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

%ss and browse_for_folder@ under 64bit
Goto page Previous  1, 2, 3, 4, 5, 6  Next
 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> 64-bit
View previous topic :: View next topic  
Author Message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Mon Jun 20, 2016 8:29 am    Post subject: Reply with quote

The ichar failure has now been fixed but probably not in time for the impending new release.

high_res_clock@ seems to work OK for me. The documentation is out of date but it should be OK if used as in the documented sample. You must declare the type of the return as REAL(2). For both 32 bit and 64 bits it uses QueryPerformanceFrequency which is also used by SYSTEM_CLOCK. So the results should be similar. However, for safety I have made the internal code for 64 bit high_res_clock@ to be the same as that for SYSTEM_CLOCK.

Note that high_res_clock@ is provided so that legacy code can be ported. For future portability, something like SYSTEM_CLOCK is preferred assuming it provides sufficient accuracy.
Back to top
View user's profile Send private message AIM Address
Chemie



Joined: 07 Mar 2015
Posts: 49

PostPosted: Wed Jul 06, 2016 9:41 am    Post subject: Re: Reply with quote

Now I'm using FTN95 8.05. When linking some programs, I get an error in SALFLIBC64DLL, there were missing or not defined
__ALLOCATE$ and
__DEALLOCATE@

What can I do?

Thanks

Chemie
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Wed Jul 06, 2016 10:41 am    Post subject: Reply with quote

FTN95 makes calls to __ALLOCATE$ and __DEALLOCATE@ and these are currently located in clearwin64.dll.

It is possible that you have an old clearwin64.dll on your machine that is getting in the way.
Back to top
View user's profile Send private message AIM Address
Chemie



Joined: 07 Mar 2015
Posts: 49

PostPosted: Fri Jul 08, 2016 11:38 am    Post subject: Re: Reply with quote

Sorry, but I have found an other problem.

winapp

program alloctest
use mswin
implicit none

integer*4 a,i3,aerror,xpix,ypix
character*1, dimension(:,:,Smile, allocatable :: picture

i3=3

xpix=73728
ypix=81920
allocate(picture(i3,xpix,ypix),stat=aerror)
a=winio@('%ca[Meldung]&')
a=winio@('%2nlaerror= %wd x,y %wd %wd&',aerror,xpix,ypix)
a=winio@('%2nl%cn%9`bt[OK]')
if (aerror.gt.0) goto 1

picture(1,1,1)='a'
picture(3,73728,81920)='a'

1 end

In this example, I get no Error (aerror=0), when allocating ca. 17 GB (3 x 73728 x 81920), my PC has only 16 GB, this can't go. When I alter the values for xpix and ypix, sometimes aerror will be 1, other times 0.

Thanks Chemie
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Fri Jul 08, 2016 5:52 pm    Post subject: Reply with quote

ALLOCATE calls upon the Windows API function HeapAlloc so any associated problems probably relate to HeapAlloc. My first thought is that HeapAlloc will not restrict the size to the amount of RAM and secondly that the result may depend on what else is running at the time.

The FTN95/ClearWin+ library function GlobalMemoryStatus@ may be useful in this context. See topic 368 in the ClearWin+ enhancements file cwplus.enh.
Back to top
View user's profile Send private message AIM Address
Chemie



Joined: 07 Mar 2015
Posts: 49

PostPosted: Sat Jul 09, 2016 9:13 am    Post subject: Re: Reply with quote

Sorry, but for all options, the result is 0.

winapp

program memorystat
use mswin
implicit none

integer*4 a,i
integer*8 memorystatus

a=winio@('%ca[Meldung]&')
do i=1,7
memorystatus=GlobalMemoryStatus@(i)
a=winio@('%nli= %wd option= %wd&',i,memorystatus)
enddo
a=winio@('%2nl%cn%9`bt[OK]')

end

What is my error?
Thanks Chemie

PS: in case of __ALLOCATE$ and __DEALLOCATE@ I had an old version of clearwin64.dll on my pc.
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Sat Jul 09, 2016 11:40 am    Post subject: Reply with quote

You need to declare the return type of GlobalMemoryStatus@

Code:
program memorystat
integer i
integer*8 GlobalMemoryStatus@
do i=1,7
print*, GlobalMemoryStatus@(i)
enddo
end
Back to top
View user's profile Send private message AIM Address
Chemie



Joined: 07 Mar 2015
Posts: 49

PostPosted: Sat Jul 09, 2016 2:20 pm    Post subject: Re: Reply with quote

Thanks, now it works.

But, could it be, that allocate works only with integer*4, and I could not allocate memory up to 2GB (the highest value of integer*4)? The testprogramm stops at 2GB.

winapp

program alloctest
use mswin
implicit none

integer*8 aerror
integer*8 i,ihmio
integer*1, dimension(Smile, allocatable :: arr

ihmio=100000000

do i= 1,200
allocate(arr(i*ihmio),stat=aerror)
print*, i,i*ihmio
if (aerror.gt.0) goto 1
deallocate(arr)
enddo

1 end

Thanks
Chemie
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Sat Jul 09, 2016 4:00 pm    Post subject: Reply with quote

Yes you have found a bug. It is fixed now and I will see if we can release an interim clearwin64.dll for you.
Back to top
View user's profile Send private message AIM Address
Chemie



Joined: 07 Mar 2015
Posts: 49

PostPosted: Sat Jul 09, 2016 5:37 pm    Post subject: Re: Reply with quote

PaulLaidler wrote:
Yes you have found a bug. It is fixed now and I will see if we can release an interim clearwin64.dll for you.


Thanks for fixing the bug.
In this context (integer*8 <--> integer*4) I can't present big integer*8 values with %wd of winio@. The presentation gives fault values.
Chemie
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Sat Jul 09, 2016 9:39 pm    Post subject: Reply with quote

Yes, %wd is for integer*4 values. I will make a note of this limitation.
Back to top
View user's profile Send private message AIM Address
John-Silver



Joined: 30 Jul 2013
Posts: 1520
Location: Aerospace Valley

PostPosted: Mon Jul 11, 2016 3:11 pm    Post subject: Reply with quote

Reading through the continuation of this post (the 'new' problem since Fri July 6) I'm confused.

My understanding is that the oríginal query related to the ALLOCATE of 17Gb of memory when only 16Gb was physically available resultingin NO error message !

I don't clearly see how this has been resolved.

Later it mentions that there is a 'bug' relating to ALLOCATE only accepting Integer*4 values, thus limiting the allocation to 2Gb.

I'm confused by this latter state because I thought one of the main purposes of x64 was the ability to be able to allocate >2Gb of memory, and since the release I've seen no complaints from our 'heavy' users that this wasn't noq a problem with x64 version .

Is that because in fact ALLOCATE wasn't returning an error, and in fact wasn't allocating what is thught to be allocated, and if so how could that be ?

Has anyone got a clear summary explanation of the post and findings, because it's not clear to me ?

Does Paul's fix thus now allow >2Gb to be allocated whereas before it wasn't ?
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Mon Jul 11, 2016 4:04 pm    Post subject: Reply with quote

John

There is a bug in the current release that limits ALLOCATE to 2GB.
This has been fixed for the next release. Also there may be an interim release of the relevant DLLs in order to keep things moving.

Previously (with 32 bit applications) the whole address space was limited to 2GB. For the moment (for 64 bit applications) a single ALLOCATE is limited to 2GB so I am not that surprised that the bug has not been spotted before.
Back to top
View user's profile Send private message AIM Address
Chemie



Joined: 07 Mar 2015
Posts: 49

PostPosted: Mon Jul 11, 2016 6:39 pm    Post subject: Re: Reply with quote

I think, the problem is only that in the current release, ALLOCATE is limited to 2GB. When the numeric value is > 2GB, ALLOCATE sees only the last 32 bit, this will be a negativ value (e.g. in the range of 2GB to 4 GB) and a positiv value (e.g. in the range of 4GB to 6GB). Therefore somtimes the error will be 0 and other times 1.

How I can get the interim clearwin64.dll?

In the case of %wd with integer*8 I can write the integer*8 value to a string, and present the string with %ws. This works.

Chemie
Back to top
View user's profile Send private message
JohnCampbell



Joined: 16 Feb 2006
Posts: 2554
Location: Sydney

PostPosted: Tue Jul 12, 2016 11:40 am    Post subject: Reply with quote

I have tested recent releases and the allocate size problem is only with Ver. 8.05.0

I have written a program that tests large memory allocation. You may find it an interesting test. You may also want to change the parameter max_gb before trying to run it.

https://www.dropbox.com/s/zlc8sm0iyqlem8b/alloc_test.f90?dl=0
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> 64-bit All times are GMT + 1 Hour
Goto page Previous  1, 2, 3, 4, 5, 6  Next
Page 2 of 6

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group