Clean up mpi.h inclusion on Windows 58/5058/1
authorEvan Ramos <evan@hpccharm.com>
Thu, 4 Apr 2019 03:20:09 +0000 (22:20 -0500)
committerEvan Ramos <evan@hpccharm.com>
Thu, 4 Apr 2019 03:22:06 +0000 (22:22 -0500)
Change-Id: Id9509211da7bf368a6a9b9f18834bea2fb9f304e

src/arch/mpi-win64/conv-mach.sh
src/libs/ck-libs/ampi/ampiCC
src/scripts/charmc

index 81d7a3d41673f3ac1ba1c15b49f2fdc60107356f..060ff9bc5fd58559480bb9f8c1e2a8f5478541b6 100644 (file)
@@ -29,14 +29,9 @@ else
 fi
 HPC_SDK=`cygpath -d "$HPC_SDK"`
 
-# These include paths for MS MPI (added through the $INCLUDE variable) have a
-# lower priority than paths added via -I, thus allowing us to use AMPI's mpi.h
-# when compiling AMPI applications.
-export INCLUDE="$INCLUDE;`cygpath -wl "$HPC_SDK\Inc"`;`cygpath -wl "$HPC_SDK\Include"`"
 MSMPI_INCLUDE="-I `cygpath -u "$HPC_SDK\Include"`"
 if test -n "MSMPI_SUFFIX_INC"
 then
-  export INCLUDE="$INCLUDE;`cygpath -wl "$HPC_SDK\Include$MSMPI_SUFFIX_INC"`"
   MSMPI_INCLUDE="-I `cygpath -u "$HPC_SDK\Include$MSMPI_SUFFIX_INC"` $MSMPI_INCLUDE"
 fi
 
index 3e4cac62189c2de40bdea3fb3c3137cee74ff395..2944e1150532e2f497e53f14ebf52c1f6dafbd63 100755 (executable)
@@ -42,20 +42,13 @@ done
 
 eval processArgs "$@"
 
-AMPICC_EXTRA_OPTS=''
-
-if test "$AMPICC_MODE" = 'ampi'
-then
-  AMPICC_EXTRA_OPTS="$AMPICC_EXTRA_OPTS -I$CHARMBIN/../include/ampi"
-fi
-
 [ -n "$ROMIO_CONFIGURE" -a -z "$MPITEST" ] && STANDALONE='true'
 
 [ -n "$STANDALONE" ] && ARGS="$ARGS -standalone"
 
 [ -f $CHARMBIN/../lib/libampiromio.a -a -z "$STANDALONE" -a -z "$ROMIO_CONFIGURE" ] && ROMIO='-lampiromio'
 
-$CHARMBIN/charmc -language $AMPICC_MODE -default-to-aout $AMPICC_EXTRA_OPTS $ARGS $ROMIO
+$CHARMBIN/charmc -language $AMPICC_MODE -default-to-aout $ARGS $ROMIO
 status=$?
 
 # Copy ampirun, but do not overwrite it if it already exists.
index f93bddce187c0e43974d9961942fea2543e8e41a..54771c280724d604970d88e11ef47b2992911e15 100755 (executable)
@@ -66,6 +66,7 @@ USE_F90_LIBRARIES="0"
 USE_F77_LIBRARIES="0"  
 F90_MODDIR=
 AMPIMAIN=""
+AMPI=""
 AMPIF=""
 COPYTO=""        
 MODCOPIES=""        
@@ -440,7 +441,7 @@ do
        "-language")
                # Parse out some fake languages (that are actually modules)
                case "$1" in
-               "ampi") AddModules tcharmmain ampi ;;
+               "ampi") AddModules tcharmmain ampi ; AMPI="1" ;;
                "ampif") AddModules tcharmmain ampif ; USE_F90_LIBRARIES="1" ; AMPIF="1" ;;
                "armci") AddModules tcharmmain armci ;;
                "armcif") AddModules tcharmmain armci ; USE_F90_LIBRARIES="1" ;;
@@ -1378,6 +1379,11 @@ then
        OBJECTFILES="$CHARMLIB/lib$AMPIMAIN.o $OBJECTFILES"
 fi
 
+if [ -n "$AMPI" ]
+then
+  CMK_SYSINC="-I$CHARMINC/ampi $CMK_SYSINC"
+fi
+
 if [ "$TLSGLOBALS" = "1" ]
 then
     if [ "$CMK_GDIR" = "uth" ]