Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SWIFT
SWIFTsim
Commits
42a00772
Commit
42a00772
authored
Jun 22, 2020
by
rttw52
Browse files
Updating subdir_per_output to use the correct counter, and how it compares to the default value
parent
520b031f
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/velociraptor_interface.c
View file @
42a00772
...
...
@@ -648,7 +648,7 @@ void velociraptor_invoke(struct engine *e, const int linked_with_snap) {
/* Generate directory name for this output - start with snapshot directory, if
* specified */
char
outputDirName
[
FILENAME_BUFFER_SIZE
]
=
""
;
if
(
str
nlen
(
e
->
snapshot_subdir
,
PARSER_MAX_LINE_SIZE
)
>
0
)
{
if
(
str
cmp
(
e
->
snapshot_subdir
,
engine_default_snapshot_subdir
)
!=
0
)
{
if
(
snprintf
(
outputDirName
,
FILENAME_BUFFER_SIZE
,
"%s/"
,
e
->
snapshot_subdir
)
>=
FILENAME_BUFFER_SIZE
)
{
error
(
"FILENAME_BUFFER_SIZE is to small for snapshot directory name!"
);
...
...
@@ -661,10 +661,10 @@ void velociraptor_invoke(struct engine *e, const int linked_with_snap) {
/* Then create output-specific subdirectory if necessary */
char
subDirName
[
FILENAME_BUFFER_SIZE
]
=
""
;
if
(
str
nlen
(
e
->
stf_subdir_per_output
,
PARSER_MAX_LINE_SIZE
)
>
0
)
{
if
(
str
cmp
(
e
->
stf_subdir_per_output
,
engine_default_stf_subdir_per_output
)
!=
0
)
{
if
(
snprintf
(
subDirName
,
FILENAME_BUFFER_SIZE
,
"%s%s_%04i/"
,
outputDirName
,
e
->
stf_subdir_per_output
,
e
->
s
napsho
t_output_count
)
>=
FILENAME_BUFFER_SIZE
)
{
e
->
st
f
_output_count
)
>=
FILENAME_BUFFER_SIZE
)
{
error
(
"FILENAME_BUFFER_SIZE is to small for Velociraptor directory name!"
);
}
...
...
@@ -677,9 +677,6 @@ void velociraptor_invoke(struct engine *e, const int linked_with_snap) {
strncpy
(
subDirName
,
outputDirName
,
FILENAME_BUFFER_SIZE
);
}
/* What is the snapshot number? */
int
snapnum
=
e
->
stf_output_count
;
/* What should the filename be? */
char
outputFileName
[
FILENAME_BUFFER_SIZE
];
if
(
snprintf
(
outputFileName
,
FILENAME_BUFFER_SIZE
,
"%s%s_%04i.VELOCIraptor"
,
...
...
@@ -722,7 +719,7 @@ void velociraptor_invoke(struct engine *e, const int linked_with_snap) {
/* Call VELOCIraptor. */
group_info
=
(
struct
groupinfo
*
)
InvokeVelociraptor
(
snapnum
,
outputFileName
,
cosmo_info
,
sim_info
,
nr_gparts
,
nr_parts
,
e
->
stf_output_count
,
outputFileName
,
cosmo_info
,
sim_info
,
nr_gparts
,
nr_parts
,
nr_sparts
,
swift_parts
,
cell_node_ids
,
e
->
nr_threads
,
linked_with_snap
,
&
num_gparts_in_groups
);
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment