Gamit Compile Errors Fix

1. orbdif.f Compile Error

1.1 Error Describe

Environment:

Time    : 2018-06-21
Platform: gcc version 8.1.1 20180531 (GCC)
Kernel  : 4.14.48
Distro  : Manjaro
Gamit   : 10.5

Error Message after execute ./install_software:

gfortran -O3 -Wuninitialized -fno-f2c -ffast-math -fno-automatic -fno-backslash orbdif.f orbdif_lib.a ../lib/gamit_lib.a ../../libraries/comlib/com_lib.a  -o orbdif
orbdif.f:142:38:
      *          delt,nrec,nprn,orbtyp,org,crdsys,spfmt)
                                      1
Error: Actual argument contains too few elements for dummy argument ‘org’ (6/8) at (1)
orbdif.f:149:38:
      *          delt,nrec,nprn,orbtyp,org,crdsys,spfmt)
                                      1
Error: Actual argument contains too few elements for dummy argument ‘org’ (6/8) at (1)
make: *** [Makefile:78: orbdif] Error 1
Failure in make_gamit -- install_software terminated

1.2 Reason

Gfortran 8.1 have been released with some changes, one of them describes as follow:

When an actual argument contains too few elements for a dummy argument, an error is now issued. The -std=legacy option can be used to still compile such code.

1.3 Solution

Add -std=legacy to gfortran’s compile option. Open file libraries/Makefile.config and Search OS_ID Linux, under the line, there is FFLAGS option as follow:

FFLAGS = -O3 -Wuninitialized -fno-f2c -ffast-math -fno-automatic -fno-backslash

And then add -std=legacy option and then recompile.

此条目发表在GAMIT分类目录,贴了标签。将固定链接加入收藏夹。

1 则回应给 Gamit Compile Errors Fix

  1. 今日新闻说: 2018年8月8日 下午11:54
    Google Chrome 55 Google Chrome 55 Windows 7 Windows 7

    文章不错非常喜欢

发表评论

电子邮件地址不会被公开。