From: Augustin Degomme Date: Wed, 17 Jul 2013 14:39:34 +0000 (+0200) Subject: smpif90 changes (force gfortran for now), replace "use mpi" by include "mpif.h" X-Git-Tag: v3_9_90~128^2~60 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/cdcaca9fe8cd4af53e699047cea7df2d40c9e8a8 smpif90 changes (force gfortran for now), replace "use mpi" by include "mpif.h" --- diff --git a/include/smpi/mpif.h b/include/smpi/mpif.h index 690380e673..f8f31e01f9 100644 --- a/include/smpi/mpif.h +++ b/include/smpi/mpif.h @@ -111,7 +111,7 @@ ! This should be equal to the number of int fields in MPI_Status integer MPI_STATUS_SIZE, MPI_STATUSES_IGNORE parameter(MPI_STATUS_SIZE=4) - parameter(MPI_STATUSES_IGNORE=0) + common/smpi/ MPI_STATUSES_IGNORE integer MPI_STATUS_IGNORE(MPI_STATUS_SIZE) common/smpi/ MPI_STATUS_IGNORE @@ -119,6 +119,9 @@ integer MPI_REQUEST_NULL parameter(MPI_REQUEST_NULL=-1) + integer MPI_INTEGER_KIND + parameter(MPI_INTEGER_KIND=4) + ! These should be ordered as in smpi_f77.c integer MPI_DATATYPE_NULL, MPI_BYTE, MPI_CHARACTER, MPI_LOGICAL integer MPI_INTEGER, MPI_INTEGER1, MPI_INTEGER2, MPI_INTEGER4 diff --git a/include/smpi/smpi.h b/include/smpi/smpi.h index 1eebe9fbec..2aec62ae26 100644 --- a/include/smpi/smpi.h +++ b/include/smpi/smpi.h @@ -570,6 +570,7 @@ MPI_CALL(XBT_PUBLIC(int), MPI_Errhandler_get, (MPI_Comm comm, MPI_Errhandler* er MPI_CALL(XBT_PUBLIC(int), MPI_Error_string, (int errorcode, char* string, int* resultlen)); MPI_CALL(XBT_PUBLIC(int), MPI_Errhandler_set, (MPI_Comm comm, MPI_Errhandler errhandler)); MPI_CALL(XBT_PUBLIC(int), MPI_Comm_set_errhandler, (MPI_Comm comm, MPI_Errhandler errhandler)); +MPI_CALL(XBT_PUBLIC(int), MPI_Comm_get_errhandler, (MPI_Comm comm, MPI_Errhandler *errhandler)); MPI_CALL(XBT_PUBLIC(int), MPI_Comm_create_errhandler,( MPI_Comm_errhandler_fn *function, MPI_Errhandler *errhandler)); MPI_CALL(XBT_PUBLIC(int), MPI_Comm_call_errhandler,(MPI_Comm comm,int errorcode)); MPI_CALL(XBT_PUBLIC(int), MPI_Add_error_class,( int *errorclass)); diff --git a/src/smpi/smpif90.in b/src/smpi/smpif90.in index 9864551d2d..bb772b5364 100644 --- a/src/smpi/smpif90.in +++ b/src/smpi/smpif90.in @@ -1,11 +1,11 @@ #! /bin/bash -CC=@CMAKE_Fortran_Compiler@ +CC=gfortran INCLUDEARGS="@includeflag@" CMAKE_LINKARGS="-L@libdir@" -FFLAGS="-ff2c " +FFLAGS="-ff2c -fno-second-underscore" LINKARGS="-lsimgrid -lm -lgfortran" main_name=main TMPFILE=$(mktemp).f90 @@ -24,8 +24,9 @@ while [ -n "$1" ]; do if [ -z $SRCFILE ] ; then SRCFILE="$ARG" fi + TMPFILE=$ARG\_.f90 #replace "program main_name by subroutine user\_main (and the end clause as well)" - sed 's/[[:space:]]*program[[:space:]]*\([a-zA-Z0-9\-\_]*\)/subroutine user\_main /gI' ${ARG} > ${TMPFILE} + sed 's/[[:space:]]*program[[:space:]]*\([a-zA-Z0-9\-\_]*\)/subroutine user\_main /gI;s/[[:space:]]*use[[:space:]]*mpi/\include \"mpif\.h\" /gI' ${ARG} > ${TMPFILE} SRCFILE="${TMPFILE}" CMDLINE="${CMDLINE} ${SRCFILE} " ;; @@ -37,7 +38,7 @@ done CMDLINE="${CC} ${FFLAGS} ${CMDLINE} ${INCLUDEARGS} ${CMAKE_LINKARGS} ${LINKARGS}" -echo "${CMDLINE}" +#echo "${CMDLINE}" ${CMDLINE} if [ -f ${TMPFILE} ];then