1! 2! Copyright (C) 1996-2016 The SIESTA group 3! This file is distributed under the terms of the 4! GNU General Public License: see COPYING in the top directory 5! or http://www.gnu.org/copyleft/gpl.txt. 6! See Docs/Contributors.txt for a list of contributors. 7! 8 module memoryinfo 9 10 use precision, only: i8b 11 12C 13C WordsInteger = number of words of memory for integer variables 14C WordsSP = number of words of memory for single precision variables 15C WordsDP = number of words of memory for double precision variables 16C WordsLogical = number of words of memory for logical variables 17C WordsSC = number of words of memory for single complex variables 18C WordsDC = number of words of memory for double complex variables 19C PeakMemory = maximum amount of dynamic memory used 20C PeakRoutine = routine name where memory peak was reached 21C ByteSize = array of values specifying the size of a word for 22C each data type 23C 24 implicit none 25 26 integer(i8b), save :: 27 . WordsInteger, WordsSP, WordsDP, WordsLogical, WordsSC, WordsDC, 28 . WordsString, WordsLongInt, 29 . PeakMemory, CurrentMemory 30 31 character(len=30), save :: 32 . PeakRoutine 33 34 data 35 . WordsInteger / 0 /, 36 . WordsSP / 0 /, 37 . WordsDP / 0 /, 38 . WordsLogical / 0 /, 39 . WordsSC / 0 /, 40 . WordsDC / 0 /, 41 . WordsString / 0 /, 42 . WordsLongInt / 0 /, 43 . PeakMemory / 0 /, 44 . CurrentMemory / 0 / 45 46 integer, parameter, dimension(8) :: ByteSize = 47#ifdef OLD_CRAY 48 . (/8,8,8,8,8,16,8,8/) 49#else 50 . (/4,4,8,4,8,16,4,8/) 51#endif 52 53 end module memoryinfo 54 55 module diagmemory 56C 57C Stores the factor used to scale the default memory in rdiag/cdiag 58C By increasing this value it is possible to avoid failure to 59C converge eigenvalues. 60C 61C real*8 MemoryFactor : factor by which memory is scaled 62C 63 use precision, only : dp 64 65 implicit none 66 67 real(dp), save :: MemoryFactor 68 69 end module diagmemory 70