Scheduled Downtime
On Friday 21 April 2023 @ 5pm MT, this website will be down for maintenance and expected to return online the morning of 24 April 2023 at the latest

Error when building mpich with gcc 12.2 : multiple definition of `HYD_pmcd_pmip'

Perhaps some mpich bug as described here:


Here is the exact error below.

Strangely I do not get this error when using Intel OneAPI 2022.

I have these environement flags set:

FFLAGS=-m64 -w -fallow-argument-mismatch -O2
FCGLAGS=-m64

Code:
make[3]: Entering directory '/gpfs/users/home/wrf/Build_WRF/LIBRARIES/mpich-3.0.4/src/pm/hydra'
  CCLD     libpm.la
  CCLD     hydra_pmi_proxy
/gpfs/software/milan9/apps/linux-rhel9-zen3/gcc-11.3.1/binutils-2.38-y2h43mcmr5vxfohxrkt4r6qgjz56fpyc/bin/ld: hydra_pmi_proxy-pmip_cb.o:/gpfs/users/home/wrf/Build_WRF/LIBRARIES/mpich-3.0.4/src/pm/hydra/./pm/pmiserv/pmip_cb.c:15: multiple definition of `HYD_pmcd_pmip'; hydra_pmi_proxy-pmip.o:/gpfs/users/home/wrf/Build_WRF/LIBRARIES/mpich-3.0.4/src/pm/hydra/./pm/pmiserv/pmip.c:14: first defined here
/gpfs/software/milan9/apps/linux-rhel9-zen3/gcc-11.3.1/binutils-2.38-y2h43mcmr5vxfohxrkt4r6qgjz56fpyc/bin/ld: hydra_pmi_proxy-pmip_utils.o:/gpfs/users/home/wrf/Build_WRF/LIBRARIES/mpich-3.0.4/src/pm/hydra/./pm/pmiserv/pmip_utils.c:14: multiple definition of `HYD_pmcd_pmip'; hydra_pmi_proxy-pmip.o:/gpfs/users/home/wrf/Build_WRF/LIBRARIES/mpich-3.0.4/src/pm/hydra/./pm/pmiserv/pmip.c:14: first defined here
collect2: error: ld returned 1 exit status
make[3]: *** [Makefile:938: hydra_pmi_proxy] Error 1
make[3]: Leaving directory '/gpfs/users/home/wrf/Build_WRF/LIBRARIES/mpich-3.0.4/src/pm/hydra'
make[2]: *** [Makefile:1808: all-recursive] Error 1
make[2]: Leaving directory '/gpfs/users/home/wrf/Build_WRF/LIBRARIES/mpich-3.0.4/src/pm/hydra'
make[1]: *** [Makefile:23607: all-recursive] Error 1
make[1]: Leaving directory '/gpfs/users/home/wrf/Build_WRF/LIBRARIES/mpich-3.0.4'
make: *** [Makefile:6706: all] Error 2
 
Just an update I resolved this issue by using mpich-4.1.2 . I also had to edit configure.wrf with:

CPPFLAGS=-I/gpfs/users/home/wrf/Build_WRF/LIBRARIES/mpich/include .......

Without that I was getting build errors about missing mpif.h file.

Not sure this is all "kosher" with 4.3/4.4 ? Or possibly I am following outdated build instructions? I am using these steps:

Compiling WRF
 
Last edited:
Can confirm that adding "-fcommon" to the CPPFLAGS variable and setting these variables fixed the issue:

FFLAGS=-m64 -w -fallow-argument-mismatch -O2
FCGLAGS=-m64
 
Top