Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
QuickSched
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SWIFT
QuickSched
Commits
a3a6f11c
Commit
a3a6f11c
authored
8 years ago
by
axc67-pxs02
Browse files
Options
Downloads
Patches
Plain Diff
fixed some typos
parent
6b55fd92
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
fortran_examples/test_n2.F90
+12
-5
12 additions, 5 deletions
fortran_examples/test_n2.F90
with
12 additions
and
5 deletions
fortran_examples/test_n2.F90
+
12
−
5
View file @
a3a6f11c
...
...
@@ -131,7 +131,7 @@ end do
End
Subroutine
Subroutine
init_cells
(
cell_num
,
count
)
Subroutine
cell_init
(
cell_num
,
count
)
Integer
,
Intent
(
in
)
::
cell_num
,
count
Allocate
(
cells
(
cell_num
)
%
fx
(
1
:
count
))
...
...
@@ -153,7 +153,7 @@ cells(cell_num)%dx = cells(cell_num)%dx * 10.0_dp
cells
(
cell_num
)
%
dy
=
cells
(
cell_num
)
%
dy
*
10.0_dp
cells
(
cell_num
)
%
dz
=
cells
(
cell_num
)
%
dz
*
10.0_dp
End
Subroutine
init_cells
End
Subroutine
cell_init
Subroutine
runner
(
typ
,
data
)
BIND
(
C
)
Use
,
Intrinsic
::
ISO_C_BINDING
...
...
@@ -167,7 +167,7 @@ Integer(Kind=C_INT), Pointer :: c(:)
call
c_f_pointer
(
data
,
c
,
[
2
])
If
(
typ
==
type_self
)
then
call
Interact_s
elf
(
c
(
1
))
call
Interact_s
ingle
(
c
(
1
))
else
call
Interact
(
c
(
1
),
c
(
2
))
end
if
...
...
@@ -190,6 +190,13 @@ Type(C_PTR) :: dat_ptr
Integer
(
Kind
=
C_INT
),
Dimension
(
1
:
1000
)
::
cell_res
Type
(
C_FUNPTR
)
::
runner_func
Double Precision
::
t_start
,
t_total
Integer
(
Kind
=
C_INT
)
::
num_threads
!$omp parallel
!$omp single
num_threads
=
omp_get_thread_num
()
!$omp end single
!$omp end parallel
runner_func
=
C_FUNLOC
(
runner
)
...
...
@@ -199,7 +206,7 @@ do i = 1, 1000
end
do
sched
=
f_qsched_create
()
call
qsched_init
(
sched
,
24
,
0
)
call
qsched_init
(
sched
,
num_threads
,
0
)
do
i
=
1
,
1000
cell_res
(
i
)
=
qsched_addres
(
sched
,
qsched_owner_none
,
qsched_res_none
)
...
...
@@ -219,7 +226,7 @@ end do
t_start
=
omp_get_wtime
()
call
qsched_run
(
sched
,
24
,
runner_func
)
call
qsched_run
(
sched
,
num_threads
,
runner_func
)
t_total
=
omp_get_wtime
()
-
t_start
print
*
,
"Took"
,
t_total
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment