examples:
- output format warnings fixed
This commit is contained in:
+4
-4
@@ -48,7 +48,7 @@ print_query_result (
|
||||
h5_int64_t type,
|
||||
h5_int64_t dim
|
||||
) {
|
||||
printf ("\t%-6lld %-30s %-15s %-10lld\n", i, name, type2string(type), dim);
|
||||
printf ("\t%-6lld %-30s %-15s %-10lld\n", (long long)i, name, type2string(type), (long long)dim);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -61,7 +61,7 @@ query_file_attribs (
|
||||
|
||||
// query # of file attributes
|
||||
h5_int64_t n = H5GetNumFileAttribs (f);
|
||||
printf ("\tNumber of file attributes: %lld\n", n);
|
||||
printf ("\tNumber of file attributes: %lld\n", (long long)n);
|
||||
|
||||
// output name and type of all file attribute
|
||||
print_header (n);
|
||||
@@ -85,7 +85,7 @@ query_step_attribs (
|
||||
|
||||
// query # of step attributes
|
||||
h5_int64_t n = H5GetNumStepAttribs (f);
|
||||
printf ("\tNumber of step attributes: %lld\n", n);
|
||||
printf ("\tNumber of step attributes: %lld\n", (long long)n);
|
||||
|
||||
// output name and type of all step attribute
|
||||
print_header (n);
|
||||
@@ -108,7 +108,7 @@ query_file (
|
||||
|
||||
// query # of steps, if > 0: go to first step, query and output step attribs
|
||||
h5_int64_t n = H5GetNumSteps (f);
|
||||
printf ("\tNumber of steps: %lld\n", n);
|
||||
printf ("\tNumber of steps: %lld\n", (long long)n);
|
||||
|
||||
if (n > 0) {
|
||||
// go to first step
|
||||
|
||||
@@ -1,4 +1,13 @@
|
||||
AM_CPPFLAGS += -I${abs_top_builddir}/src/include
|
||||
#
|
||||
# Copyright (c) 2006-2015, The Regents of the University of California,
|
||||
# through Lawrence Berkeley National Laboratory (subject to receipt of any
|
||||
# required approvals from the U.S. Dept. of Energy) and the Paul Scherrer
|
||||
# Institut (Switzerland). All rights reserved.!
|
||||
#
|
||||
# License: see file COPYING in top level of source distribution.
|
||||
#
|
||||
|
||||
AM_CPPFLAGS += -I${abs_top_srcdir}/src/include
|
||||
FFLAGS += -cpp $(AM_CPPFLAGS)
|
||||
AM_LDFLAGS += -L${abs_top_builddir}/src/h5core/.libs
|
||||
|
||||
|
||||
@@ -522,7 +522,7 @@ traverse_mesh (
|
||||
Timer* timer = Timer_.new();
|
||||
|
||||
/* open mesh and get number of levels */
|
||||
printf (" Opening mesh with id %lld\n", mesh_id);
|
||||
printf (" Opening mesh with id %lld\n", (long long)mesh_id);
|
||||
H5FedOpenTetrahedralMeshByIndex (f, mesh_id, &mesh);
|
||||
h5_size_t num_levels = H5FedGetNumLevels (mesh);
|
||||
printf (" Number of levels in mesh: %lld\n", (long long)num_levels);
|
||||
|
||||
@@ -305,7 +305,7 @@ traverse_mesh (
|
||||
|
||||
timer->start(timer);
|
||||
/* open mesh and get number of levels */
|
||||
printf (" Opening mesh with id %lld\n", mesh_id);
|
||||
printf (" Opening mesh with id %lld\n", (long long)mesh_id);
|
||||
H5FedOpenTetrahedralMeshByIndex (f, mesh_id, &mesh);
|
||||
timer->stop(timer);
|
||||
printf (" %fsec\n", timer->elapsed(timer));
|
||||
|
||||
@@ -111,7 +111,7 @@ traverse_vertices (
|
||||
}
|
||||
if (dumpit) {
|
||||
printf (" (%llx, %llx, %llx) |",
|
||||
tval[0], tval[1], tval[2]);
|
||||
(long long)tval[0], (long long)tval[1], (long long)tval[2]);
|
||||
}
|
||||
num_entities_tagged++;
|
||||
if (tval[0] != local_id ||
|
||||
@@ -172,7 +172,7 @@ traverse_edges (
|
||||
continue; // not tagged
|
||||
if (dumpit) {
|
||||
printf (" (%llx, %llx, %llx) |",
|
||||
tval[0], tval[1], tval[2]);
|
||||
(long long)tval[0], (long long)tval[1], (long long)tval[2]);
|
||||
}
|
||||
num_entities_tagged++;
|
||||
|
||||
@@ -236,7 +236,7 @@ traverse_triangles (
|
||||
continue; // not tagged
|
||||
if (dumpit) {
|
||||
printf (" (%llx, %llx, %llx) |",
|
||||
tval[0], tval[1], tval[2]);
|
||||
(long long)tval[0], (long long)tval[1], (long long)tval[2]);
|
||||
}
|
||||
num_entities_tagged++;
|
||||
|
||||
@@ -298,7 +298,7 @@ traverse_tets (
|
||||
continue; // not tagged
|
||||
if (dumpit) {
|
||||
printf (" (%llx, %llx, %llx) |",
|
||||
tval[0], tval[1], tval[2]);
|
||||
(long long)tval[0], (long long)tval[1], (long long)tval[2]);
|
||||
}
|
||||
num_entities_tagged++;
|
||||
|
||||
@@ -350,7 +350,7 @@ traverse_mesh (
|
||||
Timer* timer = Timer_.new();
|
||||
timer->start(timer);
|
||||
/* open mesh and get number of levels */
|
||||
printf (" Opening mesh with id %lld\n", mesh_id);
|
||||
printf (" Opening mesh with id %lld\n", (long long)mesh_id);
|
||||
H5FedOpenTetrahedralMeshByIndex (f, mesh_id, &mesh);
|
||||
timer->stop(timer);
|
||||
printf (" %fsec\n", timer->elapsed(timer));
|
||||
|
||||
@@ -283,7 +283,7 @@ traverse_mesh (
|
||||
) {
|
||||
h5t_mesh_t* m;
|
||||
/* open mesh and get number of levels */
|
||||
printf (" Opening mesh with id %lld\n", mesh_id);
|
||||
printf (" Opening mesh with id %lld\n", (long long)mesh_id);
|
||||
H5FedOpenTriangleMeshByIndex (f, mesh_id, &m);
|
||||
h5_size_t num_levels = H5FedGetNumLevels (m);
|
||||
printf (" Number of levels in mesh: %lld\n", (long long)num_levels);
|
||||
|
||||
@@ -214,7 +214,7 @@ traverse_mesh (
|
||||
) {
|
||||
h5t_mesh_t* m;
|
||||
/* open mesh and get number of levels */
|
||||
printf (" Opening mesh with id %lld\n", mesh_id);
|
||||
printf (" Opening mesh with id %lld\n", (long long)mesh_id);
|
||||
H5FedOpenTriangleMeshByIndex (f, mesh_id, &m);
|
||||
h5_size_t num_levels = H5FedGetNumLevels (m);
|
||||
printf (" Number of levels in mesh: %lld\n", (long long)num_levels);
|
||||
|
||||
@@ -37,7 +37,7 @@ main (
|
||||
// set canonical view
|
||||
H5PartSetCanonicalView (file);
|
||||
h5_int64_t num_particles = H5PartGetNumParticles (file);
|
||||
printf ("[proc %d]: particles in view: %lld\n", comm_rank, num_particles);
|
||||
printf ("[proc %d]: particles in view: %lld\n", comm_rank, (long long)num_particles);
|
||||
|
||||
// read and print data
|
||||
h5_int32_t* data = calloc (num_particles, sizeof (*data));
|
||||
|
||||
@@ -45,7 +45,7 @@ main (
|
||||
|
||||
// with core cfd we read the hole file on all cores!
|
||||
h5_int64_t num_particles = H5PartGetNumParticles (file);
|
||||
printf ("[proc %d]: particles in view: %lld\n", comm_rank, num_particles);
|
||||
printf ("[proc %d]: particles in view: %lld\n", comm_rank, (long long)num_particles);
|
||||
|
||||
// read and print data
|
||||
h5_int32_t* data = calloc (num_particles, sizeof (*data));
|
||||
|
||||
@@ -40,7 +40,7 @@ main (
|
||||
if (comm_rank+1 == comm_size)
|
||||
num_particles += num_particles_total % comm_size;
|
||||
|
||||
printf ("[proc %d]: particles in view: %lld\n", comm_rank, num_particles);
|
||||
printf ("[proc %d]: particles in view: %lld\n", comm_rank, (long long)num_particles);
|
||||
printf ("[proc %d]: total number of particles: %lld\n",
|
||||
comm_rank, (long long unsigned)num_particles_total);
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ main (
|
||||
// setting end = start - 1 forces the selection of zero particles!
|
||||
h5_int64_t end = start + num_particles - 1;
|
||||
|
||||
printf ("[proc %d]: set view to [%lld..%lld]\n", comm_rank, start, end);
|
||||
printf ("[proc %d]: set view to [%lld..%lld]\n", comm_rank, (long long)start, (long long)end);
|
||||
H5PartSetView (file, start, end);
|
||||
|
||||
// read and print data
|
||||
@@ -63,7 +63,7 @@ main (
|
||||
H5PartReadDataInt32 (file, "data", data);
|
||||
for (int i = 0; i < num_particles; i++) {
|
||||
printf ("[proc %d]: global index = %lld; local index = %d, value = %d\n",
|
||||
comm_rank, start+i, i, data[i]);
|
||||
comm_rank, (long long)(start+i), i, data[i]);
|
||||
}
|
||||
|
||||
// cleanup
|
||||
|
||||
Reference in New Issue
Block a user