From 97243785fcaa7670c056d7337df19f349509beab Mon Sep 17 00:00:00 2001 From: edoapra Date: Fri, 21 Jun 2019 09:42:53 -0700 Subject: [PATCH] removed Fortran entry https://github.com/nwchemgit/nwchem/issues/60 --- src/selci/minit.F | 31 ++++++++++++++++++++----------- src/selci/selci_minit.fh | 6 ++++++ 2 files changed, 26 insertions(+), 11 deletions(-) create mode 100644 src/selci/selci_minit.fh diff --git a/src/selci/minit.F b/src/selci/minit.F index 86e241ef66..f66f4aa576 100644 --- a/src/selci/minit.F +++ b/src/selci/minit.F @@ -21,13 +21,7 @@ c implicit integer (a-z) integer llword !< [Input] The maximum number of words c #include "errquit.fh" -c - integer lword, ltop, lmax, lmin, junk, nword, iad, mfr -c - integer selci_mptr, selci_mleft, selci_mfree, selci_mstats -c - common /selci_corep/ lword, ltop, lmax, lmin - save /selci_corep/ +#include "selci_minit.fh" c c initialise the memory management ... simple single direction c stack ... removed ability to grow from top down also @@ -42,18 +36,25 @@ c lword = llword selci_minit = 0 return + end c - entry selci_mleft(junk) + integer function selci_mleft(junk) c c return the no. of REAL words free c + implicit none +#include "selci_minit.fh" selci_mleft = lword - ltop return + end c - entry selci_mptr(nword) + integer function selci_mptr(nword) c c return pointer into REAL stack for nword REALS c + implicit none +#include "errquit.fh" +#include "selci_minit.fh" if (nword.lt.0) call errquit('MALOC: nword < 0',nword, INPUT_ERR) mfr = lword - ltop if (nword .le. mfr) then @@ -62,26 +63,34 @@ c lmin = max0(ltop,lmin) return else + selci_mptr=0 write (6,20) nword,mfr 20 format(///' core request:',i10,5x,'available:',i10/) call errquit('MPTR: need this much more memory', nword-mfr, & MEM_ERR) endif + end c - entry selci_mfree(iad) + integer function selci_mfree(iad) c c free REAL memory back to this pointer c + implicit none +#include "selci_minit.fh" +#include "errquit.fh" if (iad.lt.1 .or. iad.gt.(ltop+1)) $ call errquit('MFREE: invalid argument',iad, INPUT_ERR) ltop = iad - 1 selci_mfree = 0 return + end c - entry selci_mstats(junk) + integer function selci_mstats(junk) c c print out statistics about core usage c + implicit none +#include "selci_minit.fh" write (6,30) lmin,lword-lmin 30 format(/' minimal core high water =',i10, 1 ' real numbers (spare =',i10,')') diff --git a/src/selci/selci_minit.fh b/src/selci/selci_minit.fh new file mode 100644 index 0000000000..df2bc92bb4 --- /dev/null +++ b/src/selci/selci_minit.fh @@ -0,0 +1,6 @@ +c + integer lword, ltop, lmax, lmin, junk, nword, iad, mfr +c +c + common /selci_corep/ lword, ltop, lmax, lmin + save /selci_corep/