EGSnrc
EGSnrc copied to clipboard
Installation issue for modern gcc versions
I had to do a clean reinstall on my system. On install I got the following error:
Compiling pegs4 ... Failed
See configure.log for the output of make
In file configure.log the following info is shown:
Compiling pegs4_linux.f with flags '-fPIC -O2 -mtune=native'
pegs4_linux.f:3855:16:
3855 | QD=DCADRE(F,ADUM,BDUM,1.E-16,1.E-5,ERRDUM,IER)
| 1
Error: Interface mismatch in dummy procedure ‘f’ at (1): 'f' is not a function
pegs4_linux.f:1723:49:
1723 | IF((QFIT(NJ,XL,XU,XR,EP,ZTHR,ZEP,REM,NIP,XFUN,XFI, AX,BX,NALM,NF
| 1
Error: Interface mismatch in dummy procedure ‘xfun’ at (1): 'xfun' is not a function
pegs4_linux.f:1740:50:
1740 | IF ((QFIT(NJ,XL,XU,XR,EP,ZTHR,ZEP,REM,NIP,XFUN,XFI, AX,BX,NALM,N
| 1
Error: Interface mismatch in dummy procedure ‘xfun’ at (1): 'xfun' is not a function
pegs4_linux.f:1750:52:
1750 | IF((.NOT.QFIT(NI,XL,XU,XR,EP,ZTHR,ZEP,REM,NIP,XFUN,XFI, AX,BX,NALM
| 1
Error: Interface mismatch in dummy procedure ‘xfun’ at (1): 'xfun' is not a function
pegs4_linux.f:288:57:
288 | CALL PWLF1(NGL,NALG,AP,UP,RMT2,EPG,ZTHRG,ZEPG,NIPG,ALOG,EXP, AXG,B
| 1
Error: Interface mismatch in dummy procedure ‘xfun’ at (1): 'alog' is not a subroutine
gmake: *** [Makefile:39: /home/peter/Apps/EGSnrc/HEN_HOUSE/bin/linux/pegs4.exe] Error 1
Failed program was gmake -j12 EGS_CONFIG=/home/peter/Apps/EGSnrc/HEN_HOUSE/specs/linux.conf
Performing a make on /pegs4 forlder yields the following info:
(base) [peter@localhost pegs4]$ make
Compiling pegs4_linux64.f with flags '-fPIC -O2 -mtune=native'
pegs4_linux64.f:3855:16:
3855 | QD=DCADRE(F,ADUM,BDUM,1.E-16,1.E-5,ERRDUM,IER)
| 1
Error: Interface mismatch in dummy procedure ‘f’ at (1): 'f' is not a function
pegs4_linux64.f:1723:49:
1723 | IF((QFIT(NJ,XL,XU,XR,EP,ZTHR,ZEP,REM,NIP,XFUN,XFI, AX,BX,NALM,NF
| 1
Error: Interface mismatch in dummy procedure ‘xfun’ at (1): 'xfun' is not a function
pegs4_linux64.f:1740:50:
1740 | IF ((QFIT(NJ,XL,XU,XR,EP,ZTHR,ZEP,REM,NIP,XFUN,XFI, AX,BX,NALM,N
| 1
Error: Interface mismatch in dummy procedure ‘xfun’ at (1): 'xfun' is not a function
pegs4_linux64.f:1750:52:
1750 | IF((.NOT.QFIT(NI,XL,XU,XR,EP,ZTHR,ZEP,REM,NIP,XFUN,XFI, AX,BX,NALM
| 1
Error: Interface mismatch in dummy procedure ‘xfun’ at (1): 'xfun' is not a function
pegs4_linux64.f:288:57:
288 | CALL PWLF1(NGL,NALG,AP,UP,RMT2,EPG,ZTHRG,ZEPG,NIPG,ALOG,EXP, AXG,B
| 1
Error: Interface mismatch in dummy procedure ‘xfun’ at (1): 'alog' is not a subroutine
make: *** [Makefile:39: /home/peter/Apps/EGSnrc/HEN_HOUSE/bin/linux64/pegs4.exe] Error 1
Any help is appreciated.
Thanks, Pedro
Could you post the complete installation log? It's ok if it's long!
Hi Reid, Thanks for your promptly reply. Here is the configure.log file. Let me know if you need any other specific file configure.log
I think these errors might be related to having a newer fortran version that has removed some backwards compatibility. Can you try an older version of gcc?
Hi Reid, I have 10.1.1 installed but I tried in a virtual machine with ubuntu and gcc 7.5 and worked fine! Thanks for your help.
Thanks for letting us know what worked. I'm going to re-open this issue to serve as a reminder to us that new gcc versions result in installation problems.
Ubuntu and other Debian/Redhat distributions do have methods for installing multiple gcc versions. I have used this in the past to work with multiple parallel versions for testing (config file script needed some work a while back to accommodate this)
For gfortran 10+ there's the option for -std=legacy that should be added to the gfortran standard compiler options
Thanks @crcrewso, I didn't know about the legacy option! That's a satisfactory fix for now.
It'll work for now but it does start the final clock on getting rid of mortran. I doubt that option will continue to work for more than 5-6 years.
When using the -std=legacy option the configure script runs but there are a few failed compilations gcc-10-fedora-configure-linux-peter.log In contrast when using the ubuntu system with the older version of gcc gcc-7-ubuntu-configure-linux-peter.log Everything runs smoothly. I don't know if this helps but maybe I'm missing something. Cheers, Pedro
@peterg1t I saw none of those issues with my install of Fedora 32. Do you have tcl-devel, tk-devel, libgfortran (and devel) libstd-c++ (and -devel) and qt (and qt-x11)
Most of those except for libgfortran-devel
which I can't find
sudo dnf install libgfortran-devel
prints
Error: Unable to find a match: libgfortran-devel
Yup, i misspoke there is no libgfortran-devel configure-linux.log configure-linux-crcrewso.log
@crcrewso while I agree with you that we should move everything away from ancient Mortran, I don't think the issue here is Mortran/Fortran per se. Fortran will be around for longer than 5-6 years in my opinion. The issue is that newer builds of gfortran will force us to update deprecated parts of the Mortran code (while the full rewrite happens). Sometimes I've seen on Windows broken MinGW builds. I haven't looked at the offending lines in pegs4.mortran, but maybe we could try to figure out if there is a small patch required that will keep the ol' boat sailing ... 😉
Where are we on this issue? Was it resolved pull request #648 merged recently?