Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
loadbalancing
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SLMS
loadbalancing
Commits
350522d8
Commit
350522d8
authored
4 years ago
by
Stephan Schulz
Browse files
Options
Downloads
Patches
Plain Diff
change Fortran get_gamma to argument call
parent
96fd363a
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!8
Refactor
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
README_new.md
+13
-1
13 additions, 1 deletion
README_new.md
src/ALL_fortran.cpp
+1
-1
1 addition, 1 deletion
src/ALL_fortran.cpp
src/ALL_module.F90
+6
-6
6 additions, 6 deletions
src/ALL_module.F90
with
20 additions
and
8 deletions
README_new.md
+
13
−
1
View file @
350522d8
...
...
@@ -201,7 +201,7 @@ and then retrieve the new vertices using
or new neighbors with
void
ALL::ALL<T,W>::getNeighbors (
std::vector<in> &neighbors
)
std::vector<int> &
ALL::ALL<T,W>::getNeighbors ()
### Special considerations for the Fortran interface
The Fortran interface exists in two versions. Either in the form of
...
...
@@ -227,6 +227,18 @@ and previous interfaces. In previous interfaces all MPI types are
the communicator used in the user's application, build the library with
enabled Fortran 2008 features and this communicator type is expected.
Retrieving information from the balancer is also different, since most
getter return (a reference to) an object itself. The Fortran subroutines
set the values of its arguments. As an example
int work = all.getWork();
becomes
integer(c_int) :: work
call ALL_get_work(work) !or
!call all%get_work(work)
### Details of the balancing methods
#### Tensor based
...
...
This diff is collapsed.
Click to expand it.
src/ALL_fortran.cpp
+
1
−
1
View file @
350522d8
...
...
@@ -173,7 +173,7 @@ void all_balance_c(ALL_t *all_obj) {
ALL_catch
}
double
all_get_gamma_c
(
ALL_t
*
all_obj
)
{
return
all_obj
->
getGamma
();
}
double
all_get_gamma_c
(
ALL_t
*
all_obj
,
double
*
gamma
)
{
*
gamma
=
all_obj
->
getGamma
();
}
// wrapper to get number of new vertices
void
all_get_number_of_vertices_c
(
ALL_t
*
all_obj
,
int
*
n_vertices
)
{
...
...
This diff is collapsed.
Click to expand it.
src/ALL_module.F90
+
6
−
6
View file @
350522d8
...
...
@@ -138,11 +138,11 @@ module ALL_module
use
iso_c_binding
type
(
c_ptr
),
value
::
obj
end
subroutine
function
all_get_gamma_c
(
obj
)
result
(
gamma
)
bind
(
C
)
subroutine
all_get_gamma_c
(
obj
,
gamma
)
bind
(
C
)
use
iso_c_binding
type
(
c_ptr
),
value
::
obj
real
(
c_double
)
::
gamma
end
function
end
subroutine
subroutine
all_get_number_of_vertices_c
(
obj
,
n
)
bind
(
C
)
use
iso_c_binding
type
(
c_ptr
),
value
::
obj
...
...
@@ -376,11 +376,11 @@ contains
call
all_balance_c
(
this
%
object
)
end
subroutine
!> Retrieve currently set gamma value of balancer
function
ALL_get_gamma
(
this
)
result
(
gamma
)
subroutine
ALL_get_gamma
(
this
,
gamma
)
class
(
ALL_t
),
intent
(
in
)
::
this
real
(
c_double
)
::
gamma
gamma
=
all_get_gamma_c
(
this
%
object
)
end
function
real
(
c_double
)
,
intent
(
out
)
::
gamma
call
all_get_gamma_c
(
this
%
object
,
gamma
)
end
subroutine
!> Retrieve number of vertices for current vertices
subroutine
ALL_get_number_of_vertices
(
this
,
n
)
class
(
ALL_t
),
intent
(
in
)
::
this
...
...
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