[Pw_forum] Compilation trouble with g95 on AMD64 Athlon 3500

Andrea Ferretti ferretti.andrea at unimore.it
Sun Apr 29 20:46:04 CEST 2007


Dear Merlin,


> 
> I tried to compile espresso-3.2 on an AMD64 Athlon 3.5 GHz, using g95, and I
> have the following error running the example01:
> 
>      from create_directory : error #4294967295
>      unable to create directory ./silicon.save


the error you are experiencing is, I think, a different one with respect 
to that from the post below...

the present one is a run-time error while the one posted was due to a 
complain of the compiler at compile-time...

it seems this is not due to iotk, but rather to the usage of the mkdir 
c-function 

as you can see from the error number (which sounds as random), something 
nasty is occurring...
basically I think the problem is the following:

in the create_directory routine, the error code (which causes the crash if 
different from zero), is directly taken from the call

IF ( ionode ) ierr = c_mkdir( TRIM( dirname ), LEN_TRIM( dirname ) )

that is, it is returned from a wrapper to a c-lib function (mkdir)
since you are on a 64bit architecture, default integers maybe 4bytes 
(32bit) or 
8bytes (64bit) long  (only pointers are alsways 8bytes long! )...
which one depends on the fortran compiler...

I suspect you are using 8bytes default integers, while mkdir is returning 
a 4bytes integer... this may cause the almost random error number and the 
following crash of the code....

if this is the case, try to compile espresso with a flag forcing 
32 bit integers (maybe something like -i4, to be set manually in FFLAGS, 
make.sys file)

otherwise, download the g95 version with 32bit integers as default... 

hope it helps

andrea

> 
> I have seen somewhere that it may be due to a problem with iotk:
> ( http://www.democritos.it/pipermail/pw_forum/2006-October/005151.html )
> 
> > 
> > this is a kind inconsistency in call to intrinsic functions;
> > 
> > such problems have been fixed in the cvs version of espresso
> > substituting lines like
> > 
> > control = modulo(header,iotk_ncontrol+1)
> > 
> > with
> > 
> > control = modulo(header,int(iotk_ncontrol+1,kind=kind(header)))
> > 
> > you can try to repeat the trick for all the lines where the compiler
> > complains, otherwise try to you replace the espresso-3.1.1/iotk/ with
> > espresso_CVS/iotk, it may probably work without any further problem..
> > 
> 


--
Andrea Ferretti
National Research Center S3, CNR-INFM  ( http://s3.infm.it )
Dipartimento di Fisica, Universita' di Modena e Reggio Emilia
Via Campi 213/A I-41100 Modena, Italy
Tel:     +39 059 2055301      Fax:     +39 059 374794
Skype:   andrea_ferretti
URL:     http://www.nanoscience.unimo.it

Please, if possible, don't send me MS Word or PowerPoint attachments
Why? See:  http://www.gnu.org/philosophy/no-word-attachments.html



More information about the users mailing list