times-software / feff10

Other
24 stars 14 forks source link

gfortran11 fails to compile feff10: Error: Line truncated at (1) [-Werror=line-truncation] #17

Closed yurivict closed 2 years ago

yurivict commented 2 years ago
cd FF2X; ifort  -c -O3 -DFEFF -I../ATOM -I../BAND -I../COMMON -I../COMPTON -I../CRPA -I../DEBYE -I../DMDW -I../EELS -I../EELSMDFF -I../ERRORMODS -I../EXCH -I../FF2X -I../FMS -I../FOVRG -I../FULLSPECTRUM -I../GENFMT -I../IOMODS -I../KSPACE -I../LDOS -I../MATH -I../MKGTR -I../MODS -I../PAR -I../PATH -I../POT -I../RDINP -I../RHORRP -I../RIXS -I../SCREEN -I../SELF -I../SFCONV -I../TDLDA -I../XSPH -I../INPGEN m_thermal_xscorr.f90
m_thermal_xscorr.f90:140:132:

  140 |       WRITE(149, '(20E20.10E3)') DBLE(omega(ie)), DBLE(cchi(ie)), DIMAG(cchi(ie)), DBLE(dummy), DBLE(xmu0), DIMAG(xmu0), DBLE(fermiDirac(z1,tk,efermi))
      |                                                                                                                                    1
Error: Line truncated at (1) [-Werror=line-truncation]
m_thermal_xscorr.f90:140:132:

  140 |       WRITE(149, '(20E20.10E3)') DBLE(omega(ie)), DBLE(cchi(ie)), DIMAG(cchi(ie)), DBLE(dummy), DBLE(xmu0), DIMAG(xmu0), DBLE(fermiDirac(z1,tk,efermi))
      |                                                                                                                                    1
Error: Syntax error in argument list at (1)
m_thermal_xscorr.f90:692:132:

  692 |       WRITE(9991,'(20E20.10E3)') DBLE(z1), DIMAG(z1), DBLE(f1), DBLE(f2), DBLE(f1*f2*cauchy(z1,omega,xloss)), DBLE(emxs(ic+1)-emxs(ic))
      |                                                                                                                                    1
Error: Line truncated at (1) [-Werror=line-truncation]
m_thermal_xscorr.f90:692:132:

  692 |       WRITE(9991,'(20E20.10E3)') DBLE(z1), DIMAG(z1), DBLE(f1), DBLE(f2), DBLE(f1*f2*cauchy(z1,omega,xloss)), DBLE(emxs(ic+1)-emxs(ic))
      |                                                                                                                                    1
Error: Invalid form of array reference at (1)
f951: some warnings being treated as errors

OS: FreeBSD 13

jjkas commented 2 years ago

Can you try adding the -fpp flag to the compile flags?

On Sat, Oct 29, 2022 at 12:06 PM @. @.> wrote:

cd FF2X; ifort -c -O3 -DFEFF -I../ATOM -I../BAND -I../COMMON -I../COMPTON -I../CRPA -I../DEBYE -I../DMDW -I../EELS -I../EELSMDFF -I../ERRORMODS -I../EXCH -I../FF2X -I../FMS -I../FOVRG -I../FULLSPECTRUM -I../GENFMT -I../IOMODS -I../KSPACE -I../LDOS -I../MATH -I../MKGTR -I../MODS -I../PAR -I../PATH -I../POT -I../RDINP -I../RHORRP -I../RIXS -I../SCREEN -I../SELF -I../SFCONV -I../TDLDA -I../XSPH -I../INPGEN m_thermal_xscorr.f90 m_thermal_xscorr.f90:140:132:

140 | WRITE(149, '(20E20.10E3)') DBLE(omega(ie)), DBLE(cchi(ie)), DIMAG(cchi(ie)), DBLE(dummy), DBLE(xmu0), DIMAG(xmu0), DBLE(fermiDirac(z1,tk,efermi)) | 1 Error: Line truncated at (1) [-Werror=line-truncation] m_thermal_xscorr.f90:140:132:

140 | WRITE(149, '(20E20.10E3)') DBLE(omega(ie)), DBLE(cchi(ie)), DIMAG(cchi(ie)), DBLE(dummy), DBLE(xmu0), DIMAG(xmu0), DBLE(fermiDirac(z1,tk,efermi)) | 1 Error: Syntax error in argument list at (1) m_thermal_xscorr.f90:692:132:

692 | WRITE(9991,'(20E20.10E3)') DBLE(z1), DIMAG(z1), DBLE(f1), DBLE(f2), DBLE(f1f2cauchy(z1,omega,xloss)), DBLE(emxs(ic+1)-emxs(ic)) | 1 Error: Line truncated at (1) [-Werror=line-truncation] m_thermal_xscorr.f90:692:132:

692 | WRITE(9991,'(20E20.10E3)') DBLE(z1), DIMAG(z1), DBLE(f1), DBLE(f2), DBLE(f1f2cauchy(z1,omega,xloss)), DBLE(emxs(ic+1)-emxs(ic)) | 1 Error: Invalid form of array reference at (1) f951: some warnings being treated as errors

OS: FreeBSD 13

— Reply to this email directly, view it on GitHub [github.com] https://urldefense.com/v3/__https://github.com/times-software/feff10/issues/17__;!!K-Hz7m0Vt54!gF65NtkMVNGresLzOMjOLH08I2jxeqJ0Q3eyy7MbGnb04POU8TjN8qc9ttqkpNZOdpkbu6eZcpBalbWu-ZZjjQ$, or unsubscribe [github.com] https://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/AA2RF22TO334KFRVEIOPMPTWFVYUDANCNFSM6AAAAAARR5HP5A__;!!K-Hz7m0Vt54!gF65NtkMVNGresLzOMjOLH08I2jxeqJ0Q3eyy7MbGnb04POU8TjN8qc9ttqkpNZOdpkbu6eZcpBalbUIGco1LA$ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

-- Joshua Kas (He/Him/His) Research Assistant Professor University of Washington

yurivict commented 2 years ago

Thanks.

Adding -ffree-line-length-512 helped.