Fortran Runtime error: bad real number in item 1 of list input
Hello Guys
i am new to Fortran and I am using the package Quantum espresso to get electron phonon coefficients for monolayer graphene. While applying one of the executables, I got the error: "At line 356 of file q2r.f90 (Unit 51 "a2Fq2r.51") Traceback not availabel: compile with -ftrace=frame or -ftrace=full. Fortran Runtime error: bad real number in item 1 of list input |
Hi and welcome to LinuxQuestions!
This error is due to an incongruity between the input and what the code expects to find (usually in a read statement). Difficult to tell without looking at the source code and the input file. Please, can you post lines around 356th of file q2r.f90 and the first lines of the input file, a2Fq2r.51? |
Thanks very much for your reply: the lines around line 356 in the q2r.f90 file are:
REAL(DP) :: q(3,48), xq, resi character(len=14) :: name ! ALLOCATE (gaminp(3,3,nat,nat,48), gamout(nr1*nr2*nr3,3,3,nat,nat) ) ALLOCATE ( nc (nr1,nr2,nr3) ) write (6,*) write (6,*) ' Preparing gamma for a2F ' write (6,*) ! nr(1) = nr1 nr(2) = nr2 nr(3) = nr3 where line 356 is the "!" line between write and nr(1). The first few lines in the file "a2Fq2r.51" file are: 0.005 -0.07259698305949841 0.0000022184568281107107 1 Dynamical Matrix in cartesian axes q = ( 0.000000000 0.000000000 0.000000000 ) 1 1 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 1 2 -0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 -0.00000000 0.00000000 0.00000000 0.00000000 ...... Of course the rest of the file are calculations for other points (i.e. other than the q=0, 0, 0 point). Thanks for your help. will be waiting for a feedback:) |
Hi.
Here is a driver script that compiles a short Fortran code that, upon reading list-directed data, elicits the same error message as suggested by colucix: Code:
#!/usr/bin/env bash Code:
% ./s1 Best wishes ... cheers, makyo |
All times are GMT -5. The time now is 01:25 PM. |