Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Julia
Nektar
Commits
4cb8c93f
Commit
4cb8c93f
authored
Jan 20, 2014
by
Chris Cantwell
Browse files
Catch and ignore specific error code for parallel run.
Remove excessive couts on writing files.
parent
e962a668
Changes
1
Hide whitespace changes
Inline
Side-by-side
library/LibUtilities/BasicUtils/FieldIO.cpp
View file @
4cb8c93f
...
...
@@ -58,6 +58,7 @@
namespace
ptime
=
boost
::
posix_time
;
namespace
ip
=
boost
::
asio
::
ip
;
namespace
errc
=
boost
::
system
::
errc
;
namespace
Nektar
{
...
...
@@ -149,8 +150,6 @@ namespace Nektar
TiXmlDeclaration
*
decl
=
new
TiXmlDeclaration
(
"1.0"
,
"utf-8"
,
""
);
doc
.
LinkEndChild
(
decl
);
cout
<<
"Writing outfile: "
<<
filename
<<
endl
;
TiXmlElement
*
root
=
new
TiXmlElement
(
"NEKTAR"
);
doc
.
LinkEndChild
(
root
);
...
...
@@ -477,8 +476,6 @@ namespace Nektar
ASSERTL0
(
fileNames
.
size
()
==
elementList
.
size
(),
"Outfile names and list of elements ids does not match"
);
cout
<<
"Writing multi-file data: "
<<
outFile
<<
endl
;
TiXmlElement
*
root
=
new
TiXmlElement
(
"NEKTAR"
);
doc
.
LinkEndChild
(
root
);
...
...
@@ -1090,7 +1087,8 @@ namespace Nektar
}
catch
(
fs
::
filesystem_error
&
e
)
{
std
::
cout
<<
"Warning: "
<<
e
.
what
()
<<
std
::
endl
;
ASSERTL0
(
e
.
code
().
value
()
==
errc
::
no_such_file_or_directory
,
"Filesystem error: "
+
string
(
e
.
what
()));
}
// serial processing just add ending.
...
...
@@ -1114,7 +1112,14 @@ namespace Nektar
m_comm
->
AllReduce
(
elmtnums
,
LibUtilities
::
ReduceMax
);
// Create the destination directory
fs
::
create_directory
(
specPath
);
try
{
fs
::
create_directory
(
specPath
);
}
catch
(
fs
::
filesystem_error
&
e
)
{
ASSERTL0
(
false
,
"Filesystem error: "
+
string
(
e
.
what
()));
}
// Collate per-process element lists on root process to generate
// the info file.
...
...
@@ -1143,6 +1148,8 @@ namespace Nektar
// Write the Info.xml file
string
infofile
=
LibUtilities
::
PortablePath
(
specPath
/
fs
::
path
(
"Info.xml"
));
cout
<<
"Writing: "
<<
specPath
<<
endl
;
WriteMultiFldFileIDs
(
infofile
,
filenames
,
ElementIDs
,
fieldmetadatamap
);
}
...
...
Write
Preview
Supports
Markdown
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