Fix AMPI on mpi-windows builds
ampicc has to be careful on MPI builds on Windows to replace the native MS MPI libraries with its own when compiling user programs.
This has been broken recently. Not sure if it was the hwloc changes or what exactly did it. This failure was hidden by AMPI ROMIO failures b/c of hwloc earlier.
#1 Updated by Sam White over 1 year ago
ampicxx -optimize -production -optimize -production -c test.C Ignored Unrecognized argument -fno-lifetime-dse test.C test.C(93): error C2039: 'MPI_COMM': is not a member of 'MPI_Status' c:\program files\microsoft compute cluster pack\include\mpi.h(316): note: see declaration of 'MPI_Status' test.C(256): error C2039: 'MPI_COMM': is not a member of 'MPI_Status' c:\program files\microsoft compute cluster pack\include\mpi.h(316): note: see declaration of 'MPI_Status' test.C(256): error C2660: 'MPI_Recv': function does not take 6 arguments test.C(270): error C2065: 'AMPI_MY_WTH': undeclared identifier test.C(282): error C3861: 'AMPI_Migrate': identifier not found test.C(287): error C2065: 'AMPI_MY_WTH': undeclared identifier
#3 Updated by Matthias Diener over 1 year ago
This seems to be caused by the hwloc patches. In
tmp/conv-mach-opt.sh, the following lines are added by hwloc configure:
CMK_CC_FLAGS="$CMK_CC_FLAGS -D_CRT_SECURE_NO_DEPRECATE -I /cygdrive/c/PROGRA~1/MI18F8~1/Inc -I /cygdrive/c/PROGRA~1/MI18F8~1/Include -I./../include -D__CHARMC__=1 -O2 -U_FORTIFY_SOURCE " # Option added by configure script's hwloc section
This appears to override the
NO_WIN_HPC_HEADERS_FOR_AMPI case in
mpi-win64/conv-mach.sh, which is used to prevent the inclusion of the Microsoft MPI headers when compiling an AMPI application.
Patch https://charm.cs.illinois.edu/gerrit/#/c/3339/ might be the culprit.