24小时热门版块排行榜    

Znn3bq.jpeg
查看: 1625  |  回复: 4

superrice

木虫 (正式写手)

[求助] Fortran90 编译不通过 已有2人参与

请问大神是什么情况,还有怎么能把那个讨厌的默认表情快捷键给去掉啊

subroutine laplacian(f, lapl)

  implicit none

  real(8), intent(in)  :: f(N, N)    ! function whose laplacian is to be taken
  real(8), intent(out) :: lapl(N, N) ! the laplacian


  lapl = 0.0_8


  integer :: ix, iy, k

  integer, parameter :: order = 4
  real(8), allocatable :: c(


  allocate(c(-orderrder))
  c(-orderrder) = (/ &  ! The coefficients of the laplacian...
      -1.785714d-3, 2.539683d-2, -0.2d0, 1.6d0,      &
      -2.847222d0,                                   &
      1.6d0, -0.2d0, 2.539683d-2, -1.785714d-3 /)


  do ix = 1, N
    do iy = 1, N
      lapl(ix, iy) = (0.0_8, 0.0_8)
      do k = -order, order
        if(iy+k>=1 .and. iy+k<=N) lapl(ix, iy) = lapl(ix, iy) + c(k)*f(ix, iy+k)
        if(ix+k>=1 .and. ix+k<=N) lapl(ix, iy) = lapl(ix, iy) + c(k)*f(ix+k, iy)
      end do
    end do
  end do

  lapl = lapl/delta**2


错误:
integer :: ix, iy, k
                      1
Error: Unexpected data declaration statement at (1)
mesh.f90:129.33:

  integer, parameter :: order = 4
                                 1
Error: Unexpected data declaration statement at (1)
mesh.f90:130.30:

  real(8), allocatable :: c(
                              1
Error: Unexpected data declaration statement at (1)
mesh.f90:133.12:

  allocate(c(-orderrder))
            1
Error: Syntax error in ALLOCATE statement at (1)
mesh.f90:134.2:

  c(-orderrder) = (/ &  ! The coefficients of the laplacian...
  1
Error: Unclassifiable statement at (1)
mesh.f90:181.22:

  integer :: ix, iy, k
                      1
Error: Unexpected data declaration statement at (1)
mesh.f90:183.33:

  integer, parameter :: order = 4
                                 1
Error: Unexpected data declaration statement at (1)
mesh.f90:184.30:

  real(8), allocatable :: c(
                              1
Error: Unexpected data declaration statement at (1)
mesh.f90:186.12:

  allocate(c(-orderrder))
            1
Error: Syntax error in ALLOCATE statement at (1)
mesh.f90:187.2:

  c(-orderrder) = (/ &  ! The coefficients of the laplacian...
  1
Error: Unclassifiable statement at (1)
mesh.f90:192.7:

  do ix = 1, N
       1
Error: Symbol 'ix' at (1) has no IMPLICIT type
mesh.f90:193.9:

    do iy = 1, N
         1
Error: Symbol 'iy' at (1) has no IMPLICIT type
mesh.f90:195.10:

      do k = -order, order
          1
Error: Symbol 'k' at (1) has no IMPLICIT type
mesh.f90:195.19:

      do k = -order, order
                   1
Error: Symbol 'order' at (1) has no IMPLICIT type
mesh.f90:140.7:

  do ix = 1, N
       1
Error: Symbol 'ix' at (1) has no IMPLICIT type
mesh.f90:141.9:

    do iy = 1, N
         1
Error: Symbol 'iy' at (1) has no IMPLICIT type
mesh.f90:143.10:

      do k = -order, order
          1
Error: Symbol 'k' at (1) has no IMPLICIT type
mesh.f90:143.19:

      do k = -order, order
                   1
Error: Symbol 'order' at (1) has no IMPLICIT type
make[2]: *** [mesh.o] Error 1
make[2]: Leaving directory `/public/home/qishengzhang/chaowang/script/qd-0.1.0/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/public/home/qishengzhang/chaowang/script/qd-0.1.0'
make: *** [all] Error 2
回复此楼

» 猜你喜欢

» 本主题相关价值贴推荐,对您同样有帮助:

已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

未岸亡灵

铁杆木虫 (著名写手)

暂时离开小木虫


【答案】应助回帖

感谢参与,应助指数 +1
你可以上传附件,帮你看看。这个表情也真逗
2楼2016-09-26 15:22:18
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
CODE:
...

3楼2016-09-26 16:00:26
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

漏网之渔

铁虫 (初入文坛)

【答案】应助回帖

N,delta没定义,语句顺序问题:

subroutine laplacian(f,lapl,N,delta)

   implicit none
   integer :: N,ix,iy,k
   real(8):: delta
   real(8),intent(in)  :: f(N,N)    ! function whose laplacian is to be taken
   real(8),intent(out) :: lapl(N,N) ! the laplacian

   integer,parameter :: order = 4
   real(8),allocatable:: C(

   lapl = 0.0_8

   allocate(c(order+order+1))

   c(-orderrder) = (/ &  ! The coefficients of the laplacian...
       -1.785714d-3,2.539683d-2,-0.2d0,1.6d0,     &
       -2.847222d0,                                  &
       1.6d0,-0.2d0,2.539683d-2,-1.785714d-3 /)


   do ix = 1,N
     do iy = 1,N
       lapl(ix,iy) = (0.0_8,0.0_8)
       do k = -order,order
         if(iy+k>=1 .and. iy+k<=N) lapl(ix,iy) = lapl(ix,iy) + c(k)*f(ix,iy+k)
         if(ix+k>=1 .and. ix+k<=N) lapl(ix,iy) = lapl(ix,iy) + c(k)*f(ix+k,iy)
       end do
     end do
   end do

   lapl = lapl/delta**2

end
4楼2016-10-02 11:25:05
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

漏网之渔

铁虫 (初入文坛)

【答案】应助回帖

系统把":"和"",以及":"与"o" 合并成表情符号了,在冒号后面加上空格就可避免。
subroutine laplacian(f,lapl,N,delta)

   implicit none
   integer :: N,ix,iy,k
   real(8):: delta
   real(8),intent(in)  :: f(N,N)    ! function whose laplacian is to be taken
   real(8),intent(out) :: lapl(N,N) ! the laplacian

   integer,parameter :: order = 4
   real(8),allocatable:: C(: )

   lapl = 0.0_8

   allocate(c(order+order+1))

   c(-order: order) = (/ &  ! The coefficients of the laplacian...
       -1.785714d-3,2.539683d-2,-0.2d0,1.6d0,     &
       -2.847222d0,                                  &
       1.6d0,-0.2d0,2.539683d-2,-1.785714d-3 /)


   do ix = 1,N
     do iy = 1,N
       lapl(ix,iy) = (0.0_8,0.0_8)
       do k = -order,order
         if(iy+k>=1 .and. iy+k<=N) lapl(ix,iy) = lapl(ix,iy) + c(k)*f(ix,iy+k)
         if(ix+k>=1 .and. ix+k<=N) lapl(ix,iy) = lapl(ix,iy) + c(k)*f(ix+k,iy)
       end do
     end do
   end do

   lapl = lapl/delta**2

end
5楼2016-10-02 11:39:58
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
相关版块跳转 我要订阅楼主 superrice 的主题更新
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[基金申请] 今年审到国自然15份,谈谈感受 +15 国自然国社科中 2026-05-17 15/750 2026-05-18 14:17 by 能丫
[基金申请] 面上本子正文33页,违规吗?会被低分嘛? +6 1234567wang 2026-05-17 7/350 2026-05-18 13:12 by 443933501
[基金申请] 重磅!青年科学基金项目(C类)资助增幅预计超过50% +7 水和泥不是水泥 2026-05-13 10/500 2026-05-18 07:50 by 水和泥不是水泥
[找工作] 售SCI一区T0P文章,我:8.O.5.5.1.O.5.4,科目齐全,可+急 +5 l7k6xnh0yc 2026-05-14 5/250 2026-05-17 19:39 by Equinoxhua
[考研] 售SCI一区T0P文章,我:8.O.5.5.1.O.5.4,科目齐全,可+急 +6 cjf4bx70cj 2026-05-14 7/350 2026-05-17 18:49 by Equinoxhua
[考博] 2026博士还有哪些学校有名额 +6 小王求读研 2026-05-15 7/350 2026-05-17 16:54 by 知音湖畔
[考研] 售SCI一区T0P文章,我:8.O.5.5.1.O.5.4,科目齐全,可+急 +4 v9tggjlwd0 2026-05-15 4/200 2026-05-17 08:11 by 11n4dfd8yn
[找工作] 售SCI一区T0P文章,我:8.O.5.5.1.O.5.4,科目齐全,可+急 +3 l7k6xnh0yc 2026-05-14 6/300 2026-05-17 07:31 by 11n4dfd8yn
[公派出国] 售SCI一区T0P文章,我:8.O.5.5.1.O.5.4,科目齐全,可+急 +6 l7k6xnh0yc 2026-05-14 6/300 2026-05-17 07:16 by 11n4dfd8yn
[博后之家] 售SCI一区T0P文章,我:8.O.5.5.1.O.5.4,科目齐全,可+急 +4 k37jurhrau 2026-05-16 4/200 2026-05-17 01:35 by ue3ir18jc3
[考博] 售SCI一区T0P文章,我:8.O.5.5.1.O.5.4,科目齐全,可+急 +3 ky2p12rrjj 2026-05-15 4/200 2026-05-17 00:57 by ue3ir18jc3
[考研] 售SCI一区T0P文章,我:8.O.5.5.1.O.5.4,科目齐全,可+急 +3 ky2p12rrjj 2026-05-15 4/200 2026-05-17 00:50 by ue3ir18jc3
[考博] 现在不知道怎么办,感觉很痛苦 +5 qweww 2026-05-11 6/300 2026-05-16 19:57 by Equinoxhua
[高分子] 本人最近太闲了,谁有问题可以提,每天会统一回复 +9 一切都是空工 2026-05-12 20/1000 2026-05-16 19:52 by Equinoxhua
[硕博家园] 售SCI一区T0P文章,我:8.O.5.5.1.O.5.4,科目齐全,可+急 +4 x0mp7owy2b 2026-05-15 4/200 2026-05-16 17:45 by j6b2pdz07o
[有机交流] 求有机合成大神指点三硫酸乙烯酯(CAS:2793408-99-6)的合成路线 30+3 Leekmid 2026-05-13 10/500 2026-05-16 16:37 by czyzsu
[有机交流] 如何实现卤原子转化 +3 BT20230424 2026-05-15 5/250 2026-05-16 16:20 by czyzsu
[硕博家园] 售SCI一区T0P文章,我:8.O.5.5.1.O.5.4,科目齐全,可+急 +3 k37jurhrau 2026-05-16 3/150 2026-05-16 13:57 by vcdazktkjx
[教师之家] 教学课件你会给同学吗 +8 硕士研究生吗 2026-05-13 8/400 2026-05-14 22:23 by 常规沥青
[考博] 材料类只有一篇综述能申博么 +4 乐逍遥谷 2026-05-13 4/200 2026-05-14 12:05 by zhyzzh
信息提示
请填处理意见