Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28440 Discussions

need your help for resolve bug in my fortran code!!!

hamid_mosaddeghi
Beginner
359 Views
Hi Dears
for post proccessing of one simulation, I write a code for calculate center-of-mass of molecules.
this file read HISTORY file and write RESULT file, but in output results some data (1 or 3 data of 100 data) is invalid .
please see attach file, for more detail about bug , I changed code and insert command for writing original date below result data. I found that this code read some date incorrectly. for example in attached file you cam see in RESULTs file (output) in line 1192 first column data is " -2.3193E+01", but in original file (input file as HISTORY" in line 11214, this data is "2.1607E+01" why? this error also see in some other lines.
I need your help. Thanks for reply.
0 Kudos
4 Replies
Steven_L_Intel1
Employee
359 Views
Your attachment appears to have been deleted. Please try to attach the file again.
0 Kudos
hamid_mosaddeghi
Beginner
359 Views
Dear Steve
Sorry! I attached file again.
0 Kudos
TimP
Honored Contributor III
359 Views
You don't like to make it easy for yourself or others, do you? Spaces in your tar file name, uggh.
How can you get wrong results with a program which doesn't compile correctly?
If you don't like to ask for compilation error reports, try a compiler which doesn't require such a request:

double precision cx(catatom),cy(catatom),cz(catatom)
1
Error: Expression at (1) must be of INTEGER type, found REAL

It may be a bug in ifort that you must set -stand to get a report for such a serious error.

Why are you setting variables by implicit double precision and trying to read by I format? You didn't say if your goal is to show the strangeness of the error reports. This went out of style 40 years ago, I guess these error cases are no longer a priority for compiler testing.
0 Kudos
hamid_mosaddeghi
Beginner
359 Views
Ok, I compiled it without error with ifort 11.1 under fedora 12 and attched.
but in output file all data that computed by this code are correct but only some data is incorrect.
please help me clear.
Solved Problem!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
0 Kudos
Reply