File tree Expand file tree Collapse file tree 3 files changed +59
-20
lines changed
Expand file tree Collapse file tree 3 files changed +59
-20
lines changed Original file line number Diff line number Diff line change @@ -367,20 +367,31 @@ if(CMK_AMPI_WITH_ROMIO)
367367 ExternalProject_Add(romio
368368 URL ${CMAKE_CURRENT_SOURCE_DIR} /romio
369369 CONFIGURE_COMMAND cd ${romio_dir} &&
370- export MPI_IMPL=ampi &&
371- export FROM_MPICH=no &&
372- export FROM_MPICH2=no &&
373- export FROM_LAM=no &&
374- export F77=${CMAKE_BINARY_DIR} /bin/ampif90 &&
375- export CC=${CMAKE_BINARY_DIR} /bin/ampicc &&
376370 ./configure
377371 --disable-aio
378372 --enable-f77=${romio_f77}
379373 --enable-static =yes
380374 --enable-shared=no
381375 --disable-weak-symbols
376+ MPI_IMPL=ampi
377+ FROM_MPICH=no
378+ FROM_LAM=no
379+ FROM_OMPI=no
380+ MPI_LIB=
381+ CC=${CMAKE_BINARY_DIR} /bin/ampicc
382+ F77=${CMAKE_BINARY_DIR} /bin/ampif77
383+ FC=${CMAKE_BINARY_DIR} /bin/ampif90
382384 CFLAGS=${ROMIO_FLAGS}
383385 FFLAGS=${ROMIO_FLAGS}
386+ FCFLAGS=${ROMIO_FLAGS}
387+ CPP=
388+ CPPFLAGS=
389+ LIBS=
390+ LDFLAGS=
391+ TEST_CC=${CMAKE_BINARY_DIR} /bin/ampicc
392+ TEST_F77=${CMAKE_BINARY_DIR} /bin/ampif77
393+ USER_CFLAGS=${ROMIO_FLAGS}
394+ USER_FFLAGS=${ROMIO_FLAGS}
384395 > /dev/null
385396 COMMAND cp -f ${romio_dir} /include /mpio.h ${CMAKE_BINARY_DIR} /include /
386397 COMMAND cp -f ${romio_dir} /include /mpiof.h ${CMAKE_BINARY_DIR} /include /
Original file line number Diff line number Diff line change @@ -112,20 +112,33 @@ all: $(MAJOR_TARGETS) $(COMPATLIB) $(ROMIO)
112112
113113$(ROMIO ) : headers
114114 @echo " Building ROMIO"
115- cd romio && \
116- MPI_IMPL=" ampi" FROM_MPICH=" no" FROM_LAM=" no" FROM_OMPI=" no" \
117- MPI_LIB=" " \
118- CFLAGS=" $( OPTS) $( ROMIO_FLAGS) " \
119- FFLAGS=" $( OPTS) $( ROMIO_FLAGS) " \
120- F77=" $( CDIR) /bin/ampif90" \
121- CC=" $( CDIR) /bin/ampicc" \
122- ./configure \
123- --disable-aio \
124- --enable-f77=$(ROMIO_F77 ) \
125- --enable-static=yes \
126- --enable-shared=no \
127- --disable-weak-symbols \
128- --srcdir=` pwd` \
115+ cd romio && \
116+ ./configure \
117+ --disable-aio \
118+ --enable-f77=$(ROMIO_F77 ) \
119+ --enable-static=yes \
120+ --enable-shared=no \
121+ --disable-weak-symbols \
122+ --srcdir=" $( pwd) " \
123+ MPI_IMPL=ampi \
124+ FROM_MPICH=no \
125+ FROM_LAM=no \
126+ FROM_OMPI=no \
127+ MPI_LIB= \
128+ CC=" $( CDIR) /bin/ampicc" \
129+ F77=" $( CDIR) /bin/ampif77" \
130+ FC=" $( CDIR) /bin/ampif90" \
131+ CFLAGS=" $( OPTS) $( ROMIO_FLAGS) " \
132+ FFLAGS=" $( OPTS) $( ROMIO_FLAGS) " \
133+ FCFLAGS=" $( OPTS) $( ROMIO_FLAGS) " \
134+ CPP= \
135+ CPPFLAGS= \
136+ LIBS= \
137+ LDFLAGS= \
138+ TEST_CC=" $( CDIR) /bin/ampicc" \
139+ TEST_F77=" $( CDIR) /bin/ampif77" \
140+ USER_CFLAGS=" $( OPTS) $( ROMIO_FLAGS) " \
141+ USER_FFLAGS=" $( OPTS) $( ROMIO_FLAGS) " \
129142 || ( cat config.log ; exit 1 )
130143
131144 cp romio/include/mpio.h romio/include/mpiof.h romio/include/mpio_functions.h $(CDIR)/include
Original file line number Diff line number Diff line change @@ -17,6 +17,21 @@ if [ "$1" = "@CMAKE_C_COMPILER@" ]; then shift; fi
1717if [ " $1 " = " @CMAKE_CXX_COMPILER@" ]; then shift ; fi
1818if [ " $1 " = " @CMAKE_Fortran_COMPILER@" ]; then shift ; fi
1919
20+ # Avoid mpicc using these variables, particularly during configure phases.
21+ unset -v CC
22+ unset -v CXX
23+ unset -v F77
24+ unset -v FC
25+ unset -v CFLAGS
26+ unset -v CXXFLAGS
27+ unset -v FFLAGS
28+ unset -v FCFLAGS
29+ unset -v CPP
30+ unset -v CXXCPP
31+ unset -v CPPFLAGS
32+ unset -v LIBS
33+ unset -v LDFLAGS
34+
2035# Prepare aliases for the external commands we use--
2136# Note that adding /bin/ to everything breaks Cygwin32.
2237RM=" rm -f"
You can’t perform that action at this time.
0 commit comments