Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gmsh
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Larry Price
gmsh
Commits
d9202875
Commit
d9202875
authored
12 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
prune argv from stuff that confuses PETSc
parent
836b1960
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
Common/GmshMessage.cpp
+9
-11
9 additions, 11 deletions
Common/GmshMessage.cpp
with
9 additions
and
11 deletions
Common/GmshMessage.cpp
+
9
−
11
View file @
d9202875
...
...
@@ -77,17 +77,6 @@ static int vsnprintf(char *str, size_t size, const char *fmt, va_list ap)
void
Msg
::
Init
(
int
argc
,
char
**
argv
)
{
int
sargc
=
argc
;
char
**
sargv
=
argv
;
for
(
int
i
=
0
;
i
<
argc
;
i
++
){
std
::
string
val
(
argv
[
i
]);
if
(
val
==
"info"
||
val
==
"-info"
||
val
==
"help"
||
val
==
"-help"
){
sargc
=
0
;
sargv
=
0
;
break
;
}
}
#if defined(HAVE_MPI)
int
flag
;
MPI_Initialized
(
&
flag
);
...
...
@@ -97,7 +86,16 @@ void Msg::Init(int argc, char **argv)
MPI_Errhandler_set
(
MPI_COMM_WORLD
,
MPI_ERRORS_RETURN
);
#endif
#if defined(HAVE_PETSC)
// prune argv from stuff that confuses PETSc
int
sargc
=
0
;
char
**
sargv
=
new
char
*
[
argc
];
for
(
int
i
=
0
;
i
<
argc
;
i
++
){
std
::
string
val
(
argv
[
i
]);
if
(
val
!=
"-info"
&&
val
!=
"-help"
&&
val
!=
"-v"
)
sargv
[
sargc
++
]
=
argv
[
i
];
}
PetscInitialize
(
&
sargc
,
&
sargv
,
PETSC_NULL
,
PETSC_NULL
);
delete
[]
sargv
;
PetscPopSignalHandler
();
#endif
#if defined(HAVE_SLEPC)
...
...
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