爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 9756|回复: 8

编译安装WPSV4时出现如下错误

[复制链接]
发表于 2020-6-10 16:44:40 | 显示全部楼层 |阅读模式

登录后查看更多精彩内容~

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
make[2]: 进入目录“/usr/local/WPS/ungrib/src/ngl/g2
Makefile:67: warning: overriding recipe for target `.F.o'
/usr/local/WPS/configure.wps:112: warning: ignoring old recipe for target `.F.o'
Makefile:72: warning: overriding recipe for target `.f.o'
/usr/local/WPS/configure.wps:108: warning: ignoring old recipe for target `.f.o'
Makefile:75: warning: overriding recipe for target `.c.o'
/usr/local/WPS/configure.wps:104: warning: ignoring old recipe for target `.c.o'
gfortran -c -ffixed-form -O -fconvert=big-endian -frecord-marker=4 gridtemplates.f
gfortran -c -ffixed-form -O -fconvert=big-endian -frecord-marker=4 pdstemplates.f
gfortran -c -ffixed-form -O -fconvert=big-endian -frecord-marker=4 drstemplates.f
gfortran -c -ffixed-form -O -fconvert=big-endian -frecord-marker=4 gribmod.f
gfortran -c -ffixed-form -O -fconvert=big-endian -frecord-marker=4 realloc.f
gfortran -c -ffixed-form -O -fconvert=big-endian -frecord-marker=4 intmath.f
intmath.f:207:14:


  207 |       if(iand(i,i-1)/=0) then
      |              1
错误: Arguments of ‘iand’ have different kind type parameters at (1)
intmath.f:172:14:


  172 |       if(iand(i,i-1)/=0) then
      |              1
错误: Arguments of ‘iand’ have different kind type parameters at (1)
make[2]: [intmath.o] 错误 1 (忽略)



因不懂 FORTRAN语言,还请各位老师,同学们帮忙看下如何修改!

intmath.f

7.33 KB, 下载次数: 0, 下载积分: 金钱 -5

intmath.f的原文件

密码修改失败请联系微信:mofangbao
 楼主| 发表于 2020-6-10 16:47:20 | 显示全部楼层
本帖最后由 往前一步是天涯 于 2020-6-10 16:49 编辑

intmath.f原文件:

      module intmath
      implicit none

      interface ilog2
      ! log(x)/log(2)
      module procedure ilog2_8
      module procedure ilog2_4
      module procedure ilog2_2
      module procedure ilog2_1
      end interface ilog2

      interface i1log2
      ! log(x+1)/log(2) unless x=maxint, in which case log(x)/log(2)
      module procedure i1log2_8
      module procedure i1log2_4
      module procedure i1log2_2
      module procedure i1log2_1
      end interface i1log2

      contains

      ! ----------------------------------------------------------------

      function i1log2_8(ival)
      implicit none
      integer(kind=8), value :: ival
      integer(kind=8)::i1log2_8
      integer(kind=8), parameter :: one=1
      if(ival+one<ival) then
         i1log2_8=ilog2_8(ival)
      else
         i1log2_8=ilog2_8(ival+one)
      endif
      end function i1log2_8

      ! ----------------------------------------------------------------

      function i1log2_4(ival)
      implicit none
      integer(kind=4), value :: ival
      integer(kind=4)::i1log2_4
      integer(kind=4), parameter :: one=1
      if(ival+one<ival) then
         i1log2_4=ilog2_4(ival)
      else
         i1log2_4=ilog2_4(ival+one)
      endif
      end function i1log2_4

      ! ----------------------------------------------------------------

      function i1log2_2(ival)
      implicit none
      integer(kind=2), value :: ival
      integer(kind=2)::i1log2_2
      integer(kind=2), parameter :: one=1
      if(ival+one<ival) then
         i1log2_2=ilog2_2(ival)
      else
         i1log2_2=ilog2_2(ival+one)
      endif
      end function i1log2_2

      ! ----------------------------------------------------------------

      function i1log2_1(ival)
      implicit none
      integer(kind=1), value :: ival
      integer(kind=1)::i1log2_1
      integer(kind=1), parameter :: one=1
      if(ival+one<ival) then
         i1log2_1=ilog2_1(ival)
      else
         i1log2_1=ilog2_1(ival+one)
      endif
      end function i1log2_1

      ! ----------------------------------------------------------------

      function ilog2_8(i_in)
      implicit none
      integer(kind=8), value :: i_in
      integer(kind=8)::ilog2_8,i
      ilog2_8=0
      i=i_in
      if(i<=0) return
      if(iand(i,i-1)/=0) then
         !write(0,*) 'iand i-1'
         ilog2_8=1
      endif
      if(iand(i,Z'FFFFFFFF00000000')/=0) then
         ilog2_8=ilog2_8+32
         i=ishft(i,-32)
         !write(0,*) 'iand ffffffff',i,ilog2_8
      endif
      if(iand(i,Z'00000000FFFF0000')/=0) then
         ilog2_8=ilog2_8+16
         i=ishft(i,-16)
         !write(0,*) 'iand ffff' ,i,ilog2_8
      endif
      if(iand(i,Z'000000000000FF00')/=0) then
         ilog2_8=ilog2_8+8
         i=ishft(i,-8)
         !write(0,*) 'iand ff',i,ilog2_8
      endif
      if(iand(i,Z'00000000000000F0')/=0) then
         ilog2_8=ilog2_8+4
         i=ishft(i,-4)
         !write(0,*) 'iand f',i,ilog2_8
      endif
      if(iand(i,Z'000000000000000C')/=0) then
         ilog2_8=ilog2_8+2
         i=ishft(i,-2)
         !write(0,*) 'iand c',i,ilog2_8
      endif
      if(iand(i,Z'0000000000000002')/=0) then
         ilog2_8=ilog2_8+1
         i=ishft(i,-1)
         !write(0,*) 'iand 2',i,ilog2_8
      endif
      end function ilog2_8

      ! ----------------------------------------------------------------

      function ilog2_4(i_in)
      implicit none
      integer(kind=4), value :: i_in
      integer(kind=4)::ilog2_4,i
      ilog2_4=0
      i=i_in
      if(i<=0) return
      if(iand(i,i-1)/=0) then
         !write(0,*) 'iand i-1'
         ilog2_4=1
      endif
      if(iand(i,Z'FFFF0000')/=0) then
         ilog2_4=ilog2_4+16
         i=ishft(i,-16)
         !write(0,*) 'iand ffff' ,i,ilog2_4
      endif
      if(iand(i,Z'0000FF00')/=0) then
         ilog2_4=ilog2_4+8
         i=ishft(i,-8)
         !write(0,*) 'iand ff',i,ilog2_4
      endif
      if(iand(i,Z'000000F0')/=0) then
         ilog2_4=ilog2_4+4
         i=ishft(i,-4)
         !write(0,*) 'iand f',i,ilog2_4
      endif
      if(iand(i,Z'0000000C')/=0) then
         ilog2_4=ilog2_4+2
         i=ishft(i,-2)
         !write(0,*) 'iand c',i,ilog2_4
      endif
      if(iand(i,Z'00000002')/=0) then
         ilog2_4=ilog2_4+1
         i=ishft(i,-1)
         !write(0,*) 'iand 2',i,ilog2_4
      endif
      end function ilog2_4

      ! ----------------------------------------------------------------

      function ilog2_2(i_in)
      implicit none
      integer(kind=2), value :: i_in
      integer(kind=2)::ilog2_2,i
      ilog2_2=0
      i=i_in
      if(i<=0) return
      if(iand(i,i-1)/=0) then
         !write(0,*) 'iand i-1'
         ilog2_2=1
      endif
      if(iand(i,Z'FF00')/=0) then
         ilog2_2=ilog2_2+8
         i=ishft(i,-8)
         !write(0,*) 'iand ff',i,ilog2_2
      endif
      if(iand(i,Z'00F0')/=0) then
         ilog2_2=ilog2_2+4
         i=ishft(i,-4)
         !write(0,*) 'iand f',i,ilog2_2
      endif
      if(iand(i,Z'000C')/=0) then
         ilog2_2=ilog2_2+2
         i=ishft(i,-2)
         !write(0,*) 'iand c',i,ilog2_2
      endif
      if(iand(i,Z'0002')/=0) then
         ilog2_2=ilog2_2+1
         i=ishft(i,-1)
         !write(0,*) 'iand 2',i,ilog2_2
      endif
      end function ilog2_2

      ! ----------------------------------------------------------------

      function ilog2_1(i_in)
      implicit none
      integer(kind=1), value :: i_in
      integer(kind=1)::ilog2_1,i
      ilog2_1=0
      i=i_in
      if(i<=0) return
      if(iand(i,i-1)/=0) then
         !write(0,*) 'iand i-1'
         ilog2_1=1
      endif
      if(iand(i,Z'F0')/=0) then
         ilog2_1=ilog2_1+4
         i=ishft(i,-4)
         !write(0,*) 'iand f',i,ilog2_1
      endif
      if(iand(i,Z'0C')/=0) then
         ilog2_1=ilog2_1+2
         i=ishft(i,-2)
         !write(0,*) 'iand c',i,ilog2_1
      endif
      if(iand(i,Z'02')/=0) then
         ilog2_1=ilog2_1+1
         i=ishft(i,-1)
         !write(0,*) 'iand 2',i,ilog2_1
      endif
      end function ilog2_1
      end module intmath
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
c$$$ TEST PROGRAM FOR THIS MODULE
c$$$      program test_intmath
c$$$      use intmath
c$$$      implicit none
c$$$      real(kind=16) :: temp
c$$$      real(kind=16), parameter :: alog2=log(2.0_16)
c$$$      integer(kind=8), parameter  ::                                    &
c$$$     &     one=1,big=Z'7FFFFFFFFFFFFFFF',small=-2000000_8,              &
c$$$     &     check=Z'1FFFFFFF'
c$$$      integer(kind=8) :: ival, iret
c$$$      !$OMP PARALLEL DO PRIVATE(ival,temp,iret)
c$$$      do ival=small,big
c$$$ 10      format(Z16,' -- MISMATCH: ',I0,'=>',I0,' (',I0,' = ',F0.10,')')
c$$$ 20      format(Z16,' -- OKAY:     ',I0,'=>',I0,' (',I0,' = ',F0.10,')')
c$$$         if(ival+one<ival) then
c$$$            temp=log(real(max(ival,one),kind=16))/alog2
c$$$         else
c$$$            temp=log(real(max(ival+one,one),kind=16))/alog2
c$$$         endif
c$$$         iret=i1log2(ival)
c$$$         if(iret/=ceiling(temp) .or. ival==0 .or. ival==check) then
c$$$            !$OMP CRITICAL
c$$$            if(iret/=ceiling(temp)) then
c$$$               print 10, ival, ival, iret,ceiling(temp),temp
c$$$            else
c$$$               print 20, ival, ival, iret,ceiling(temp),temp
c$$$            endif
c$$$            !$OMP END CRITICAL
c$$$         endif
c$$$      enddo
c$$$      !$OMP END PARALLEL DO
c$$$      end program test_intmath
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

 楼主| 发表于 2020-6-10 17:17:14 | 显示全部楼层
找到问题了   编译器版本过高
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

发表于 2020-6-14 21:41:36 | 显示全部楼层
往前一步是天涯 发表于 2020-6-10 17:17
找到问题了   编译器版本过高

您好!我也遇到了这个问题  请问你是怎么解决的?万分感谢!
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

发表于 2020-6-14 22:49:54 | 显示全部楼层
往前一步是天涯 发表于 2020-6-10 17:17
找到问题了   编译器版本过高

ok 搞定了 把gfortran改到8就好了
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

发表于 2020-7-18 00:00:55 来自手机 | 显示全部楼层
shenxrw 发表于 2020-6-14 22:49
ok 搞定了 把gfortran改到8就好了

您好我也遇到这个问题了,请问您是怎么把gfortran改到8的呢?还有就是原来的编译需要更改吗?
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

发表于 2020-7-18 21:20:33 | 显示全部楼层
czxjly0827 发表于 2020-7-18 00:00
您好我也遇到这个问题了,请问您是怎么把gfortran改到8的呢?还有就是原来的编译需要更改吗?

安装指定版本的gfortran,apt-get 就可以做到
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

发表于 2020-7-18 22:11:28 | 显示全部楼层
L0725 发表于 2020-7-18 21:20
安装指定版本的gfortran,apt-get 就可以做到

感谢感谢。今天已经安装成功啦~~
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

发表于 2021-10-23 14:49:59 | 显示全部楼层
感谢楼主,我也遇到了,安装了gfortran-8,然后再把gfortran-8链接给gfortran就搞定了
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Copyright ©2011-2014 bbs.06climate.com All Rights Reserved.  Powered by Discuz! (京ICP-10201084)

本站信息均由会员发表,不代表气象家园立场,禁止在本站发表与国家法律相抵触言论

快速回复 返回顶部 返回列表