[CPMD-list] one typo and one problem

Juerg Hutter hutter at pci.unizh.ch
Tue Apr 20 11:09:17 CEST 2004


Hi Christian

>   IF(ABC(IAT4).GT.CUT4O) THEN
>   ...
>
> It should probably be
>
>   ...
>   IF(ABCD(IAT4).GT.CUT4O) THEN
>   ...

Thanks a lot. We will fix this.

>
> Furthermore, I encountered a general problem on platforms where CPMD runs
> in 64 bit mode: The routine MEMORY has the argument LENGTH (second argument).
> This argument is of the type INTEGER, and the Variable LEN (calculated from
> LENGTH) is an INTEGER*8 which allows for memory allocations beyond the 32 bit
> limit later on. So all calls to MEMORY have to have a second argument of the
> type INTEGER which limits the memory allocation to 8 times the 32 bit limit
> (in most cases probably 8 x 2 GB = 16 GB). Is that correct?
> I encountered a situation where this is not sufficient: In the routine PROWFN
> (prowfn.F, line 77) there is a call to MEMORY to allocate memory for N4 numbers
> of the type REAL*8. Unfortunately, for my systems N4 does not fit into an
> INTEGER variable, and this makes CPMD stop in the subroutine MEMORY (negative
> value for LENGTH).

The most general fix for this is to switch to 64 bit integers as default
integer variables. Most 64 bit compilers have a switch to set the
default integer either to 32 or 64 bit (normaly the default of the default
is 32 bit). If you do this you also have to change the variable IRAT in
irat.inc to 1 (from 2).

regards

Juerg



More information about the CPMD-list mailing list