Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
SWIFTsim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
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
SWIFT
SWIFTsim
Commits
0bb3f198
Commit
0bb3f198
authored
8 years ago
by
Matthieu Schaller
Browse files
Options
Downloads
Patches
Plain Diff
Cosmetics
parent
6616adfc
No related branches found
No related tags found
1 merge request
!194
Io unit conversion
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/parallel_io.c
+7
-7
7 additions, 7 deletions
src/parallel_io.c
src/serial_io.c
+4
-4
4 additions, 4 deletions
src/serial_io.c
src/single_io.c
+7
-7
7 additions, 7 deletions
src/single_io.c
with
18 additions
and
18 deletions
src/parallel_io.c
+
7
−
7
View file @
0bb3f198
...
...
@@ -88,9 +88,9 @@ void readArray(hid_t grp, const struct io_props prop, size_t N,
}
}
message
(
"Reading %s '%s' array..."
,
prop
.
importance
==
COMPULSORY
?
"compulsory"
:
"optional "
,
prop
.
name
);
/*
message("Reading %s '%s' array...",
*/
/*
prop.importance == COMPULSORY ? "compulsory" : "optional ",
*/
/*
prop.name);
*/
/* Open data space in file */
const
hid_t
h_data
=
H5Dopen2
(
grp
,
prop
.
name
,
H5P_DEFAULT
);
...
...
@@ -148,7 +148,7 @@ void readArray(hid_t grp, const struct io_props prop, size_t N,
units_conversion_factor
(
ic_units
,
internal_units
,
prop
.
units
);
if
(
factor
!=
1
.
&&
exist
!=
0
)
{
message
(
"
aaa"
);
/*
message("
Converting ! factor=%e", factor); */
if
(
isDoublePrecision
(
prop
.
type
))
{
double
*
temp_d
=
temp
;
...
...
@@ -203,7 +203,7 @@ void writeArray(hid_t grp, char* fileName, FILE* xmfFile,
const
size_t
copySize
=
typeSize
*
props
.
dimension
;
const
size_t
num_elements
=
N
*
props
.
dimension
;
message
(
"Writing '%s' array..."
,
props
.
name
);
/*
message("Writing '%s' array...", props.name);
*/
/* Allocate temporary buffer */
void
*
temp
=
malloc
(
num_elements
*
sizeOfType
(
props
.
type
));
...
...
@@ -219,7 +219,7 @@ void writeArray(hid_t grp, char* fileName, FILE* xmfFile,
units_conversion_factor
(
internal_units
,
snapshot_units
,
props
.
units
);
if
(
factor
!=
1
.)
{
message
(
"
aaa"
);
/*
message("
Converting ! factor=%e", factor); */
if
(
isDoublePrecision
(
props
.
type
))
{
double
*
temp_d
=
temp
;
...
...
@@ -428,7 +428,7 @@ void read_ic_parallel(char* fileName, const struct UnitSystem* internal_units,
if
(
mpi_rank
==
0
)
{
if
(
units_are_equal
(
ic_units
,
internal_units
))
{
message
(
"IC and internal units match. No conversion needed"
);
message
(
"IC and internal units match. No conversion needed
.
"
);
}
else
{
...
...
This diff is collapsed.
Click to expand it.
src/serial_io.c
+
4
−
4
View file @
0bb3f198
...
...
@@ -147,7 +147,7 @@ void readArray(hid_t grp, const struct io_props props, size_t N,
units_conversion_factor
(
ic_units
,
internal_units
,
props
.
units
);
if
(
factor
!=
1
.
&&
exist
!=
0
)
{
message
(
"
aaa"
);
/*
message("
Converting ! factor=%e", factor); */
if
(
isDoublePrecision
(
props
.
type
))
{
double
*
temp_d
=
temp
;
...
...
@@ -285,7 +285,7 @@ void writeArray(hid_t grp, char* fileName, FILE* xmfFile,
const
size_t
copySize
=
typeSize
*
props
.
dimension
;
const
size_t
num_elements
=
N
*
props
.
dimension
;
message
(
"Writing '%s' array..."
,
props
.
name
);
/*
message("Writing '%s' array...", props.name);
*/
/* Prepare the arrays in the file */
if
(
mpi_rank
==
0
)
...
...
@@ -306,7 +306,7 @@ void writeArray(hid_t grp, char* fileName, FILE* xmfFile,
units_conversion_factor
(
internal_units
,
snapshot_units
,
props
.
units
);
if
(
factor
!=
1
.)
{
message
(
"
aaa"
);
/*
message("
Converting ! factor=%e", factor); */
if
(
isDoublePrecision
(
props
.
type
))
{
double
*
temp_d
=
temp
;
...
...
@@ -464,7 +464,7 @@ void read_ic_serial(char* fileName, const struct UnitSystem* internal_units,
if
(
units_are_equal
(
ic_units
,
internal_units
))
{
message
(
"IC and internal units match. No conversion needed"
);
message
(
"IC and internal units match. No conversion needed
.
"
);
}
else
{
...
...
This diff is collapsed.
Click to expand it.
src/single_io.c
+
7
−
7
View file @
0bb3f198
...
...
@@ -88,9 +88,9 @@ void readArray(hid_t h_grp, const struct io_props prop, size_t N,
}
}
message
(
"Reading %s '%s' array..."
,
prop
.
importance
==
COMPULSORY
?
"compulsory"
:
"optional "
,
prop
.
name
);
/*
message("Reading %s '%s' array...",
*/
/*
prop.importance == COMPULSORY ? "compulsory" : "optional ",
*/
/*
prop.name);
*/
/* Open data space */
const
hid_t
h_data
=
H5Dopen
(
h_grp
,
prop
.
name
,
H5P_DEFAULT
);
...
...
@@ -122,7 +122,7 @@ void readArray(hid_t h_grp, const struct io_props prop, size_t N,
units_conversion_factor
(
ic_units
,
internal_units
,
prop
.
units
);
if
(
factor
!=
1
.
&&
exist
!=
0
)
{
message
(
"
aaa"
);
/*
message("
Converting ! factor=%e", factor); */
if
(
isDoublePrecision
(
prop
.
type
))
{
double
*
temp_d
=
temp
;
...
...
@@ -173,7 +173,7 @@ void writeArray(hid_t grp, char* fileName, FILE* xmfFile,
const
size_t
copySize
=
typeSize
*
props
.
dimension
;
const
size_t
num_elements
=
N
*
props
.
dimension
;
message
(
"Writing '%s' array..."
,
props
.
name
);
/*
message("Writing '%s' array...", props.name);
*/
/* Allocate temporary buffer */
void
*
temp
=
malloc
(
num_elements
*
sizeOfType
(
props
.
type
));
...
...
@@ -189,7 +189,7 @@ void writeArray(hid_t grp, char* fileName, FILE* xmfFile,
units_conversion_factor
(
internal_units
,
snapshot_units
,
props
.
units
);
if
(
factor
!=
1
.)
{
message
(
"
aaa"
);
/*
message("
Converting ! factor=%e", factor); */
if
(
isDoublePrecision
(
props
.
type
))
{
double
*
temp_d
=
temp
;
...
...
@@ -374,7 +374,7 @@ void read_ic_single(char* fileName, const struct UnitSystem* internal_units,
/* Tell the user if a conversion will be needed */
if
(
units_are_equal
(
ic_units
,
internal_units
))
{
message
(
"IC and internal units match. No conversion needed"
);
message
(
"IC and internal units match. No conversion needed
.
"
);
}
else
{
...
...
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