[Debichem-devel] Bug#696349: nwchem: Fortran runtime error: Sequential READ or WRITE not allowed after EOF marker, possibly use REWIND or BACKSPACE

Michael Banck mbanck at debian.org
Wed Dec 19 21:45:22 UTC 2012


Package: nwchem
Version: 6.1-3
Severity: important
Tags: patch

A bug has been reported on the upstream support mailing list:

http://www.emsl.pnl.gov/docs/nwchem/nwchem-support/2012/12/0016._NWCHEM_errors_in_running_nwchem-6.1.1

This bug is not triggered by the currently run reduced test suite, but
e.g. the pspw2 and pspw_md tests trigger the error (this is from pspw2):

|     >>>  JOB STARTED       AT Wed Dec 19 20:01:11 2012  <<<
|          ================ input data ========================
| pseudopotential is not correctly formatted:C.vpp                                             
|
| Generated formatted_filename: ./C.vpp
|  library name resolved from: compiled reference
|  NWCHEM_NWPW_LIBRARY set to: </usr/share/nwchem/libraryps//nwpw/libraryps/>
| Generating 1d pseudopotential for Cl  
|At line 649 of file psp_generator_input.F (unit = 99, file = './junk.inp')
|Fortran runtime error: Sequential READ or WRITE not allowed after EOF marker, possibly use REWIND or BACKSPACE

The code in nwchem_6.1-3 around
src/nwpw/nwpwlib/pseudopotential/psp_generator_input.F:649 is as
follows:

|#if defined(FUJITSU_SOLARIS) || defined(PSCALE) || defined(__crayx1) || defined(MACX)
|           backspace 99
|#endif
|           write(99,*) '<exchange>    pbe96 <end>'
|           write(99,*) '<correlation> pbe96 <end>'
|           close(unit=99)

The 09_backported_6.1.1_fixes.patch in nwchem_6.1-4 and up changes this to 

|#if defined(FUJITSU_SOLARIS) || defined(PSCALE) || defined(__crayx1) || defined(MACX) || defined(GCC46)
|           backspace 99
|#endif
|           write(99,*) '<exchange>    pbe96 <end>'
|           write(99,*) '<correlation> pbe96 <end>'
|           close(unit=99)

However, the source file is compiled in nwchem_6.1-5 as follows:

|gfortran -c -fno-second-underscore -Wall -ffixed-line-length-72
|-ffixed-form -Wno-globals -fdefault-integer-8 -g  -I.
|-I/«PKGBUILDDIR»/src/include
|-I/«PKGBUILDDIR»/src/tools/install/include -DLINUX -DGCC4 -DEXT_INT
|-DGCC4 -DLINUX -DLINUX64 -DPARALLEL_DIAG   psp_generator_input.F

Note the absence of -DGCC46, so the above added define does not trigger,
resulting in the bug still present in nwchem_6.1-5.  The attached patch
to 02_makefile_flags.patch fixes this.


Michael
-------------- next part --------------
--- nwchem-6.1/debian/patches/02_makefile_flags.patch   2012-12-14 13:23:52.000000000 +0100
+++ nwchem-6.1/debian/patches/02_makefile_flags.patch   2012-12-16 14:32:00.000000000 +0100
@@ -23,7 +23,7 @@
  endif
  
 -  DEFINES = -DLINUX
-+  DEFINES = -DLINUX -DGCC4
++  DEFINES = -DLINUX -DGCC4 -DGCC46
 +  FOPTIONS   += -fno-second-underscore -Wall
 +  FOPTIONS   += -ffixed-line-length-72 -ffixed-form
 +  FOPTIMIZE  += -g -O2 
@@ -47,7 +47,7 @@
           endif
         endif
 -       DEFINES  += -DEXT_INT
-+       DEFINES  += -DEXT_INT -DGCC4
++       DEFINES  += -DEXT_INT -DGCC4 -DGCC46
    MAKEFLAGS = -j 1 --no-print-directory
 -     _CPU = $(shell uname -m  )
 +     _CPU_ = $(shell uname -m  )


More information about the Debichem-devel mailing list