由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - 请教Fortran编程高手并问一下OpenMP的问题
相关主题
OpenMP的问题-The process cannot access the file because it is being used by another process32/64bit Fortran编译器造成的错误
如何在fortran中定义一个动态的数组?问个简单的Fortran问题
问个fortran的问题一个naive的问题——是否有这种工具?
FORTRAN 90 菜鸟问题How are parameters passed between ANSI C subroutines?
怎样解决fortran程序中的common块的问题QuickBasic grammer question
一个fortran问题:请看看这个Perl random sampling code 有什么问题,
fortran里面common的问题问个有关Perl Subroutine 转换到Module的问题
MPI xl fortran problem on Blue Genesetjmp() and longjmp()
相关话题的讨论汇总
话题: part话题: c2话题: c1话题: enddo话题: fortran
进入Programming版参与讨论
1 (共1页)
gw
发帖数: 2175
1
有一段大概这样的Fortran code,
subroutine A

Part B
do i=1,N1

Part C1
enddo
do i=1,N2

Part C2
enddo
contains

function d1

subrounine e1
endsubroutine A
这里面 part B, C1, C2都用到了contains里的functions and subroutines.其中C1和
C2是一段比较长的代码,并且有很大的相似性,但功能有一点不同。直接这样写,看着
这个程序总有点别扭,因为C1,C2两大段总让人有重复的感觉。于是想写一个新的
subroutine C来取代这两部分,使整个程序变成这样的。
subroutine A

Part B
do i=1,N1

call C(1)
enddo
do i=1,N2

call C(2)
enddo
contains

function d1

su
1 (共1页)
进入Programming版参与讨论
相关主题
setjmp() and longjmp()怎样解决fortran程序中的common块的问题
[合集] what's the trick of passing pointers一个fortran问题:
求助: Cygwin GCC g77编译.f文件出错fortran里面common的问题
Anyway to stop perl subroutines reading outside variableMPI xl fortran problem on Blue Gene
OpenMP的问题-The process cannot access the file because it is being used by another process32/64bit Fortran编译器造成的错误
如何在fortran中定义一个动态的数组?问个简单的Fortran问题
问个fortran的问题一个naive的问题——是否有这种工具?
FORTRAN 90 菜鸟问题How are parameters passed between ANSI C subroutines?
相关话题的讨论汇总
话题: part话题: c2话题: c1话题: enddo话题: fortran