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
25dcf024
Commit
25dcf024
authored
Jan 21, 2014
by
Dave Moxey
Browse files
Merge branch 'fix/remove-all-dir' of /opt/gitlab/repositories/nektar
parents
33eeda14
4cb8c93f
Changes
1
Hide whitespace changes
Inline
Side-by-side
library/LibUtilities/BasicUtils/FieldIO.cpp
View file @
25dcf024
...
...
@@ -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
);
...
...
@@ -1084,7 +1081,15 @@ namespace Nektar
fs
::
path
specPath
(
outname
);
// Remove any existing file which is in the way
fs
::
remove_all
(
specPath
);
try
{
fs
::
remove_all
(
specPath
);
}
catch
(
fs
::
filesystem_error
&
e
)
{
ASSERTL0
(
e
.
code
().
value
()
==
errc
::
no_such_file_or_directory
,
"Filesystem error: "
+
string
(
e
.
what
()));
}
// serial processing just add ending.
if
(
nprocs
==
1
)
...
...
@@ -1107,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.
...
...
@@ -1136,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