SMPI:
- Fortran bindings for DVFS have been removed.
- Add support for MPI_Irsend
+ - SMPI can now be selected by cmake's find_module(MPI) with
+ MPI_C_COMPILER, MPI_CXX_COMPILER, MPI_Fortran_COMPILER variables.
Model-Checker:
- Option model-checker/hash was removed. This is always activated now.
trying to compile on a machine where SimGrid is not installed. Please
also refer to the file header for more information.
+MPI projects should include ``find_package (MPI)`` in CMakeLists.txt. Then, the
+variables ``MPI_C_COMPILER``, ``MPI_CXX_COMPILER`` and ``MPI_Fortran_COMPILER`` should
+point to the full path of smpicc, smpicxx and smpiff respectively. Example:
+
+.. code-block:: shell
+
+ cmake -DMPI_C_COMPILER=/opt/simgrid/bin/smpicc -DMPI_CXX_COMPILER=/opt/simgrid/bin/smpicxx -DMPI_Fortran_COMPILER=/opt/simgrid/bin/smpiff .
+
+
Building your project with Makefile
-----------------------------------
C++, Fortran 77 or Fortran 90, use respectively ``smpicxx``,
``smpiff`` or ``smpif90``.
+If you use cmake, set the variables ``MPI_C_COMPILER``, ``MPI_CXX_COMPILER`` and
+``MPI_Fortran_COMPILER`` to the full path of smpicc, smpicxx and smpiff (or
+smpif90), respectively. Example:
+
+.. code-block:: shell
+
+ cmake -DMPI_C_COMPILER=/opt/simgrid/bin/smpicc -DMPI_CXX_COMPILER=/opt/simgrid/bin/smpicxx -DMPI_Fortran_COMPILER=/opt/simgrid/bin/smpiff .
+
....................
Simulating your Code
....................
fi
list_set CFLAGS @SMPI_C_FLAGS@
-list_set LINKARGS "-lm"
+list_add LINKARGS
if [ "x@WIN32@" = "x1" ]; then
list_add CFLAGS "-include" "@includedir@/smpi/smpi_main.h"
list_add LINKARGS "@libdir@\libsimgrid.dll"
list_add LINKARGS "-lsimgrid" ${LINKER_UNDEFINED_ERROR:+"-Wl,-z,defs"}
fi
+# By default, we execute the commands instead of only showing them to cmake
+Show=
list_set CMDARGS
while [ $# -gt 0 ]; do
'-compiler-version' | '--compiler-version')
${CC} --version
;;
- *)
+ '-show'|'-compile-info'|'-link-info')
+ # Dry run displaying commands instead of executing them. Useful to cmake
+ Show=echo
+ ;;
+ *)
list_add CMDARGS "${ARG}"
;;
esac
list_add_not_empty CMDLINE "${LINKARGS}"
eval $(list_get CMDLINE)
-"$@"
+$Show "$@"
list_add LINKARGS "@libdir@\libsimgrid.dll"
fi
+# By default, we execute the commands instead of only showing them to cmake
+Show=
+
list_set CMDARGS
while [ $# -gt 0 ]; do
ARG="$1"
'-compiler-version' | '--compiler-version')
${CXX} --version
;;
+ '-show'|'-compile-info'|'-link-info')
+ # Dry run displaying commands instead of executing them. Useful to cmake
+ Show=echo
+ ;;
*)
list_add CMDARGS "${ARG}"
;;
list_add_not_empty CMDLINE "${LINKARGS}"
eval $(list_get CMDLINE)
-"$@"
+$Show "$@"
NEEDS_OUTPUT=1
+# By default, we execute the commands instead of only showing them to cmake
+Show=
+
list_set CMDLINE "${REAL_FORTRAN_COMPILER}"
list_add_not_empty CMDLINE "${FFLAGS}"
while [ $# -gt 0 ]; do
NEEDS_OUTPUT=0
shift
;;
+ '-show'|'-compile-info'|'-link-info')
+ # Dry run displaying commands instead of executing them. Useful to cmake
+ Show=echo
+ ;;
*)
list_add CMDLINE "${ARG}"
;;
list_add_not_empty CMDLINE "${LINKARGS}"
eval $(list_get CMDLINE)
-"$@"
+$Show "$@"
TRACE_CALL_LOCATION=0
NEEDS_OUTPUT=1
+# By default, we execute the commands instead of only showing them to cmake
+Show=
+
list_set CMDLINE "${REAL_FORTRAN_COMPILER}"
list_add_not_empty CMDLINE "${FFLAGS}"
while [ $# -gt 0 ]; do
NEEDS_OUTPUT=0
shift
;;
+ '-show'|'-compile-info'|'-link-info')
+ # Dry run displaying commands instead of executing them. Useful to cmake
+ Show=echo
+ ;;
*)
list_add CMDLINE "${ARG}"
;;
list_add_not_empty CMDLINE "${LINKARGS}"
eval $(list_get CMDLINE)
-"$@"
+$Show "$@"