Opened 7 years ago

Last modified 7 years ago

#1438 new bug

attempt to make MPICH2 and ROMIO warning-clean under "-pedantic"

Reported by: goodell Owned by:
Priority: long-term Milestone: future
Component: mpich Keywords:
Cc: jsquyres@…, robl

Description

Jeff Squyres reports some potential portability issues in ROMIO: http://lists.mcs.anl.gov/pipermail/mpich-discuss/2011-February/009119.html

You can get GCC to emit these warnings by passing "-pedantic". Unfortunately, "-pedantic" is obnoxious sometimes, so making MPICH2 pedantic-clean will require some annoying casts and tweaks.

ad_coll_exch_new.c: In function ‘ADIOI_Print_flatlist_node’:
ad_coll_exch_new.c:52:7: warning: ISO C does not support the ‘%Ld’ gnu_printf format
ad_coll_exch_new.c:52:7: warning: ISO C does not support the ‘%Ld’ gnu_printf format
ad_coll_exch_new.c:56:7: warning: ISO C does not support the ‘%Ld’ gnu_printf format
ad_coll_exch_new.c:56:7: warning: ISO C does not support the ‘%Ld’ gnu_printf format
ad_read_coll.c: In function ‘ADIOI_Read_and_exch’:
ad_read_coll.c:687:7: warning: cast from pointer to integer of different size
ad_read_coll.c:687:7: warning: cast from pointer to integer of different size
ad_read_coll.c:740:7: warning: cast from pointer to integer of different size
ad_read_coll.c:740:7: warning: cast from pointer to integer of different size
ad_read_coll.c:741:7: warning: comparison between signed and unsigned integer expressions
ad_read_coll.c: In function ‘ADIOI_Fill_user_buffer’:
ad_read_coll.c:1035:4: warning: cast from pointer to integer of different size
ad_read_coll.c:1035:4: warning: cast from pointer to integer of different size
ad_read_coll.c:1035:4: warning: comparison between signed and unsigned integer expressions
ad_read_coll.c:1042:4: warning: cast from pointer to integer of different size
ad_read_coll.c:1042:4: warning: cast from pointer to integer of different size
ad_read_coll.c:1042:4: warning: comparison between signed and unsigned integer expressions
ad_read_str.c: In function ‘ADIOI_GEN_ReadStrided’:
ad_read_str.c:142:7: warning: comparison between signed and unsigned integer expressions
ad_read_str.c:295:7: warning: comparison between signed and unsigned integer expressions
ad_read_str.c:341:7: warning: comparison between signed and unsigned integer expressions
ad_read_str_naive.c: In function ‘ADIOI_GEN_ReadStrided_naive’:
ad_read_str_naive.c:83:5: warning: cast from pointer to integer of different size
ad_read_str_naive.c:83:5: warning: cast from pointer to integer of different size
ad_read_str_naive.c:245:9: warning: cast from pointer to integer of different size
ad_read_str_naive.c:245:9: warning: cast from pointer to integer of different size
ad_read_str_naive.c:311:9: warning: cast from pointer to integer of different size
ad_read_str_naive.c:311:9: warning: cast from pointer to integer of different size
ad_write_coll.c: In function ‘ADIOI_Exch_and_write’:
ad_write_coll.c:467:7: warning: cast from pointer to integer of different size
ad_write_coll.c:467:7: warning: cast from pointer to integer of different size
ad_write_coll.c: In function ‘ADIOI_Fill_send_buffer’:
ad_write_coll.c:925:11: warning: cast from pointer to integer of different size
ad_write_coll.c:925:11: warning: cast from pointer to integer of different size
ad_write_coll.c:925:11: warning: comparison between signed and unsigned integer expressions
ad_write_coll.c:932:4: warning: cast from pointer to integer of different size
ad_write_coll.c:932:4: warning: cast from pointer to integer of different size
ad_write_coll.c:932:4: warning: comparison between signed and unsigned integer expressions
ad_write_nolock.c: In function ‘ADIOI_NOLOCK_WriteStrided’:
ad_write_nolock.c:142:9: warning: cast from pointer to integer of different size
ad_write_nolock.c:142:9: warning: cast from pointer to integer of different size
ad_write_nolock.c:338:21: warning: comparison between signed and unsigned integer expressions
ad_write_str_naive.c: In function ‘ADIOI_GEN_WriteStrided_naive’:
ad_write_str_naive.c:85:5: warning: cast from pointer to integer of different size
ad_write_str_naive.c:85:5: warning: cast from pointer to integer of different size
ad_write_str_naive.c:246:9: warning: cast from pointer to integer of different size
ad_write_str_naive.c:246:9: warning: cast from pointer to integer of different size
ad_write_str_naive.c:312:9: warning: cast from pointer to integer of different size
ad_write_str_naive.c:312:9: warning: cast from pointer to integer of different size
malloc.c: In function ‘ADIOI_Malloc_fn’:
malloc.c:57:5: warning: ISO C90 does not support the ‘z’ gnu_printf length modifier

Attachments (1)

romio-icc-warnings.txt (23.1 KB) - added by jsquyres@… 7 years ago.
icc warnings on RHEL5.4 with icc v11.1 (20100414) from Open MPI 1.5 branch, r24491

Download all attachments as: .zip

Change History (3)

comment:1 Changed 7 years ago by thakur

  • Cc robl added

Changed 7 years ago by jsquyres@…

icc warnings on RHEL5.4 with icc v11.1 (20100414) from Open MPI 1.5 branch, r24491

comment:2 Changed 7 years ago by jsquyres@…

If you care, I just added an attachment showing the icc v11.1 (20100414) warnings with ROMIO from the Open MPI tree v1.5 branch, [24491]. Some of the warnings are a little scary, such as (this is a selective snipping from the attached file):

  CC     ad_read_coll.lo
ad_read_coll.c(687): warning #810: conversion from "char *" to "unsigned int" may lose significant bits
        ADIOI_Assert((((ADIO_Offset)(MPIR_Upint)read_buf)+req_off-real_off) == (
ADIO_Offset)(MPIR_Upint)(read_buf+req_off-real_off));

ad_read_coll.c(1035): warning #810: conversion from "void *" to "unsigned int" m
ay lose significant bits
  			ADIOI_BUF_COPY

  CC     ad_write_nolock.lo
../../adio/include/adio.h(182): warning #147: declaration is incompatible with "
ssize_t={__ssize_t={long}} readlink(const char *restrict, char *restrict, size_t
={unsigned long})" (declared at line 775 of "/usr/include/unistd.h")
  int readlink(const char *path, char *buf, size_t bufsiz);

Each of these warnings are repeated multiple times.

Note: See TracTickets for help on using tickets.