Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

gfortran compilation error with format

Status
Not open for further replies.

moritzhoefert

Technical User
Sep 22, 2011
2
DE
Dear all,

I downloaded a source code called mfix. When I try to compile it, the compiler complains about a format error. Since I am totally new to fortran I don't know, what that message means.

I am surprised to get such an error because the code is from reliable programmers and they don't release anything "incompilable".

Has anyone of you encountered such errors and knows how to fix them? Thanks for any hints!

gfortran -c -I. -fconvert='big-endian' -ffree-form -I/home/hoefert/programs/mf ix/model/dmp_modules/mpi_donothing -O3 ./des/randomno_mod.f
./des/randomno_mod.f:107.54:

write(*,'(7X,A,2X,ES)') 'specified mean =', mean
1
Error: Period required in format specifier at (1)

Best regards,
Moritz
 
The format descriptor ES is insufficient : you need to add the length of the final string representing the real value, as well as the number of decimal values. Try something like :

write(*,'(7X,A,2X,ES12.5)') 'specified mean =', mean


François Jacq
 
Thank you for the reply. Before I start using sed excessively: are there any compilier options that make the compiler more forgiving in such cases?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top