Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
O
openfpm_pdata
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
argupta
openfpm_pdata
Commits
3f03c2b5
Commit
3f03c2b5
authored
Feb 18, 2017
by
incardon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding update and upgrade option
parent
c211117f
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
145 additions
and
2 deletions
+145
-2
install
install
+26
-1
script/update_openfpm
script/update_openfpm
+48
-0
script/upgrade_openfpm
script/upgrade_openfpm
+48
-0
src/Decomposition/Distribution/ParMetisDistribution.hpp
src/Decomposition/Distribution/ParMetisDistribution.hpp
+11
-0
src/Decomposition/Distribution/parmetis_util.hpp
src/Decomposition/Distribution/parmetis_util.hpp
+11
-0
src/Vector/vector_dist.hpp
src/Vector/vector_dist.hpp
+1
-1
No files found.
install
View file @
3f03c2b5
...
...
@@ -22,8 +22,10 @@ install_req=1
i_dir
=
" "
sq
=
0
nomake
=
0
update_openfpm
=
0
upgrade_openfpm
=
0
while
getopts
:di:smhc: FLAG
;
do
while
getopts
:di:smhc:
nu
FLAG
;
do
case
$FLAG
in
d
)
echo
"Disable depencencies installation"
...
...
@@ -45,6 +47,14 @@ while getopts :di:smhc: FLAG; do
echo
"Skip to make the testing"
nomake
=
1
;;
u
)
echo
"Updating openfpm"
update_openfpm
=
1
;;
n
)
echo
"Upgrading openfpm"
upgrade_openfpm
=
1
;;
h
)
#show help
HELP
;;
...
...
@@ -67,6 +77,21 @@ remove_old $i_dir
pre_req
if
[
$update_openfpm
-eq
1
-a
$upgrade_openfpm
-eq
1
]
;
then
echo
-e
"
\0
33[1;5;31m It is not possible to update and upgrade at the same time
\0
33[0m"
exit
1
fi
if
[
$update_openfpm
-eq
1
]
;
then
update_openfpm
fi
if
[
$upgrade_openfpm
-eq
1
]
;
then
upgrade_openfpm
fi
exit
1
## clone the dependencies
git submodule init
...
...
script/update_openfpm
0 → 100755
View file @
3f03c2b5
#! /bin/bash
source
script/show_solutions
function
update_openfpm
()
{
echo
-e
"
\0
33[1;5;31m WARNING: the update will destroy any changes in the OpenFPM source code
\0
33[0m"
commands[0]
=
"Continue"
commands[0]
=
"
${
commands
[@]
}
"
possible_solutions
"
${
commands
[@]
}
"
## Get the name of the updating branch
url_update
=
$(
cat
update
)
echo
"Checking for update from
$url_update
"
branch
=
$(
wget
$url_update
)
if
[
x
"
$branch
"
==
x
""
]
;
then
echo
-e
"
\0
33[1m There are no-updates
\0
33[0m"
return
fi
actual_branch
=
git branch |
grep
\*
|
cut
-d
' '
-f2
if
[
x
"
$branch
"
==
x
"actual_branch"
]
;
then
git remote update
git status
-uno
|
grep
"nothing to commit"
if
[
$?
-eq
0
]
;
then
echo
-e
"
\0
33[1m There are no-updates
\0
33[0m"
return
fi
fi
# git stash
# git submodule foreach 'git stash'
# git pull origin
# git checkout $branch
# git submodule update
# sh autogen.sh
# make install
}
script/upgrade_openfpm
0 → 100755
View file @
3f03c2b5
#! /bin/bash
source
script/show_solutions
function
upgrade_openfpm
()
{
echo
-e
"
\0
33[1;5;31m WARNING: the update will destroy any changes in the OpenFPM source code
\0
33[0m"
commands[0]
=
"Continue"
commands[0]
=
"
${
commands
[@]
}
"
possible_solutions
"
${
commands
[@]
}
"
## Get the name of the updating branch
url_upgrade
=
$(
cat
upgrade
)
echo
"Checking for update from
$url_update
"
branch
=
$(
wget
$url_upgrade
)
if
[
x
"
$branch
"
==
x
""
]
;
then
echo
-e
"
\0
33[1m There are no-updates
\0
33[0m"
return
fi
actual_branch
=
git branch |
grep
\*
|
cut
-d
' '
-f2
if
[
x
"
$branch
"
==
x
"actual_branch"
]
;
then
# git remote update
# git status -uno | grep "nothing to commit"
if
[
$?
-eq
0
]
;
then
echo
-e
"
\0
33[1m There are no-updates
\0
33[0m"
return
fi
fi
# git stash
# git submodule foreach 'git stash'
# git pull origin
# git checkout $branch
# git submodule update
# sh autogen.sh
# make install
}
src/Decomposition/Distribution/ParMetisDistribution.hpp
View file @
3f03c2b5
...
...
@@ -614,6 +614,17 @@ public:
{
return
parmetis_graph
.
get_ndec
();
}
/*! \brief Set the tollerance for each partition
*
* \param i partition
* \param tol tollerance
*
*/
void
setDistTol
(
size_t
i
,
double
tol
)
{
parmetis_graph
.
setDistTol
(
i
,
tol
);
}
};
#endif
/* SRC_DECOMPOSITION_PARMETISDISTRIBUTION_HPP_ */
src/Decomposition/Distribution/parmetis_util.hpp
View file @
3f03c2b5
...
...
@@ -544,6 +544,17 @@ public:
{
return
n_dec
;
}
/*! \brief Distribution tolerance
*
* \param i partition id
* \param tol tollerance
*
*/
const
void
setDistTol
(
size_t
i
,
real_t
tol
)
{
Mg
.
ubvec
[
i
]
=
tol
;
}
};
#endif
src/Vector/vector_dist.hpp
View file @
3f03c2b5
...
...
@@ -1545,7 +1545,7 @@ public:
for
(
size_t
i
=
0
;
i
<
n_part
;
i
++
)
{
dec
.
getDistribution
().
setDist
ributionTol
(
i
,
md
.
setDistributionTol
(
));
dec
.
getDistribution
().
setDist
Tol
(
i
,
md
.
distributionTol
(
i
));
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment