Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
ogs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
Özgür Ozan Sen
ogs
Commits
70d9bd96
Commit
70d9bd96
authored
8 years ago
by
Christoph Lehmann
Browse files
Options
Downloads
Patches
Plain Diff
[App] additional config checks
parent
832fa6f4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Applications/CLI/ogs.cpp
+32
-18
32 additions, 18 deletions
Applications/CLI/ogs.cpp
with
32 additions
and
18 deletions
Applications/CLI/ogs.cpp
+
32
−
18
View file @
70d9bd96
...
...
@@ -74,34 +74,48 @@ int main(int argc, char *argv[])
ApplicationsLib
::
LogogSetup
logog_setup
;
logog_setup
.
setLevel
(
log_level_arg
.
getValue
());
try
{
ApplicationsLib
::
LinearSolverLibrarySetup
linear_solver_library_setup
(
argc
,
argv
);
try
{
bool
solver_succeeded
=
false
;
{
ApplicationsLib
::
LinearSolverLibrarySetup
linear_solver_library_setup
(
argc
,
argv
);
auto
project_config
=
BaseLib
::
makeConfigTree
(
project_arg
.
getValue
(),
!
nonfatal_arg
.
getValue
(),
"OpenGeoSysProject"
);
auto
project_config
=
BaseLib
::
makeConfigTree
(
project_arg
.
getValue
(),
!
nonfatal_arg
.
getValue
(),
"OpenGeoSysProject"
);
ProjectData
project
(
*
project_config
,
BaseLib
::
extractPath
(
project_arg
.
getValue
()),
outdir_arg
.
getValue
());
ProjectData
project
(
*
project_config
,
BaseLib
::
extractPath
(
project_arg
.
getValue
()),
outdir_arg
.
getValue
());
// Check intermediately that config parsing went fine.
project_config
.
checkAndInvalidate
();
BaseLib
::
ConfigTree
::
assertNoSwallowedErrors
();
project_config
.
checkAndInvalidate
();
// Create processes.
project
.
buildProcesses
();
BaseLib
::
ConfigTree
::
assertNoSwallowedErrors
();
// Create processes.
project
.
buildProcesses
();
INFO
(
"Initialize processes."
);
for
(
auto
p_it
=
project
.
processesBegin
();
p_it
!=
project
.
processesEnd
();
++
p_it
)
{
(
*
p_it
)
->
initialize
();
}
INFO
(
"Initialize processes."
);
for
(
auto
p_it
=
project
.
processesBegin
();
p_it
!=
project
.
processesEnd
();
++
p_it
)
{
(
*
p_it
)
->
initialize
();
}
BaseLib
::
ConfigTree
::
assertNoSwallowedErrors
();
INFO
(
"Solve processes."
);
INFO
(
"Solve processes."
);
auto
&
time_loop
=
project
.
getTimeLoop
();
solver_succeeded
=
time_loop
.
loop
(
project
);
}
// This nested scope ensures that everything that could possibly
// possess a ConfigTree is destructed before the final check below is
// done.
auto
&
time_loop
=
project
.
getTimeLoop
();
bool
solver_succeeded
=
time_loop
.
loop
(
project
);
BaseLib
::
ConfigTree
::
assertNoSwallowedErrors
();
return
solver_succeeded
?
EXIT_SUCCESS
:
EXIT_FAILURE
;
}
catch
(
std
::
exception
&
e
)
{
...
...
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