Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: warning with gcc-11.2.0 for MPIC_Waitall #6366

Closed
thomasgillis opened this issue Jan 17, 2023 · 1 comment · Fixed by #6439
Closed

build: warning with gcc-11.2.0 for MPIC_Waitall #6366

thomasgillis opened this issue Jan 17, 2023 · 1 comment · Fixed by #6439

Comments

@thomasgillis
Copy link
Collaborator

I have been trying to compile mpich from the sources on perlmutter using gcc-11.2.0 and I get a few warnings in the collectives and the topo.

As pointed out by @raffenet this issue is similar to #5687 and the PR #5749

collectives:

CC       src/mpi/coll/allgather/lib_libmpi_la-allgather_intra_ring.lo
src/mpi/coll/allgather/allgather_intra_k_brucks.c: In function 'MPIR_Allgather_intra_k_brucks':
src/mpi/coll/allgather/allgather_intra_k_brucks.c:165:21: warning: 'MPIC_Waitall' accessing 20 bytes in a region of size 0 [-Wstringop-overflow=]
  165 |         mpi_errno = MPIC_Waitall(num_reqs, reqs, MPI_STATUSES_IGNORE);
      |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/mpi/coll/allgather/allgather_intra_k_brucks.c:165:21: note: referencing argument 3 of type 'MPI_Status *'
In file included from ./src/include/mpiimpl.h:212,
                 from src/mpi/coll/allgather/allgather_intra_k_brucks.c:7:
./src/include/mpir_coll.h:50:5: note: in a call to function 'MPIC_Waitall'
   50 | int MPIC_Waitall(int numreq, MPIR_Request * requests[], MPI_Status statuses[]);
      |     ^~~~~~~~~~~~

  CC       src/mpi/coll/allreduce/lib_libmpi_la-allreduce_inter_reduce_exchange_bcast.lo
src/mpi/coll/allreduce/allreduce_intra_tree.c: In function 'MPIR_Allreduce_intra_tree':
src/mpi/coll/allreduce/allreduce_intra_tree.c:164:21: warning: 'MPIC_Waitall' accessing 20 bytes in a region of size 0 [-Wstringop-overflow=]
  164 |         mpi_errno = MPIC_Waitall(num_reqs, reqs, MPI_STATUSES_IGNORE);
      |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/mpi/coll/allreduce/allreduce_intra_tree.c:164:21: note: referencing argument 3 of type 'MPI_Status *'
In file included from ./src/include/mpiimpl.h:212,
                 from src/mpi/coll/allreduce/allreduce_intra_tree.c:9:
./src/include/mpir_coll.h:50:5: note: in a call to function 'MPIC_Waitall'
   50 | int MPIC_Waitall(int numreq, MPIR_Request * requests[], MPI_Status statuses[]);
      |     ^~~~~~~~~~~~
  CC       src/mpi/coll/alltoall/lib_libmpi_la-alltoall_allcomm_nb.lo
src/mpi/coll/allreduce/allreduce_intra_ring.c: In function 'MPIR_Allreduce_intra_ring':
src/mpi/coll/allreduce/allreduce_intra_ring.c:88:21: warning: 'MPIC_Waitall' accessing 20 bytes in a region of size 0 [-Wstringop-overflow=]
   88 |         mpi_errno = MPIC_Waitall(2, reqs, MPI_STATUSES_IGNORE);
      |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/mpi/coll/allreduce/allreduce_intra_ring.c:88:21: note: referencing argument 3 of type 'MPI_Status *'
In file included from ./src/include/mpiimpl.h:212,
                 from src/mpi/coll/allreduce/allreduce_intra_ring.c:10:
./src/include/mpir_coll.h:50:5: note: in a call to function 'MPIC_Waitall'
   50 | int MPIC_Waitall(int numreq, MPIR_Request * requests[], MPI_Status statuses[]);
      |     ^~~~~~~~~~~~
src/mpi/coll/allreduce/allreduce_intra_recexch.c: In function 'MPIR_Allreduce_intra_recexch':
src/mpi/coll/allreduce/allreduce_intra_recexch.c:161:25: warning: 'MPIC_Waitall' accessing 20 bytes in a region of size 0 [-Wstringop-overflow=]
  161 |             mpi_errno = MPIC_Waitall(recv_nreq, recv_reqs, MPI_STATUSES_IGNORE);
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/mpi/coll/allreduce/allreduce_intra_recexch.c:161:25: note: referencing argument 3 of type 'MPI_Status *'
In file included from ./src/include/mpiimpl.h:212,
                 from src/mpi/coll/allreduce/allreduce_intra_recexch.c:8:
./src/include/mpir_coll.h:50:5: note: in a call to function 'MPIC_Waitall'
   50 | int MPIC_Waitall(int numreq, MPIR_Request * requests[], MPI_Status statuses[]);
      |     ^~~~~~~~~~~~
src/mpi/coll/allreduce/allreduce_intra_recexch.c:208:21: warning: 'MPIC_Waitall' accessing 20 bytes in a region of size 0 [-Wstringop-overflow=]
  208 |         mpi_errno = MPIC_Waitall(send_nreq, send_reqs, MPI_STATUSES_IGNORE);
      |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/mpi/coll/allreduce/allreduce_intra_recexch.c:208:21: note: referencing argument 3 of type 'MPI_Status *'
In file included from ./src/include/mpiimpl.h:212,
                 from src/mpi/coll/allreduce/allreduce_intra_recexch.c:8:
./src/include/mpir_coll.h:50:5: note: in a call to function 'MPIC_Waitall'
   50 | int MPIC_Waitall(int numreq, MPIR_Request * requests[], MPI_Status statuses[]);
      |     ^~~~~~~~~~~~
src/mpi/coll/allreduce/allreduce_intra_recexch.c:212:21: warning: 'MPIC_Waitall' accessing 20 bytes in a region of size 0 [-Wstringop-overflow=]
  212 |         mpi_errno = MPIC_Waitall((k - 1), recv_reqs, MPI_STATUSES_IGNORE);
      |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/mpi/coll/allreduce/allreduce_intra_recexch.c:212:21: note: referencing argument 3 of type 'MPI_Status *'
In file included from ./src/include/mpiimpl.h:212,
                 from src/mpi/coll/allreduce/allreduce_intra_recexch.c:8:
./src/include/mpir_coll.h:50:5: note: in a call to function 'MPIC_Waitall'
   50 | int MPIC_Waitall(int numreq, MPIR_Request * requests[], MPI_Status statuses[]);
      |     ^~~~~~~~~~~~
src/mpi/coll/allreduce/allreduce_intra_recexch.c:253:29: warning: 'MPIC_Waitall' accessing 20 bytes in a region of size 0 [-Wstringop-overflow=]
  253 |                 mpi_errno = MPIC_Waitall(send_nreq, send_reqs, MPI_STATUSES_IGNORE);
      |                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/mpi/coll/allreduce/allreduce_intra_recexch.c:253:29: note: referencing argument 3 of type 'MPI_Status *'
In file included from ./src/include/mpiimpl.h:212,
                 from src/mpi/coll/allreduce/allreduce_intra_recexch.c:8:
./src/include/mpir_coll.h:50:5: note: in a call to function 'MPIC_Waitall'
   50 | int MPIC_Waitall(int numreq, MPIR_Request * requests[], MPI_Status statuses[]);
      |     ^~~~~~~~~~~~
src/mpi/coll/allreduce/allreduce_intra_recexch.c:256:29: warning: 'MPIC_Waitall' accessing 20 bytes in a region of size 0 [-Wstringop-overflow=]
  256 |                 mpi_errno = MPIC_Waitall((k - 1), recv_reqs + (k - 1), MPI_STATUSES_IGNORE);
      |                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/mpi/coll/allreduce/allreduce_intra_recexch.c:256:29: note: referencing argument 3 of type 'MPI_Status *'
In file included from ./src/include/mpiimpl.h:212,
                 from src/mpi/coll/allreduce/allreduce_intra_recexch.c:8:
./src/include/mpir_coll.h:50:5: note: in a call to function 'MPIC_Waitall'
   50 | int MPIC_Waitall(int numreq, MPIR_Request * requests[], MPI_Status statuses[]);
      |     ^~~~~~~~~~~~
src/mpi/coll/allreduce/allreduce_intra_recexch.c:299:21: warning: 'MPIC_Waitall' accessing 20 bytes in a region of size 0 [-Wstringop-overflow=]
  299 |         mpi_errno = MPIC_Waitall(i, send_reqs, MPI_STATUSES_IGNORE);
      |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/mpi/coll/allreduce/allreduce_intra_recexch.c:299:21: note: referencing argument 3 of type 'MPI_Status *'
In file included from ./src/include/mpiimpl.h:212,
                 from src/mpi/coll/allreduce/allreduce_intra_recexch.c:8:
./src/include/mpir_coll.h:50:5: note: in a call to function 'MPIC_Waitall'
   50 | int MPIC_Waitall(int numreq, MPIR_Request * requests[], MPI_Status statuses[]);
      |     ^~~~~~~~~~~~
src/mpi/coll/allreduce/allreduce_intra_k_reduce_scatter_allgather.c: In function 'MPIR_Allreduce_intra_k_reduce_scatter_allgather':
src/mpi/coll/allreduce/allreduce_intra_k_reduce_scatter_allgather.c:182:29: warning: 'MPIC_Waitall' accessing 20 bytes in a region of size 0 [-Wstringop-overflow=]
  182 |                 mpi_errno = MPIC_Waitall(num_rreq, recv_reqs, MPI_STATUSES_IGNORE);
      |                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/mpi/coll/allreduce/allreduce_intra_k_reduce_scatter_allgather.c:182:29: note: referencing argument 3 of type 'MPI_Status *'
In file included from ./src/include/mpiimpl.h:212,
                 from src/mpi/coll/allreduce/allreduce_intra_k_reduce_scatter_allgather.c:8:
./src/include/mpir_coll.h:50:5: note: in a call to function 'MPIC_Waitall'
   50 | int MPIC_Waitall(int numreq, MPIR_Request * requests[], MPI_Status statuses[]);
      |     ^~~~~~~~~~~~
src/mpi/coll/allreduce/allreduce_intra_k_reduce_scatter_allgather.c:233:25: warning: 'MPIC_Waitall' accessing 20 bytes in a region of size 0 [-Wstringop-overflow=]
  233 |             mpi_errno = MPIC_Waitall((k - 1), recv_reqs, MPI_STATUSES_IGNORE);
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/mpi/coll/allreduce/allreduce_intra_k_reduce_scatter_allgather.c:233:25: note: referencing argument 3 of type 'MPI_Status *'
In file included from ./src/include/mpiimpl.h:212,
                 from src/mpi/coll/allreduce/allreduce_intra_k_reduce_scatter_allgather.c:8:
./src/include/mpir_coll.h:50:5: note: in a call to function 'MPIC_Waitall'
   50 | int MPIC_Waitall(int numreq, MPIR_Request * requests[], MPI_Status statuses[]);
      |     ^~~~~~~~~~~~
src/mpi/coll/allreduce/allreduce_intra_k_reduce_scatter_allgather.c:256:33: warning: 'MPIC_Waitall' accessing 20 bytes in a region of size 0 [-Wstringop-overflow=]
  256 |                     mpi_errno = MPIC_Waitall((k - 1), recv_reqs + (k - 1), MPI_STATUSES_IGNORE);
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/mpi/coll/allreduce/allreduce_intra_k_reduce_scatter_allgather.c:256:33: note: referencing argument 3 of type 'MPI_Status *'
In file included from ./src/include/mpiimpl.h:212,
                 from src/mpi/coll/allreduce/allreduce_intra_k_reduce_scatter_allgather.c:8:
./src/include/mpir_coll.h:50:5: note: in a call to function 'MPIC_Waitall'
   50 | int MPIC_Waitall(int numreq, MPIR_Request * requests[], MPI_Status statuses[]);
      |     ^~~~~~~~~~~~
src/mpi/coll/allreduce/allreduce_intra_k_reduce_scatter_allgather.c:262:25: warning: 'MPIC_Waitall' accessing 20 bytes in a region of size 0 [-Wstringop-overflow=]
  262 |             mpi_errno = MPIC_Waitall(num_sreq, send_reqs, MPI_STATUSES_IGNORE);
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/mpi/coll/allreduce/allreduce_intra_k_reduce_scatter_allgather.c:262:25: note: referencing argument 3 of type 'MPI_Status *'
In file included from ./src/include/mpiimpl.h:212,
                 from src/mpi/coll/allreduce/allreduce_intra_k_reduce_scatter_allgather.c:8:
./src/include/mpir_coll.h:50:5: note: in a call to function 'MPIC_Waitall'
   50 | int MPIC_Waitall(int numreq, MPIR_Request * requests[], MPI_Status statuses[]);
      |     ^~~~~~~~~~~~
src/mpi/coll/allreduce/allreduce_intra_k_reduce_scatter_allgather.c:282:25: warning: 'MPIC_Waitall' accessing 20 bytes in a region of size 0 [-Wstringop-overflow=]
  282 |             mpi_errno = MPIC_Waitall(i, send_reqs, MPI_STATUSES_IGNORE);
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/mpi/coll/allreduce/allreduce_intra_k_reduce_scatter_allgather.c:282:25: note: referencing argument 3 of type 'MPI_Status *'
In file included from ./src/include/mpiimpl.h:212,
                 from src/mpi/coll/allreduce/allreduce_intra_k_reduce_scatter_allgather.c:8:
./src/include/mpir_coll.h:50:5: note: in a call to function 'MPIC_Waitall'
   50 | int MPIC_Waitall(int numreq, MPIR_Request * requests[], MPI_Status statuses[]);
      |     ^~~~~~~~~~~~

topologies:

CC       src/mpi/topo/lib_libmpi_la-topoutil.lo
src/mpi/topo/dist_graph_create.c: In function 'MPIR_Dist_graph_create_impl':
src/mpi/topo/dist_graph_create.c:260:17: warning: 'MPIC_Waitall' accessing 20 bytes in a region of size 0 [-Wstringop-overflow=]
  260 |     mpi_errno = MPIC_Waitall(idx, reqs, MPI_STATUSES_IGNORE);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/mpi/topo/dist_graph_create.c:260:17: note: referencing argument 3 of type 'MPI_Status *'
In file included from ./src/include/mpiimpl.h:212,
                 from src/mpi/topo/dist_graph_create.c:6:
./src/include/mpir_coll.h:50:5: note: in a call to function 'MPIC_Waitall'
   50 | int MPIC_Waitall(int numreq, MPIR_Request * requests[], MPI_Status statuses[]);
      |     ^~~~~~~~~~~~
@hzhou
Copy link
Contributor

hzhou commented Jan 18, 2023

Just need to declare MPIC_Watiall using status pointers rather as array.

@hzhou hzhou changed the title warning with gcc-11.2.0 in collectives and few other places build: warning with gcc-11.2.0 for MPIC_Waitall Mar 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants