mirror of
https://code.it4i.cz/sccs/easyconfigs-it4i.git
synced 2025-04-17 20:20:49 +01:00
34 lines
767 B
Fortran
Executable File
34 lines
767 B
Fortran
Executable File
SUBROUTINE GETMEM(GETWRD,IFIRST,IPOS)
|
|
#include "MRCCCOMMON"
|
|
integer GETWRD,IFIRST,IPOS
|
|
integer*8 index,mem,xalloc,iloc
|
|
C
|
|
eex=eex+dble(GETWRD)/dble(iintfp)
|
|
if(getwrd.eq.0) return
|
|
MEM=GETWRD*IINTLN
|
|
INDEX=XALLOC(MEM)
|
|
IF(INDEX.EQ.0) THEN
|
|
IPOS=-1
|
|
write(iout,*) 'Request for ',getwrd,' words of memory failed.'
|
|
stop
|
|
RETURN
|
|
ENDIF
|
|
iloc=LOC(IFIRST)
|
|
IPOS=1+(INDEX-iloc)/IINTLN
|
|
C
|
|
RETURN
|
|
END
|
|
C
|
|
subroutine getmemr8(getwrd,ifirst,ipos)
|
|
C Allocate getwrd real*8 word of memory
|
|
#include "MRCCCOMMON"
|
|
integer getwrd,ifirst,ipos,dbladd
|
|
C
|
|
if(getwrd.eq.0) return
|
|
call getmem(iintfp*getwrd,ifirst,ipos)
|
|
ipos=dbladd(ipos)
|
|
C
|
|
return
|
|
end
|
|
C
|