プログラム概要
main program
use subroutines
implicit none
integer, parameter :: n = **
real*8 :: x(0:n)
real*8 :: p_input_1, p_input_2, ...
integer :: i
do i = 1, **
! xに関する,計算
write(*,*) i, ! 途中経過 (xの平均等) を表示
end do
call analyse(n,x,prm,***)
stop
end program
module subroutines
implicit none
contains
subroutine analyse(n,x,prm,***)
implicit none
integer, intent(in) :: n
real*8, intent(in) :: x(0:n)
real*8, intent(out) :: prm
! xに関する処理いろいろ
return
end subroutine analyse
end module subroutines
システム
- OS: maxOS High Sierra ver 10.13.5
- コンパイラ: gfortran (gcc ver 6.3.0)
問題点
あるサブルーチン (上記"analyse") を呼ぶか呼ばないかで, 計算の途中経過 (当然, 最終的な結果も)が変わってしまう.
解決策
見えず