From: Martin Quinson Date: Wed, 7 Mar 2018 11:01:59 +0000 (+0100) Subject: more SMPI troubleshooting X-Git-Tag: v3.19~136 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/d33b57c6b1125ecac63144e45e7c90ef46669155 more SMPI troubleshooting --- diff --git a/doc/doxygen/module-smpi.doc b/doc/doxygen/module-smpi.doc index 06d67b6153..13544860e3 100644 --- a/doc/doxygen/module-smpi.doc +++ b/doc/doxygen/module-smpi.doc @@ -45,7 +45,9 @@ requires some specific care from you. - @ref SMPI_adapting_speed - @ref SMPI_accuracy - @ref SMPI_troubleshooting - - @ref SMPI_trouble_buildchain + - @ref SMPI_trouble_configure_refuses_smpicc + - @ref SMPI_trouble_configure_dont_find_smpicc + - @ref SMPI_trouble_useconds_t @section SMPI_use Using SMPI @@ -626,11 +628,10 @@ in modeling distributed systems. @section SMPI_troubleshooting Troubleshooting with SMPI -@subsection SMPI_trouble_buildchain My ./configure refuses to use smpicc +@subsection SMPI_trouble_configure_refuses_smpicc ./configure refuses to use smpicc -Alas, some building infrastructures cannot use smpicc as a project -compiler, and your ./configure may report that the compiler -is not functional. If this happens, define the +If your ./configure reports that the compiler is not +functional or that you are cross-compiling, try to define the SMPI_PRETEND_CC environment variable before running the configuration. @@ -639,12 +640,44 @@ SMPI_PRETEND_CC=1 ./configure # here come the configure parameters make @endverbatim +Indeed, the programs compiled with smpicc cannot be executed +without smpirun, while configure wants to test them directly. +With SMPI_PRETEND_CC, any program compiled with smpicc stops +and returns 0 before doing anything that would fail without +smpirun. + \warning Make sure that SMPI_PRETEND_CC is only set when calling ./configure, - not during the actual compilation. With that variable, smpicc does - not do anything, to not hurt the ./configure feelings. But you need - smpicc do actually do something to get your application compiled. + not during the actual execution, or any program compiled with smpicc + will stop before starting. + +@subsection SMPI_trouble_configure_dont_find_smpicc ./configure does not pick smpicc as a compiler + +In addition to the previous answers, some projects also need to be +explicitely told what compiler to use, as follows: + +@verbatim +SMPI_PRETEND_CC=1 ./configure CC=smpicc # here come the other configure parameters +make +@endverbatim + +Maybe your configure is using another variable, such as cc or +similar. Just check the logs. + +@subsection SMPI_trouble_useconds_t error: unknown type name 'useconds_t' + +Try to add -D_GNU_SOURCE to your compilation line to get ride +of that error. + +The reason is that SMPI provides its own version of usleep(3) +to override it and to block in the simulation world, not in the real +one. It needs the useconds_t type for that, which is declared +only if you declare _GNU_SOURCE before including +unistd.h. If your project includes that header file before +SMPI, then you need to ensure that you pass the right configuration +defines as advised above. + */