We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
在文件adv_mod.F90的末尾,有一个叫作adv_accum_wind的函数。其性能消耗如下: 其中第一部分浅黄色运用了运算符%,大致含义类似于C语言中的.。这里的消耗主要是来自于chen成员调用的复制与拷贝。 第二部分则是涉及到的下层函数adv_batch。 可以考虑优化这两个部分。 其中第一部分可能需要对调用该函数的数据进行一些了解,可能存在类似于更换库函数之类的优化方法,但不是简单修改代码能够搞定的。 第二部分涉及到整个adv_batch_mod.F90文件,在这个部分中能够找到一些类似迭代步进的代码,这往往是主要耗时的part,详细可以见下面的图片。整个文件中有一些算数运算和循环嵌套的情况,也许可考虑并行,访存优化,数学化简等方式。 (迭代步进指的是下面图片上提到的399~433,能够明显看出这里面的步进逻辑)
adv_accum_wind
%
.
adv_batch
adv_batch_mod.F90
以下是图片帮助你找到我描述的位置:
The text was updated successfully, but these errors were encountered:
Do you mean code like this one mesh%half_kds But in Fortran, that means half_kds is a member of mesh. mesh here is like the struct in C++
mesh%half_kds
half_kds
mesh
struct
Sorry, something went wrong.
Here’s an example of a basic derived type:
type :: t_pair integer :: i real :: x end type
The syntax to create a variable of type t_pair and access its members is:
type t_pair
! Declare type(t_pair) :: pair ! Initialize pair%i = 1 pair%x = 0.5
The percentage symbol % is used to access the members of a derived type.
I think I mistakenly recorded the meaning of the operator% and let me modify my description of the problem
Here’s an example of a basic derived type: type :: t_pair integer :: i real :: x end type The syntax to create a variable of type t_pair and access its members is: ! Declare type(t_pair) :: pair ! Initialize pair%i = 1 pair%x = 0.5 The percentage symbol % is used to access the members of a derived type.
I have rephrased the potential issues here, which may provide new ideas. Thank you for your help. I was not aware of this mistake.
BeverlyCrl
No branches or pull requests
在文件adv_mod.F90的末尾,有一个叫作
adv_accum_wind
的函数。其性能消耗如下:其中第一部分浅黄色运用了运算符
%
,大致含义类似于C语言中的.
。这里的消耗主要是来自于chen成员调用的复制与拷贝。第二部分则是涉及到的下层函数
adv_batch
。可以考虑优化这两个部分。
其中第一部分可能需要对调用该函数的数据进行一些了解,可能存在类似于更换库函数之类的优化方法,但不是简单修改代码能够搞定的。
第二部分涉及到整个
adv_batch_mod.F90
文件,在这个部分中能够找到一些类似迭代步进的代码,这往往是主要耗时的part,详细可以见下面的图片。整个文件中有一些算数运算和循环嵌套的情况,也许可考虑并行,访存优化,数学化简等方式。(迭代步进指的是下面图片上提到的399~433,能够明显看出这里面的步进逻辑)
以下是图片帮助你找到我描述的位置:
The text was updated successfully, but these errors were encountered: