您好,我也是用abaqus调用fortran子程序计算,但是把数组Fxm和Fym 进行save以后就会报错:forrtl: severe (24): end-of-file during read, unit 55, file D:\temp\xdata.txt。去掉save能算,但是数组Fxm和Fym 全为0了就。想请问您这是为什么,下面是我的代码: 
[Fortran] syntaxhighlighter_viewsource syntaxhighlighter_copycode !定义轴承力矩阵
      dimension Fxm(10001,2)
      dimension Fym(10001,2)
      double precision Fxm,Fym,Fx,Fy,F
      data iread /1/
      save iread
      save Fxm
      save Fym
      
      !只读入一次
      if (iread.eq.1) then
          
          iread=2
          !读入轴承力Fx数据
          open(55,file='D:\temp\xdata.txt',status='old')
          do ix=1,10001
              read(55,*)Fxm(ix,1),Fxm(ix,2)    !循环写入
          end do
          close(55)
      
          !读入轴承力Fy数据
          open(22,file='D:\temp\ydata.txt',status='old')
          do iy=1,10001
              read(22,*)Fym(iy,1),Fym(iy,2)    !循环写入
          end do
          close(22)
          
      end if 
 
已经检查了很多遍txt文件的行数了,和命令对应没错 |