Skip to content

Commit

Permalink
Merge pull request #1032 from jeffhammond/fix-peigs-warnings
Browse files Browse the repository at this point in the history
fix peigs warnings
  • Loading branch information
edoapra authored Oct 24, 2024
2 parents e4282f0 + 1879be7 commit 2a42838
Show file tree
Hide file tree
Showing 28 changed files with 104 additions and 104 deletions.
2 changes: 1 addition & 1 deletion src/peigs/ctof/bortho_f.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ void bortho_( n, matB, mapB, m, matZ, mapZ, iwork, work, ort, info)
if( *n < *m ) {
fprintf(stderr,
"Error in routine bortho_. m (=%d) < n (=%d). me = %d \n",
*m, *n, me);
(int)(*m), (int)(*n), (int)me);
exit(-1);
}

Expand Down
2 changes: 1 addition & 1 deletion src/peigs/ctof/ortho_f.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ void ortho_( n, m, matZ, mapZ, iwork, work, ort, info)
if( *n < *m ) {
fprintf(stderr,
"Error in routine ortho_. m (=%d) < n (=%d). me = %d \n",
*m, *n, me);
(int)(*m), (int)(*n), (int)me);
exit(-1);
}

Expand Down
4 changes: 2 additions & 2 deletions src/peigs/ctof/pdspev_f.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ void pdspev_(n, matrixA, mapA, matZ, mapZ, eval, iscratch, iscsize,
*info = linfo;

fprintf( stderr, " %s me = %d argument %d is a pointer to NULL. \n",
msg, me, -linfo );
msg, (int)me, (int)(-linfo) );
l_exit_( &linfo, msg );
return;
}
Expand All @@ -156,7 +156,7 @@ void pdspev_(n, matrixA, mapA, matZ, mapZ, eval, iscratch, iscsize,
if ( *ibuffsz < nvecsA + nvecsZ + 2 ) {
*info = -10;

fprintf( stderr, " %s me = %d ibuffsz is too small. \n", msg, me );
fprintf( stderr, " %s me = %d ibuffsz is too small. \n", msg, (int)me );
l_exit_( info, msg );
return;
}
Expand Down
4 changes: 2 additions & 2 deletions src/peigs/ctof/pdspevx_f.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ void pdspevx_( ivector, irange, n, matrixA, mapA, lb, ub, ilb, iub, abstol,
*info = linfo;

fprintf( stderr, " %s me = %d argument %d is a pointer to NULL. \n",
msg, me, -linfo );
msg, (int)me, (int)(-linfo) );
l_exit_( &linfo, msg );
return;
}
Expand All @@ -179,7 +179,7 @@ void pdspevx_( ivector, irange, n, matrixA, mapA, lb, ub, ilb, iub, abstol,
if ( *ibuffsz < nvecsA + nvecsZ + 2 ) {
*info = -18;

fprintf( stderr, " %s me = %d ibuffsz is too small. \n", msg, me );
fprintf( stderr, " %s me = %d ibuffsz is too small. \n", msg, (int)me );
l_exit_( info, msg );
return;
}
Expand Down
4 changes: 2 additions & 2 deletions src/peigs/ctof/pdspgv_f.c
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ void pdspgv_(ifact, n, matrixA, mapA, matrixB, mapB, matZ, mapZ, eval,
*info = linfo;

fprintf( stderr, " %s me = %d argument %d is a pointer to NULL. \n",
msg, me, -linfo );
msg, (int)me, (int)(-linfo) );
l_exit_( &linfo, msg );
return;
}
Expand All @@ -169,7 +169,7 @@ void pdspgv_(ifact, n, matrixA, mapA, matrixB, mapB, matZ, mapZ, eval,
if ( *ibuffsz < (nvecsA + nvecsB + nvecsZ + 3 )) {
*info = -10;

fprintf( stderr, " %s me = %d ibuffsz is too small. \n", msg, me );
fprintf( stderr, " %s me = %d ibuffsz is too small. \n", msg, (int)me );
l_exit_( info, msg );
return;
}
Expand Down
4 changes: 2 additions & 2 deletions src/peigs/ctof/pdspgvx_f.c
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ void pdspgvx_( ifact, ivector, irange, n, matrixA, mapA, matrixB, mapB,
*info = linfo;

fprintf( stderr, " %s me = %d argument %d is a pointer to NULL. \n",
msg, me, -linfo );
msg, (int)me, (int)(-linfo) );
l_exit_( &linfo, msg );
return;
}
Expand All @@ -189,7 +189,7 @@ void pdspgvx_( ifact, ivector, irange, n, matrixA, mapA, matrixB, mapB,
if ( *ibuffsz < nvecsA + nvecsB + nvecsZ + 3 ) {
*info = -21;

fprintf( stderr, " %s me = %d ibuffsz is too small. \n", msg, me );
fprintf( stderr, " %s me = %d ibuffsz is too small. \n", msg, (int)me );
l_exit_( info, msg );
return;
}
Expand Down
2 changes: 1 addition & 1 deletion src/peigs/src/c/b_ortho.c
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ void b_ortho ( n, colB, mapB, m, colZ, mapZ, ibuffptr, iwork, work, ort, info)
if( *n < *m ) {
fprintf(stderr,
"Error in routine b_ortho. m (=%d) < n (=%d). me = %d \n",
*m, *n, me);
(int)(*m), (int)(*n), (int)me);
exit(-1);
}

Expand Down
46 changes: 23 additions & 23 deletions src/peigs/src/c/ci_entry.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ Integer ci_entry (me, n, i, j, map)
}

if (map == NULL) {
printf(" Peigs: ci_entry_ node %d : Mapping problem\n", *me);
printf(" Peigs: ci_entry_ node %d : Mapping problem\n", (int)(*me));
indx = -5;
xerbla_("ci_entry\n", &indx);
}
Expand All @@ -142,7 +142,7 @@ Integer ci_entry (me, n, i, j, map)
}

if ( *i < *j ) {
printf("PeIGS: ci_entry_ :node %d : i < j \n", *me);
printf("PeIGS: ci_entry_ :node %d : i < j \n", (int)(*me));
indx = -4;
xerbla_("ci_entry\n", &indx);
}
Expand Down Expand Up @@ -228,7 +228,7 @@ Integer ci_entry_(me, n, i, j, map)
}

if (map == NULL) {
printf(" Peigs: ci_entry_ node %d : Mapping problem\n", *me);
printf(" Peigs: ci_entry_ node %d : Mapping problem\n", (int)(*me));
indx = -5;
xerbla_("ci_entry\n", &indx);
}
Expand All @@ -251,7 +251,7 @@ Integer ci_entry_(me, n, i, j, map)
}

if ( *i < *j ) {
printf( "PeIGS: ci_entry_ :node %d : i < j \n", *me);
printf( "PeIGS: ci_entry_ :node %d : i < j \n", (int)(*me));
indx = -4;
xerbla_("ci_entry\n", &indx);
}
Expand Down Expand Up @@ -318,7 +318,7 @@ Integer ci_size_(me, n, map)

if ( *me > mxnprc_() || *me < 0 ) {
indx = -1;
printf(" Node %d Error in ci_size arg 1 with me = %d mxnprc = %d \n", iam, *me, mxnprc_());
printf(" Node %d Error in ci_size arg 1 with me = %d mxnprc = %d \n", (int)iam, (int)(*me), (int)mxnprc_());
xerbla_("ci_siz\n", &indx);
}

Expand All @@ -332,7 +332,7 @@ Integer ci_size_(me, n, map)
}

if (map == NULL) {
printf(" Peigs: ci_size_ node %d : Mapping problem\n", *me);
printf(" Peigs: ci_size_ node %d : Mapping problem\n", (int)(*me));
indx = -3;
xerbla_("ci_siz\n", &indx);
}
Expand Down Expand Up @@ -393,46 +393,46 @@ Integer fil_mapvec_( me, n, map, mapvec)

if ( me == NULL ) {
i = -1;
printf(" Peigs: fil_mapvec_ node %d : first argument is NULL \n", mxmynd_());
printf("me = %d fil_mapvec_ \n", *me);
printf(" Peigs: fil_mapvec_ node %d : first argument is NULL \n", (int)mxmynd_());
printf("me = %d fil_mapvec_ \n", (int)(*me));
}

if (( *me > mxnprc_() ) || ( *me < 0 )) {
i = -1;
printf(" Peigs: fil_mapvec_ node %d : first argument %d out of bounds \n", mxmynd_(), *me);
printf("fil_mapvec_ %d \n", i);
printf(" Peigs: fil_mapvec_ node %d : first argument %d out of bounds \n", (int)mxmynd_(), (int)(*me));
printf("fil_mapvec_ %d \n", (int)i);
}

if ( n == NULL ) {
i = -2;
printf(" Peigs: fil_mapvec_ node %d : 2nd argument is NULL i\n", *me);
printf("fil_mapvec_ %d \n", i);
printf(" Peigs: fil_mapvec_ node %d : 2nd argument is NULL i\n", (int)(*me));
printf("fil_mapvec_ %d \n", (int)i);
}
else if ( *n < 1 ) {
i = -2;
printf(" Peigs: fil_mapvec_ node %d : Mapping problem second argument is invalid \n", *me);
printf("fil_mapvec_ %d \n", i);
printf(" Peigs: fil_mapvec_ node %d : Mapping problem second argument is invalid \n", (int)(*me));
printf("fil_mapvec_ %d \n", (int)i);
}

if (map == NULL) {
printf(" Peigs: fil_mapvec_ node %d : Mapping problem\n", *me);
printf(" Peigs: fil_mapvec_ node %d : Mapping problem\n", (int)(*me));
i = -3;
printf("fil_mapvec_ %d \n", i);
printf("fil_mapvec_ %d \n", (int)i);
}

iptr = map;
for ( i = 0 ; i < *n ; i++ )
if ( (iptr++) == NULL ) {
i = -3;
printf(" Peigs: fil_mapvec_ node %d : 3rd argument error. \n", *me);
printf("fil_mapvec_ %d \n", i);
printf(" Peigs: fil_mapvec_ node %d : 3rd argument error. \n", (int)(*me));
printf("fil_mapvec_ %d \n", (int)i);
}

if (mapvec == NULL) {
printf(" Peigs: fil_mapvec_ node %d : Mapping problem\n", *me);
printf(" Peigs: fil_mapvec_ node %d : 4th argument error. \n", *me);
printf(" Peigs: fil_mapvec_ node %d : Mapping problem\n", (int)(*me));
printf(" Peigs: fil_mapvec_ node %d : 4th argument error. \n", (int)(*me));
i = -4;
printf("fil_mapvec_ %d \n", i);
printf("fil_mapvec_ %d \n", (int)i);
}


Expand All @@ -443,8 +443,8 @@ Integer fil_mapvec_( me, n, map, mapvec)
if ( *(iptr++) == idummy ) {
if ( mapvec + k == NULL ) {
i = -4;
printf(" Peigs: fil_mapvec_ node %d : 4th argument error. \n", *me);
printf("fil_mapvec_ %d \n", i);
printf(" Peigs: fil_mapvec_ node %d : 4th argument error. \n", (int)(*me));
printf("fil_mapvec_ %d \n", (int)i);
}
mapvec[k] = i;
k++;
Expand Down
2 changes: 1 addition & 1 deletion src/peigs/src/c/clustrfix.c
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ Integer clustrfix_ (n, d, e, m, w, iblock, nsplit, isplit, num_clustr, clustr_in

jjj =0;
for ( iii = 0; iii < num_cls; iii++ ) {
printf(" cptr c1 %d cn %d b1 %d bn %d \n", clustr_info[jjj], clustr_info[jjj+1], clustr_info[jjj+2], clustr_info[jjj+3]);
printf(" cptr c1 %d cn %d b1 %d bn %d \n", (int)clustr_info[jjj], (int)clustr_info[jjj+1], (int)clustr_info[jjj+2], (int)clustr_info[jjj+3]);
jjj += 4;
}

Expand Down
8 changes: 4 additions & 4 deletions src/peigs/src/c/exit.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ void g_exit2_( n, array, procmap, len, iwork )

me = mxmynd_ ();

fprintf(stderr, "G_EXIT2: Node %d Error. A routine called g_exit2_, \n", me);
fprintf(stderr, "Message from calling routine: %s node id = %d \n", array, me);
fprintf(stderr, "G_EXIT2: Node %d Error. A routine called g_exit2_, \n", (int)me);
fprintf(stderr, "Message from calling routine: %s node id = %d \n", array, (int)me);

mxpend_ ();

Expand Down Expand Up @@ -148,7 +148,7 @@ void g_exit_( n, array, procmap, len, iwork, work )
qqsort( proclist, 0, nprocs-1);

if ( nprocs > maxprocs ) {
fprintf(stderr, "G_EXIT: Node %d Error: Number of processors in Proc List exceeds number allocated \n", me);
fprintf(stderr, "G_EXIT: Node %d Error: Number of processors in Proc List exceeds number allocated \n", (int)me);
xerbl2_ ( );
return;
}
Expand All @@ -161,7 +161,7 @@ void g_exit_( n, array, procmap, len, iwork, work )

if ( *n < 0 ) {
*n = -51;
fprintf(stderr, " %s My node id = %d info = %d (g_exit_) \n", array, me, *n);
fprintf(stderr, " %s My node id = %d info = %d (g_exit_) \n", array, (int)me, (int)(*n));
/*
xerbl2_ ( );
*/
Expand Down
2 changes: 1 addition & 1 deletion src/peigs/src/c/exit2.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ void l_exit_ ( info, array )

me = mxmynd_ ();

fprintf(stderr, " %s My node id = %d info = %d (l_exit_) \n", array, me, *info);
fprintf(stderr, " %s My node id = %d info = %d (l_exit_) \n", array, (int)me, (int)(*info));
xerbl2_ ();
return;
}
Expand Down
2 changes: 1 addition & 1 deletion src/peigs/src/c/inverse.c
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ void inverseL ( msize, col, map, iwork, buffer, info)

pxerbla2_( &j, (char *) iscrat, map, msize, iwork + n + 1, &linfo );

linfo = -abs(linfo);
linfo = -labs(linfo);

g_exit_( &linfo, "Mapping problem or memory assignment problem INVERSE \n", map, &n, iwork, buffer );

Expand Down
4 changes: 2 additions & 2 deletions src/peigs/src/c/memreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ void memreq_(type, n, mapA, mapB, mapZ, isize, rsize, ptr_size, iscratch )
for ( indx = 0; indx < *n; indx++ ) {
if ( (iptr++ ) == NULL ) {
linfo = -4;
fprintf(stderr, " me = %d error in mapB in memreq.c \n",me);
fprintf(stderr, " me = %d error in mapB in memreq.c \n",(int)me);
l_exit_(&linfo,msg);
return;
}
Expand All @@ -194,7 +194,7 @@ void memreq_(type, n, mapA, mapB, mapZ, isize, rsize, ptr_size, iscratch )
for ( indx = 0; indx < *n; indx++ ) {
if ( (iptr++ ) == NULL ) {
linfo = -5;
fprintf(stderr, " me = %d error in mapZ in memreq.c \n",me);
fprintf(stderr, " me = %d error in mapZ in memreq.c \n",(int)me);
l_exit_(&linfo,msg);
return;
}
Expand Down
4 changes: 2 additions & 2 deletions src/peigs/src/c/memreq_f.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ void fmemreq_(type, n, mapA, mapB, mapZ, isize, rsize, ptr_size, iscratch )
for ( indx = 0; indx < *n; indx++ ) {
if ( (iptr++ ) == NULL ) {
linfo = -4;
fprintf(stderr, " me = %d error in mapB in fmemreq.c \n", me);
fprintf(stderr, " me = %d error in mapB in fmemreq.c \n", (int)me);
l_exit_(&linfo,msg);
return;
}
Expand All @@ -181,7 +181,7 @@ void fmemreq_(type, n, mapA, mapB, mapZ, isize, rsize, ptr_size, iscratch )
for ( indx = 0; indx < *n; indx++ ) {
if ( (iptr++ ) == NULL ) {
linfo = -5;
fprintf(stderr, " me = %d error in mapZ in fmemreq.c \n",me);
fprintf(stderr, " me = %d error in mapZ in fmemreq.c \n",(int)me);
l_exit_(&linfo,msg);
return;
}
Expand Down
2 changes: 1 addition & 1 deletion src/peigs/src/c/mgscs.c
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ Integer mgscs(n, vecA, mapA, b1, bn, c1, cn, iwork, work )
for ( i = 0 ; i < ncolumnsA; i++ )
if ( vecA[i] == NULL ){
linfo = -2;
fprintf(stderr, "node = %d NULL vector assignment in vecA \n", me);
fprintf(stderr, "node = %d NULL vector assignment in vecA \n", (int)me);
xerbla_( "MGSCS \n", &linfo);
}

Expand Down
2 changes: 1 addition & 1 deletion src/peigs/src/c/ortho.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ void ortho( n, m, colZ, mapZ, ibuffptr, iwork, work, ort, info)
if( *n < *m ) {
fprintf(stderr,
"Error in routine ortho m (=%d) < n (=%d). me = %d \n",
*m, *n, me);
(int)(*m), (int)(*n), (int)me);
exit(-1);
}

Expand Down
6 changes: 3 additions & 3 deletions src/peigs/src/c/pdiff.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ void pdiff( n, data, proclist, nprocs, iwork, msg1, msg2, info )
indx = indxL ( me, *nprocs, proclist);

if ( indx < 0 ) {
fprintf( stderr, " Error in pdiff. me = %d not in proclist. \n", me );
fprintf( stderr, " Error in pdiff. me = %d not in proclist. \n", (int)me );
exit(-1);
}

Expand All @@ -125,11 +125,11 @@ void pdiff( n, data, proclist, nprocs, iwork, msg1, msg2, info )
}

indx = memcmp( data, iwork, *n );
indx = abs(indx);
indx = labs(indx);

if( indx != 0 ) {
fprintf( stderr, " %s %s is different on processors %d and %d \n",
msg1, msg2, me, last_proc );
msg1, msg2, (int)me, (int)last_proc );

*info = 1;
}
Expand Down
Loading

0 comments on commit 2a42838

Please sign in to comment.