Sorry, there is a mistake in my previous post. The BACKSPACE(2) should be BACKSPACE(22).

I was able to reproduce the error (with gfortran 4.8.4 on Ubuntu 14.04 LTS), and changing line 1015 in SRC_mixer/mixer.F


write(22,*)':WARNING: K-list has changed'


write(22,*)':WARNING: K-list has changed'

resolved the error. Though, I only tested it on the TiC volume optimization example. So if anyone wants to do further testing of the fix with ifort and gfortran, I have attached mixer.patch. Just place it in SRC_mixer, and apply it while in that directory with the terminal command:

patch -b mixer.F mixer.patch

Then, recompile with siteconfig (or do it manually: make; cp mixer ..).

The above patch will maintain writing of the "K-list has changed" message to case.scf.

Alternatively, the suggested fix of instead changing line 1015 in SRC_mixer/mixer.F from

write(22,*)':WARNING: K-list has changed'


write(21,*)':WARNING: K-list has changed'

also removed the error when I tried it, but it will write the message to case.scfm instead of case.scf.

On 1/26/2016 9:56 AM, said chibani wrote:
I did "nt find "" "write(22" statements by "write(21"" in mixer.F please give a solution

2016-01-21 18:26 GMT+01:00 Peter Blaha < <>>:

    If the error is really caused by   gfortran  and not by an
    "user-error", you can fix it by:

    cd $WIENROOT/SRC_mixer/
    edit mixer.F     and replace two "write(22" statements by
    "write(21". Then recompile:
    make     and
    cp mixer ..

    Peter Blaha

    On 01/21/2016 12:49 PM, said chibani wrote:

        So thank you but I don't understand this solution give me
        simple ou easy
        solution  if you have another compiler like ifort please pass
        to me
        because I have just gfortran it does not work

        2016-01-21 7:42 GMT+01:00 Gavin Abo <
        < <>>>:

            I don't have a code fix.

            However, my understanding from the information at the
            links is that gfortan was updated to follow the Fortran
        standard for
            the EOF (end of file) marker starting with versions
        greater than
            about 4.5, such that the WIEN2k code has to be adjusted so
        that it
            does not generate that error message (which indicates that
        it caught
            an invalid EOF operation):


            It looks like the recommended solution given in the
        discussions at
            those links was to use a backspace statement in the code.
            the less recommended solutions being to use a different
            like ifort [1] or possibly trying the compiler setting

            Code comments in gfortran.texi:

            Some legacy codes rely on allowing @code{READ} or
        @code{WRITE} after the
            EOF file marker in order to find the end of a file. GNU
        Fortran normally
            rejects these codes with a run-time error message and
        suggests the user
            consider @code{BACKSPACE} or @code{REWIND} to properly
            the file before the EOF marker.  As an extension, the
        run-time error may
            be disabled using -std=legacy. [

            So a backspace statement before the write on line 1015 in
            SRC_mixer/mixer.F (of WIEN2k 14.2)

            write(22,*)':WARNING: K-list has changed'

            or perhaps somewhere before/after one or both of the read
            (line 161 or 174 or 183) in SRC_mixer/scfana.f would
        probably fix
            the problem.

            On 1/20/2016 7:32 AM, said chibani wrote:

                thank you for the solution  but there is another problem
                when he optimize I lanch this point -10  -5 0  5  10  in
                example Tic
                  S.vns -> ./S_vol_-10.0_default.vns
                    S.vnsup -> ./S_vol_-10.0_default.vnsup
                    S.vnsdn -> ./S_vol_-10.0_default.vnsdn
                    S.r2v -> ./S_vol_-10.0_default.r2v
                    S.r2vdn -> ./S_vol_-10.0_default.r2vdn

                broyden files deleted, clm*, dmat*, vorb*, vresp*,
        eece*, vsp*,
                vns*, scf, struct and input files saved under

                running dstart in single mode
                STOP DSTART ENDS
                3.3u 0.0s 0:03.40 99.7% 0+0k 0+392io 0pf+0w
                0.0u 0.0s 0:00.05 100.0% 0+0k 0+352io 0pf+0w
                clmextrapol_lapw has generated a new S.clmsum
                hup: Command not found.
                STOP  LAPW0 END
                STOP  LAPW1 END
                STOP  LAPW2 END
                STOP  CORE  END
                At line 1015 of file mixer.F (unit = 22, file = 'S.scf')
                Fortran runtime error: Sequential READ or WRITE not
                after EOF marker, possibly use REWIND or BACKSPACE

                >   stop error
                ERROR status in S_vol__-5.0

            Wien mailing list
            SEARCH the MAILING-LIST at:

        Wien mailing list
        SEARCH the MAILING-LIST at:

    Peter BLAHA, Inst.f. Materials Chemistry, TU Vienna, A-1060 Vienna
Phone: +43-1-58801-165300 <tel:%2B43-1-58801-165300> FAX: +43-1-58801-165982 <tel:%2B43-1-58801-165982>
    <> WIEN2k:

<                         write(22,*)':WARNING: K-list has changed'
>                         BACKSPACE(22)
>                         write(21,*)':WARNING: K-list has changed'
Wien mailing list

Reply via email to