From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111c93,11734b1d8c3fcb1c X-Google-Attributes: gid111c93,public From: b_duke@my-dejanews.com Subject: Re: A Fortran/C code malloc problem Date: 1999/03/25 Message-ID: <7dc6kt$b48$1@nnrp1.dejanews.com>#1/1 X-Deja-AN: 458737845 References: <7d9vrc$clg$1@nnrp1.dejanews.com> X-Http-Proxy: 1.0 x9.dejanews.com:80 (Squid/1.1.22) for client 138.80.63.85 Organization: Deja News - The Leader in Internet Discussion X-Article-Creation-Date: Thu Mar 25 02:22:29 1999 GMT Newsgroups: comp.os.linux.alpha X-Http-User-Agent: Mozilla/3.01 (Win95; I) In article , Robert Harley wrote: > > b_duke@my-dejanews.com writes: > >[...] > > The problem is that the number returned by malloc is far too > > large giving an offset from X(1) that is far too large. It is > > 182 Gb and can not be converted to an INTEGER*4 > > Well yes. Alpha Linux is a 64-bit O.S. so there is no reason > whatsoever for the difference between two pointers to fit in 32 bits. Yes, I agree with this, but the number still seems enormous. The main code has worked for years on very many machines, including 64-bit machines. It is used regularly on Alphas running Digital Unix for example. In fact most of the development work on the main code is carried out on DU or IBM RS6000s. > > required for the rest of the code to access the memory. > > If the rest of the code requires the difference to fit in 32 bits, > then it is broken. I certainly expect the difference in 8 byte words to fit into 32 bits. Surely the range of mamory addresses is not that large? > > Can anyone explain what is going on here? Have I blundered > > with the code? > > No, you haven't. > > > Can you reproduce this on other alpha linux systems? > > I haven't tried but I'm sure they're all the same. > I would be gratefull if you could try it, particularly if your alpha linux is bang up to date with its software. I do not have much control over the machine I am using. I have just be asked to test whether the code I use can be ported to Alpha linux as they are intending to move the main university research machine over from DU to alpha linux. This is one of the machines used by my research group in Darwin. > Bye, > Rob. Cheers, Brian. -----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own