Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Stop trying to build on native WIN32, it's broken anyway
authorMartin Quinson <martin.quinson@ens-rennes.fr>
Sat, 7 Jan 2023 20:54:21 +0000 (21:54 +0100)
committerMartin Quinson <martin.quinson@ens-rennes.fr>
Tue, 10 Jan 2023 21:31:10 +0000 (22:31 +0100)
75 files changed:
.appveyor.yml [deleted file]
CMakeLists.txt
ChangeLog
docs/source/Configuring_SimGrid.rst
docs/source/Doxyfile
docs/source/Installing_SimGrid.rst
examples/cpp/CMakeLists.txt
examples/smpi/NAS/CMakeLists.txt
include/smpi/smpi.h
include/xbt/base.h
include/xbt/log.h
src/instr/instr_config.cpp
src/internal_config.h.in
src/kernel/EngineImpl.cpp
src/kernel/context/Context.cpp
src/kernel/context/Context.hpp
src/kernel/context/ContextRaw.cpp
src/kernel/context/ContextSwapped.cpp
src/kernel/context/ContextThread.cpp
src/mc/mc_global.cpp
src/s4u/s4u_Engine.cpp
src/simgrid/sg_config.cpp
src/smpi/internals/smpi_bench.cpp
src/smpi/internals/smpi_memory.cpp
src/smpi/internals/smpi_shared.cpp
src/smpi/smpicc.in
src/smpi/smpicxx.in
src/sthread/sthread_impl.cpp
src/surf/surf_interface.cpp
src/xbt/config.cpp
src/xbt/xbt_main.cpp
src/xbt/xbt_os_file.cpp
src/xbt/xbt_os_time.c
teshsuite/kernel/CMakeLists.txt
teshsuite/platforms/CMakeLists.txt
teshsuite/smpi/CMakeLists.txt
teshsuite/smpi/mpich3-test/CMakeLists.txt
teshsuite/smpi/mpich3-test/attr/CMakeLists.txt
teshsuite/smpi/mpich3-test/coll/CMakeLists.txt
teshsuite/smpi/mpich3-test/comm/CMakeLists.txt
teshsuite/smpi/mpich3-test/datatype/CMakeLists.txt
teshsuite/smpi/mpich3-test/errhan/CMakeLists.txt
teshsuite/smpi/mpich3-test/f77/attr/CMakeLists.txt
teshsuite/smpi/mpich3-test/f77/coll/CMakeLists.txt
teshsuite/smpi/mpich3-test/f77/comm/CMakeLists.txt
teshsuite/smpi/mpich3-test/f77/datatype/CMakeLists.txt
teshsuite/smpi/mpich3-test/f77/ext/CMakeLists.txt
teshsuite/smpi/mpich3-test/f77/info/CMakeLists.txt
teshsuite/smpi/mpich3-test/f77/init/CMakeLists.txt
teshsuite/smpi/mpich3-test/f77/pt2pt/CMakeLists.txt
teshsuite/smpi/mpich3-test/f77/rma/CMakeLists.txt
teshsuite/smpi/mpich3-test/f77/topo/CMakeLists.txt
teshsuite/smpi/mpich3-test/f77/util/CMakeLists.txt
teshsuite/smpi/mpich3-test/f90/coll/CMakeLists.txt
teshsuite/smpi/mpich3-test/f90/datatype/CMakeLists.txt
teshsuite/smpi/mpich3-test/f90/info/CMakeLists.txt
teshsuite/smpi/mpich3-test/f90/init/CMakeLists.txt
teshsuite/smpi/mpich3-test/f90/pt2pt/CMakeLists.txt
teshsuite/smpi/mpich3-test/f90/rma/CMakeLists.txt
teshsuite/smpi/mpich3-test/f90/util/CMakeLists.txt
teshsuite/smpi/mpich3-test/group/CMakeLists.txt
teshsuite/smpi/mpich3-test/info/CMakeLists.txt
teshsuite/smpi/mpich3-test/init/CMakeLists.txt
teshsuite/smpi/mpich3-test/io/CMakeLists.txt
teshsuite/smpi/mpich3-test/perf/CMakeLists.txt
teshsuite/smpi/mpich3-test/pt2pt/CMakeLists.txt
teshsuite/smpi/mpich3-test/rma/CMakeLists.txt
teshsuite/smpi/mpich3-test/topo/CMakeLists.txt
tools/cmake/Flags.cmake
tools/cmake/Java.cmake
tools/cmake/MaintainerMode.cmake
tools/cmake/MakeLibWin.cmake [deleted file]
tools/cmake/Option.cmake
tools/cmake/Tests.cmake
tools/tesh/CMakeLists.txt

diff --git a/.appveyor.yml b/.appveyor.yml
deleted file mode 100644 (file)
index c0bd725..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-# This file automatize the testing of SimGrid on Windows using the appveyor.com continuous integration service
-#
-# Build logs: https://ci.appveyor.com/project/simgrid/simgrid
-
-# Documentation: https://www.appveyor.com/docs/
-#                https://www.appveyor.com/docs/installed-software/
-
-image:
-  - Visual Studio 2019
-#  - Ubuntu
-
-version: "{build}"
-clone_depth: 1
-
-# scripts that are called at very beginning, before repo cloning
-init:
-- git config --global core.longpaths true
-- git config --global core.autocrlf input
-
-branches:
-  only:
-     - master
-     - appveyor
-
-environment:
-  global:
-    BOOST_ROOT: C:\Libraries\boost_1_77_0
-
-install:
-# Strawberry perl is the one to work with gcc; AppVeyor provides ActiveState perl, which is the one to work with visual.
-# This package is so outdated and broken that we cannot use it anymore. So we build without perl
-# - choco install --limit-output strawberryperl --version 5.20.1.1
-# - SET PATH=C:\strawberry\c\bin;C:\strawberry\perl\site\bin;C:\strawberry\perl\bin;%PATH%
-# We need python v3
-- cmd: SET PATH=C:\Python37-x64;%PATH% # We need python v3
-# Ugly hack to ignore versions 3.8 and later of Python
-- rename "C:\Python38-x64\python.exe" "python-ignored.exe"
-- rename "C:\Python39-x64\python.exe" "python-ignored.exe"
-- rename "C:\Python310-x64\python.exe" "python-ignored.exe"
-- rename "C:\Python311-x64\python.exe" "python-ignored.exe"
-# Use the mingw-w64 provided by Appveyor (must be placed before Perl in the path)
-- cmd: SET PATH=C:\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin\;%PATH%
-# Work around a bug on appveyor where the default sh is not the one I expect
-- rename "C:\Program Files\Git\usr\bin\sh.exe" "sh-ignored.exe"
-# We need pybind11. SimGrid will pick it automatically if the subdir is here
-- cmd: git clone --branch stable --depth=1 https://github.com/pybind/pybind11.git
-
-before_build:
-  - cmd: if not exist C:\"Program Files"\Eigen\include\eigen3\Eigen\Core (
-            curl -LO https://gitlab.com/libeigen/eigen/-/archive/3.4.0/eigen-3.4.0.tar.gz &&
-            cmake -E tar zxf eigen-3.4.0.tar.gz &&
-            cd eigen-3.4.0 &&
-            mkdir build &&
-            cd build &&
-            cmake -G "MinGW Makefiles" -DCMAKE_INSTALL_PREFIX=C:\projects .. &&
-            cmake --build . --target install &&
-            cd ..\..
-         ) else (echo Using cached Eigen3)
-
-build_script:
-- cmake -G "MinGW Makefiles" -Denable_documentation=OFF -Denable_java=ON -Denable_msg=ON -Denable_smpi=OFF -Denable_mallocators=OFF -Denable_lto=OFF .
-- mingw32-make.exe VERBOSE=1 java-all python-bindings # Only the Java and Python parts
-- ctest --output-on-failure -R java
-- ctest --output-on-failure -R python
-
-artifacts:
-- path: simgrid.jar
-  name: jarfile
-
-# IRC notifications, even if https://github.com/appveyor/ci/issues/88 is not closed yet
-on_failure:
-  - "python tools/appveyor-irc-notify.py simgrid [{project_name}:{branch}] {short_commit}: \"{message}\" ({author}) {color_red}Failed,Details: {build_url},Commit: {commit_url}"
-#on_success:
-#  - "python tools/appveyor-irc-notify.py simgrid [{project_name}:{branch}] {short_commit}: \"{message}\" ({author}) {color_green}Succeeded,Details: {build_url},Commit: {commit_url}"
index 10e82d7..583e482 100644 (file)
@@ -10,6 +10,10 @@ else()
   set(release_version "${SIMGRID_VERSION_MAJOR}.${SIMGRID_VERSION_MINOR}.${SIMGRID_VERSION_PATCH}")
 endif()
 
+if(WIN32 OR MINGW)
+  message(FATAL "SimGrid does not build on native windows, nor with MinGW. Please use WSL2 instead.")
+endif()
+
 message(STATUS "Configuring SimGrid v${release_version}")
 
 set(SIMGRID_VERSION_STRING "SimGrid version ${release_version}")
@@ -114,9 +118,6 @@ endif()
 ### SET THE LIBRARY EXTENSION
 if(APPLE)
   set(LIB_EXE "dylib")
-elseif(WIN32)
-  set(LIB_EXE "a")
-  set(BIN_EXE ".exe")
 else()
   set(LIB_EXE "so")
 endif()
@@ -173,15 +174,6 @@ if(NOT CMAKE_CROSSCOMPILING AND EXISTS /usr/include/)
   set(INTERNAL_INCLUDES ${INTERNAL_INCLUDES} /usr/include/)
 endif()
 
-if(WIN32)
-  set(CMAKE_INCLUDE_WIN "${CMAKE_C_COMPILER}")
-  set(CMAKE_LIB_WIN "${CMAKE_C_COMPILER}")
-  string(REGEX REPLACE "/bin/gcc.*" "/include"  CMAKE_INCLUDE_WIN "${CMAKE_INCLUDE_WIN}")
-  string(REGEX REPLACE "/bin/gcc.*" "/lib"  CMAKE_LIB_WIN "${CMAKE_LIB_WIN}")
-  set(INTERNAL_INCLUDES ${INTERNAL_INCLUDES} ${CMAKE_INCLUDE_WIN})
-  unset(CMAKE_INCLUDE_WIN)
-endif()
-
 # library dependency cannot start with a space (CMP0004), so initialize it with something that is never deactivated.
 set(SIMGRID_DEP "-lm")
 
@@ -198,9 +190,7 @@ IF(CMAKE_SYSTEM_PROCESSOR MATCHES ".86|AMD64|amd64")
     set(SIMGRID_PROCESSOR_i686 0)
     set(SIMGRID_PROCESSOR_x86_64 1)
   ENDIF()
-  if (WIN32)
-    message(STATUS "Disable fast raw contexts on Windows.")
-  elseif(CMAKE_SIZEOF_VOID_P EQUAL 4 AND CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
+  if(CMAKE_SIZEOF_VOID_P EQUAL 4 AND CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
     message(STATUS "Disable fast raw contexts on x32 ABI.")
   else()
     set(HAVE_RAW_CONTEXTS 1)
@@ -259,10 +249,6 @@ if(enable_msg)
   set(SIMGRID_HAVE_MSG 1)
 endif()
 
-if(WIN32)
-  set(Boost_USE_STATIC_LIBS 1)
-endif()
-
 set(HAVE_PAPI 0)
 if(enable_smpi_papi)
   include(FindPAPI)
@@ -334,10 +320,6 @@ CHECK_INCLUDE_FILE("pthread_np.h" HAVE_PTHREAD_NP_H) # for pthread_setaffinity_n
 
 if(CMAKE_SYSTEM_NAME MATCHES "Darwin")
   set(CMAKE_REQUIRED_DEFINITIONS "-D_XOPEN_SOURCE=700 -D_DARWIN_C_SOURCE")
-elseif(MINGW)
-  # Use the GNU version of unusual modifiers like PRIx64
-  add_definitions(-D__USE_MINGW_ANSI_STDIO=1)
-  set(CMAKE_REQUIRED_DEFINITIONS "-D__USE_MINGW_ANSI_STDIO=1")
 else()
   set(CMAKE_REQUIRED_DEFINITIONS "-D_GNU_SOURCE")
 endif()
@@ -350,17 +332,14 @@ CHECK_FUNCTION_EXISTS(dlfunc HAVE_DLFUNC)
 CHECK_FUNCTION_EXISTS(gettimeofday HAVE_GETTIMEOFDAY)
 CHECK_FUNCTION_EXISTS(nanosleep HAVE_NANOSLEEP)
 CHECK_FUNCTION_EXISTS(sysconf HAVE_SYSCONF)
+if(NOT HAVE_SYSCONF)
+  message(FATAL_ERROR "Cannot build without sysconf.")
+endif()
 CHECK_FUNCTION_EXISTS(process_vm_readv HAVE_PROCESS_VM_READV)
 CHECK_FUNCTION_EXISTS(mmap HAVE_MMAP)
 CHECK_FUNCTION_EXISTS(mremap HAVE_MREMAP)
 
 CHECK_SYMBOL_EXISTS(vasprintf stdio.h HAVE_VASPRINTF)
-if(MINGW)
-  # The detection of vasprintf fails on MinGW, assumingly because it's
-  # defined as an inline function in stdio.h instead of a regular
-  # function. So force the result to be 1 despite of the test.
-  set(HAVE_VASPRINTF 1)
-endif()
 
 CHECK_INCLUDE_FILE("sys/sendfile.h" HAVE_SENDFILE_H)
 CHECK_FUNCTION_EXISTS(sendfile HAVE_SENDFILE)
@@ -430,12 +409,7 @@ endif()
 
 if(enable_smpi)
   SET(HAVE_SMPI 1)
-  if(WIN32)
-    message (STATUS "Warning: no support for SMPI automatic privatization on Windows.")
-    SET(HAVE_PRIVATIZATION 0)
-  else()
-    SET(HAVE_PRIVATIZATION 1)
-  endif()
+  SET(HAVE_PRIVATIZATION 1)
 else()
   SET(HAVE_SMPI 0)
 endif()
@@ -599,12 +573,10 @@ foreach(script cc cxx ff f90 run)
   configure_file(${CMAKE_HOME_DIRECTORY}/src/smpi/smpi${script}.in ${CMAKE_BINARY_DIR}/smpi_script/bin/smpi${script} @ONLY)
 endforeach()
 
-if(NOT WIN32)
-  foreach(script cc cxx ff f90 run)
-    execute_process(COMMAND chmod a=rwx ${CMAKE_BINARY_DIR}/bin/smpi${script})
-    execute_process(COMMAND chmod a=rwx ${CMAKE_BINARY_DIR}/smpi_script/bin/smpi${script})
-  endforeach()
-endif()
+foreach(script cc cxx ff f90 run)
+  execute_process(COMMAND chmod a=rwx ${CMAKE_BINARY_DIR}/bin/smpi${script})
+  execute_process(COMMAND chmod a=rwx ${CMAKE_BINARY_DIR}/smpi_script/bin/smpi${script})
+endforeach()
 
 set(generated_headers_to_install
   ${CMAKE_CURRENT_BINARY_DIR}/include/smpi/mpif.h
@@ -788,11 +760,7 @@ add_dependencies(tests tests-mc)
 include(${CMAKE_HOME_DIRECTORY}/tools/cmake/MaintainerMode.cmake)
 
 ### Make Libs
-if(NOT WIN32)
-  include(${CMAKE_HOME_DIRECTORY}/tools/cmake/MakeLib.cmake)
-else()
-  include(${CMAKE_HOME_DIRECTORY}/tools/cmake/MakeLibWin.cmake)
-endif()
+include(${CMAKE_HOME_DIRECTORY}/tools/cmake/MakeLib.cmake)
 
 if(enable_java)
   include(${CMAKE_HOME_DIRECTORY}/tools/cmake/Java.cmake)
index 42bffde..62641f5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 SimGrid (3.32.1) not released yet (target december 22)
 
+General:
+ - On Windows, you now need to install WSL2 as the native builds are now disabled.
+   It was not really working anyway.
+
 S4U:
  - Activity::set_remaining() is not public anymore. Use for example
    Comm::set_payload_size() to change the size of the simulated data.
index a9bffc5..9a68fcd 100644 (file)
@@ -897,9 +897,8 @@ should be the most effcient one (please report bugs if the
 auto-detection fails for you). They are approximately sorted here from
 the slowest to the most efficient:
 
- - **thread:** very slow factory using full featured threads (either
-   pthreads or windows native threads). They are slow but very
-   standard. Some debuggers or profilers only work with this factory.
+ - **thread:** very slow factory using full featured threads (pthreads). 
+   They are slow but very standard. Some debuggers or profilers only work with this factory.
  - **java:** Java applications are virtualized onto java threads (that
    are regular pthreads registered to the JVM)
  - **ucontext:** fast factory using System V contexts (Linux and FreeBSD only)
@@ -960,7 +959,7 @@ model checker (see :ref:`options_mc_perf`).
 Disabling Stack Guard Pages
 ...........................
 
-**Option** ``contexts/guard-size`` **Default** 1 page in most case (0 pages on Windows or with MC)
+**Option** ``contexts/guard-size`` **Default** 1 page in most case (0 pages with MC)
 
 Unless you use the threads context factory (see
 :ref:`cfg=contexts/factory`), a stack guard page is usually used
index 72b2f58..02cd82d 100644 (file)
@@ -59,8 +59,6 @@ PREDEFINED             += \
     SG_END_DECL= \
     SIMGRID_REGISTER_PLUGIN(id,desc,init)= \
     XBT_PUBLIC= \
-    XBT_EXPORT_NO_IMPORT= \
-    XBT_IMPORT_NO_EXPORT= \
     XBT_PUBLIC_DATA=extern \
     XBT_PUBLIC= \
     XBT_INLINE= \
index 42b2580..0ee66be 100644 (file)
@@ -7,8 +7,7 @@ Installing SimGrid
 
 
 SimGrid should work out of the box on Linux, macOS, FreeBSD, and
-Windows (under Windows, you need to install the Windows Subsystem
-Linux to get more than the Java bindings).
+Windows (with WSL).
 
 Pre-compiled Packages
 ---------------------
@@ -435,18 +434,8 @@ Windows-specific instructions
 
 The best solution to get SimGrid working on windows is to install the
 Ubuntu subsystem of Windows 10. All of SimGrid (but the model checker)
-works in this setting.
-
-Native builds not very well supported. Have a look to our `appveypor
-configuration file
-<https://framagit.org/simgrid/simgrid/blob/master/.appveyor.yml>`_ to
-see how we manage to use mingw-64 to build the DLL that the Java file
-needs.
-
-The drawback of MinGW-64 is that the produced DLL are not compatible
-with MS Visual C. Some clang-based tools seem promising to fix this,
-but this is of rather low priority for us. It it's important for you
-and if you get it working, please @ref community_contact "tell us".
+works in this setting. Native builds never really worked, and they are
+disabled starting with SimGrid v3.33.
 
 Python-specific instructions
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
index 1e41321..232d3d1 100644 (file)
@@ -13,11 +13,8 @@ set(_dht-kademlia_sources dht-kademlia/s4u-dht-kademlia.cpp dht-kademlia/s4u-dht
 
 set(_actor-stacksize_factories "^thread") # Threads ignore modifications of the stack size
 
-# The maestro-set example only works for threads and when not using windows.
+# The maestro-set example only works for threads
 set(_maestro-set_factories "thread")
-if(WIN32)
-  set(_maestro-set_disable 1)
-endif()
 
 if(SIMGRID_HAVE_MC)
   # These tests timeout with threads, maybe because of dwarf parsing? not sure
@@ -258,7 +255,7 @@ foreach (example exec-ptask trace-categories trace-masterworkers trace-platform
                           ${CMAKE_HOME_DIRECTORY}/examples/cpp/${example}/s4u-${example}.tesh)
 endforeach()
 
-if (NOT enable_memcheck AND NOT WIN32)
+if (NOT enable_memcheck)
   ADD_TESH(debug-breakpoint --setenv bindir=${CMAKE_CURRENT_BINARY_DIR}/comm-pingpong
                             --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms
                             ${CMAKE_CURRENT_SOURCE_DIR}/comm-pingpong/debug-breakpoint.tesh)
index bec59f1..c654e01 100644 (file)
@@ -1,9 +1,5 @@
 if(enable_smpi)
-  if(WIN32)
-    set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h")
-  else()
-    set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc")
-  endif()
+  set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc")
 
   include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi")
   add_executable       (is EXCLUDE_FROM_ALL is.c nas_common.c)
index 2d44e84..c59d0da 100644 (file)
 #include <vector>
 #endif
 
-#ifdef _WIN32
-#define MPI_CALL(type, name, args)                                                                                     \
-  type name args;                                                                                                      \
-  type _XBT_CONCAT(P, name) args
-#else
 #define MPI_CALL(type, name, args)                                                                                     \
   type name args __attribute__((weak));                                                                                \
-  type _XBT_CONCAT(P, name) args
-#endif
+  type _XBT_CONCAT(P, name)                                                                                            \
+  args
 
 SG_BEGIN_DECL
 #define MPI_THREAD_SINGLE     0
index 50cc0ed..155dfbf 100644 (file)
 #  define _GNU_SOURCE
 #endif
 
-/* On MinGW, stdio.h defines __MINGW_PRINTF_FORMAT and __MINGW_SCANF_FORMAT
-   which are the suitable format style (either gnu_printf or ms_printf)
-   depending on which version is available (__USE_MINGW_ANSI_STDIO): */
-#ifdef __MINGW32__
-#  include <stdio.h>
-
-#define XBT_ATTRIB_PRINTF(format_idx, arg_idx)                                                                         \
-  __attribute__((__format__(__MINGW_PRINTF_FORMAT, (format_idx), (arg_idx))))
-#define XBT_ATTRIB_SCANF(format_idx, arg_idx) __attribute__((__MINGW_SCANF_FORMAT(__scanf__, (format_idx), (arg_idx))))
-#else
 #define XBT_ATTRIB_PRINTF(format_idx, arg_idx) __attribute__((__format__(__printf__, (format_idx), (arg_idx))))
 #define XBT_ATTRIB_SCANF(format_idx, arg_idx) __attribute__((__format__(__scanf__, (format_idx), (arg_idx))))
-#endif
 
 #if defined(__cplusplus)
 #if __cplusplus >= 201103L
  *
  *   * If you link your application against the DLL or if you do a UNIX build, don't do anything special. This file
  *     will do the right thing for you by default.
- *
- * Rationale of XBT_EXPORT_NO_IMPORT: (windows-only)
- *   * Symbols which must be exported in the DLL, but not imported from it.
- *
- *   * This is obviously useful for initialized globals (which cannot be  extern or similar).
- *   * This is also used in the log mechanism where a macro creates the variable automatically. When the macro is
- *     called from within SimGrid, the symbol must be exported, but when called  from within the client code, it must
- *     not try to retrieve the symbol from the DLL since it's not in there.
- *
- * Rationale of XBT_IMPORT_NO_EXPORT: (windows-only)
- *   * Symbols which must be imported from the DLL, but not explicitly  exported from it.
- *
- *   * The root log category is already exported, but not imported explicitly when creating a subcategory since we
- *     cannot import the parent category to deal with the fact that the parent may be in application space, not DLL
- *     space.
  */
 
-/* Build the DLL */
-#if defined(DLL_EXPORT)
-#  define XBT_PUBLIC            __declspec(dllexport)
-#  define XBT_EXPORT_NO_IMPORT  __declspec(dllexport)
-#  define XBT_IMPORT_NO_EXPORT
-#  define XBT_PUBLIC_DATA       extern __declspec(dllexport)
-#  define XBT_PRIVATE
-
-/* Link against the DLL */
-#elif (defined(_WIN32) && !defined(DLL_EXPORT))
-#  define XBT_PUBLIC            __declspec(dllimport)
-#  define XBT_EXPORT_NO_IMPORT
-#  define XBT_IMPORT_NO_EXPORT  __declspec(dllimport)
-#  define XBT_PUBLIC_DATA       extern __declspec(dllimport)
-#  define XBT_PRIVATE
-
-#elif defined(__ELF__)
-#  define XBT_PUBLIC            __attribute__((visibility("default")))
-#  define XBT_EXPORT_NO_IMPORT  __attribute__((visibility("default")))
-#  define XBT_IMPORT_NO_EXPORT  __attribute__((visibility("default")))
+#if defined(__ELF__)
+#define XBT_PUBLIC __attribute__((visibility("default")))
 #  define XBT_PUBLIC_DATA       extern __attribute__((visibility("default")))
 #  define XBT_PRIVATE           __attribute__((visibility("hidden")))
 
 #else
-#  define XBT_PUBLIC            /* public */
-#  define XBT_EXPORT_NO_IMPORT
-#  define XBT_IMPORT_NO_EXPORT
+#define XBT_PUBLIC /* public */
 #  define XBT_PUBLIC_DATA       extern
 #  define XBT_PRIVATE           /** @private */
 
index 7b01d4f..3055420 100644 (file)
@@ -93,7 +93,7 @@ typedef enum {
     XBT_LOG_EXTERNAL_CATEGORY(catName);                                                                                \
     (void)_xbt_log_cat_init(&_XBT_LOGV(catName), xbt_log_priority_uninitialized);                                      \
   }                                                                                                                    \
-  XBT_EXPORT_NO_IMPORT s_xbt_log_category_t _XBT_LOGV(catName) = {                                                     \
+  s_xbt_log_category_t _XBT_LOGV(catName) = {                                                                          \
       &_XBT_LOGV(parent),                                                                                              \
       NULL /* firstChild */,                                                                                           \
       NULL /* nextSibling */,                                                                                          \
index e70660d..19d9e9e 100644 (file)
@@ -11,9 +11,6 @@
 #include "xbt/xbt_os_time.h"
 
 #include <sys/stat.h>
-#ifdef WIN32
-#include <direct.h> // _mkdir
-#endif
 
 #include <fstream>
 #include <string>
@@ -276,11 +273,7 @@ static void on_container_creation_ti(const Container& c)
   if (not simgrid::config::get_value<bool>("tracing/smpi/format/ti-one-file") || ti_unique_file == nullptr) {
     std::string folder_name = simgrid::config::get_value<std::string>("tracing/filename") + "_files";
     std::string filename    = folder_name + "/" + std::to_string(prefix) + "_" + c.get_name() + ".txt";
-#ifdef WIN32
-    _mkdir(folder_name.c_str());
-#else
     mkdir(folder_name.c_str(), S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH);
-#endif
     ti_unique_file = new std::ofstream(filename.c_str(), std::ofstream::out);
     xbt_assert(not ti_unique_file->fail(), "Tracefile %s could not be opened for writing", filename.c_str());
     tracing_file << filename << '\n';
index 20ed476..a6dcbd5 100644 (file)
@@ -85,8 +85,6 @@
 #cmakedefine01 HAVE_MMAP
 /* Function mremap */
 #cmakedefine01 HAVE_MREMAP
-/* Function sysconf */
-#cmakedefine01 HAVE_SYSCONF
 /* Function vasprintf */
 #cmakedefine01 HAVE_VASPRINTF
 
index 318dd1f..f2914a0 100644 (file)
@@ -22,9 +22,7 @@
 #include "xbt/xbt_modinter.h" /* whether initialization was already done */
 
 #include <boost/algorithm/string/predicate.hpp>
-#ifndef _WIN32
 #include <dlfcn.h>
-#endif /* _WIN32 */
 
 #if SIMGRID_HAVE_MC
 #include "src/mc/remote/AppSide.hpp"
@@ -85,7 +83,6 @@ XBT_ATTRIB_NORETURN static void inthandler(int)
   exit(1);
 }
 
-#ifndef _WIN32
 static void segvhandler(int signum, siginfo_t* siginfo, void* /*context*/)
 {
   if ((siginfo->si_signo == SIGSEGV && siginfo->si_code == SEGV_ACCERR) || siginfo->si_signo == SIGBUS) {
@@ -156,8 +153,6 @@ static void install_segvhandler()
   }
 }
 
-#endif /* _WIN32 */
-
 namespace simgrid::kernel {
 
 EngineImpl::~EngineImpl()
@@ -204,10 +199,7 @@ void EngineImpl::initialize(int* argc, char** argv)
 
   /* Prepare to display some more info when dying on Ctrl-C pressing */
   std::signal(SIGINT, inthandler);
-
-#ifndef _WIN32
   install_segvhandler();
-#endif
 
   /* register a function to be called by SURF after the environment creation */
   sg_platf_init();
@@ -324,9 +316,6 @@ void EngineImpl::load_platform(const std::string& platf)
 {
   double start = xbt_os_time();
   if (boost::algorithm::ends_with(platf, ".so") || boost::algorithm::ends_with(platf, ".dylib")) {
-#ifdef _WIN32
-    xbt_die("loading platform through shared library isn't supported on windows");
-#else
     void* handle = dlopen(platf.c_str(), RTLD_LAZY);
     xbt_assert(handle, "Impossible to open platform file: %s", platf.c_str());
     platf_handle_           = std::unique_ptr<void, std::function<int(void*)>>(handle, dlclose);
@@ -335,7 +324,6 @@ void EngineImpl::load_platform(const std::string& platf)
     const char* dlsym_error = dlerror();
     xbt_assert(not dlsym_error, "Error: %s", dlsym_error);
     callable(*simgrid::s4u::Engine::get_instance());
-#endif /* _WIN32 */
   } else {
     parse_platform_file(platf);
   }
index 6b73440..bc336be 100644 (file)
@@ -80,7 +80,6 @@ ContextFactory::~ContextFactory() = default;
 
 thread_local Context* Context::current_context_ = nullptr;
 
-#ifndef WIN32
 /* Install or disable alternate signal stack, for SIGSEGV handler. */
 int Context::install_sigsegv_stack(stack_t* old_stack, bool enable)
 {
@@ -91,7 +90,6 @@ int Context::install_sigsegv_stack(stack_t* old_stack, bool enable)
   stack.ss_flags = enable ? 0 : SS_DISABLE;
   return sigaltstack(&stack, old_stack);
 }
-#endif
 
 Context* Context::self()
 {
index 3f73ba8..e0a7092 100644 (file)
@@ -56,9 +56,7 @@ class XBT_PUBLIC Context {
   void declare_context(std::size_t size);
 
 public:
-#ifndef WIN32
   static int install_sigsegv_stack(stack_t* old_stack, bool enable);
-#endif
 
   Context(std::function<void()>&& code, actor::ActorImpl* actor, bool maestro);
   Context(const Context&) = delete;
index cd523d1..0cc59ed 100644 (file)
@@ -23,144 +23,132 @@ extern "C" void raw_swapcontext(raw_stack_t* old, raw_stack_t new_context);
 #if HAVE_RAW_CONTEXTS
 
 #if SIMGRID_PROCESSOR_x86_64
-__asm__ (
+__asm__(
 #if defined(__APPLE__)
-   ".text\n"
-   ".globl _raw_makecontext\n"
-   "_raw_makecontext:\n"
-#elif defined(_WIN32)
-   ".text\n"
-   ".globl raw_makecontext\n"
-   "raw_makecontext:\n"
+    ".text\n"
+    ".globl _raw_makecontext\n"
+    "_raw_makecontext:\n"
 #else
-   ".text\n"
-   ".globl raw_makecontext\n"
-   ".type raw_makecontext,@function\n"
-   "raw_makecontext:\n"/* Calling convention sets the arguments in rdi, rsi, rdx and rcx, respectively */
+    ".text\n"
+    ".globl raw_makecontext\n"
+    ".type raw_makecontext,@function\n"
+    "raw_makecontext:\n" /* Calling convention sets the arguments in rdi, rsi, rdx and rcx, respectively */
 #endif
-   "   mov %rdi,%rax\n"      /* stack */
-   "   add %rsi,%rax\n"      /* size  */
-   "   andq $-16, %rax\n"    /* align stack */
-   "   movq $0,   -8(%rax)\n" /* @return for func */
-   "   mov %rdx,-16(%rax)\n" /* func */
-   "   mov %rcx,-24(%rax)\n" /* arg/rdi */
-   "   movq $0,  -32(%rax)\n" /* rsi */
-   "   movq $0,  -40(%rax)\n" /* rdx */
-   "   movq $0,  -48(%rax)\n" /* rcx */
-   "   movq $0,  -56(%rax)\n" /* r8  */
-   "   movq $0,  -64(%rax)\n" /* r9  */
-   "   movq $0,  -72(%rax)\n" /* rbp */
-   "   movq $0,  -80(%rax)\n" /* rbx */
-   "   movq $0,  -88(%rax)\n" /* r12 */
-   "   movq $0,  -96(%rax)\n" /* r13 */
-   "   movq $0, -104(%rax)\n" /* r14 */
-   "   movq $0, -112(%rax)\n" /* r15 */
-   "   sub $112,%rax\n"
-   "   ret\n"
-);
-
-__asm__ (
+    "   mov %rdi,%rax\n"       /* stack */
+    "   add %rsi,%rax\n"       /* size  */
+    "   andq $-16, %rax\n"     /* align stack */
+    "   movq $0,   -8(%rax)\n" /* @return for func */
+    "   mov %rdx,-16(%rax)\n"  /* func */
+    "   mov %rcx,-24(%rax)\n"  /* arg/rdi */
+    "   movq $0,  -32(%rax)\n" /* rsi */
+    "   movq $0,  -40(%rax)\n" /* rdx */
+    "   movq $0,  -48(%rax)\n" /* rcx */
+    "   movq $0,  -56(%rax)\n" /* r8  */
+    "   movq $0,  -64(%rax)\n" /* r9  */
+    "   movq $0,  -72(%rax)\n" /* rbp */
+    "   movq $0,  -80(%rax)\n" /* rbx */
+    "   movq $0,  -88(%rax)\n" /* r12 */
+    "   movq $0,  -96(%rax)\n" /* r13 */
+    "   movq $0, -104(%rax)\n" /* r14 */
+    "   movq $0, -112(%rax)\n" /* r15 */
+    "   sub $112,%rax\n"
+    "   ret\n");
+
+__asm__(
 #if defined(__APPLE__)
-   ".text\n"
-   ".globl _raw_swapcontext\n"
-   "_raw_swapcontext:\n"
-#elif defined(_WIN32)
-   ".text\n"
-   ".globl raw_swapcontext\n"
-   "raw_swapcontext:\n"
+    ".text\n"
+    ".globl _raw_swapcontext\n"
+    "_raw_swapcontext:\n"
 #else
-   ".text\n"
-   ".globl raw_swapcontext\n"
-   ".type raw_swapcontext,@function\n"
-   "raw_swapcontext:\n" /* Calling convention sets the arguments in rdi and rsi, respectively */
+    ".text\n"
+    ".globl raw_swapcontext\n"
+    ".type raw_swapcontext,@function\n"
+    "raw_swapcontext:\n" /* Calling convention sets the arguments in rdi and rsi, respectively */
 #endif
-   "   push %rdi\n"
-   "   push %rsi\n"
-   "   push %rdx\n"
-   "   push %rcx\n"
-   "   push %r8\n"
-   "   push %r9\n"
-   "   push %rbp\n"
-   "   push %rbx\n"
-   "   push %r12\n"
-   "   push %r13\n"
-   "   push %r14\n"
-   "   push %r15\n"
-   "   mov %rsp,(%rdi)\n" /* old */
-   "   mov %rsi,%rsp\n" /* new */
-   "   pop %r15\n"
-   "   pop %r14\n"
-   "   pop %r13\n"
-   "   pop %r12\n"
-   "   pop %rbx\n"
-   "   pop %rbp\n"
-   "   pop %r9\n"
-   "   pop %r8\n"
-   "   pop %rcx\n"
-   "   pop %rdx\n"
-   "   pop %rsi\n"
-   "   pop %rdi\n"
-   "   ret\n"
-);
+    "   push %rdi\n"
+    "   push %rsi\n"
+    "   push %rdx\n"
+    "   push %rcx\n"
+    "   push %r8\n"
+    "   push %r9\n"
+    "   push %rbp\n"
+    "   push %rbx\n"
+    "   push %r12\n"
+    "   push %r13\n"
+    "   push %r14\n"
+    "   push %r15\n"
+    "   mov %rsp,(%rdi)\n" /* old */
+    "   mov %rsi,%rsp\n"   /* new */
+    "   pop %r15\n"
+    "   pop %r14\n"
+    "   pop %r13\n"
+    "   pop %r12\n"
+    "   pop %rbx\n"
+    "   pop %rbp\n"
+    "   pop %r9\n"
+    "   pop %r8\n"
+    "   pop %rcx\n"
+    "   pop %rdx\n"
+    "   pop %rsi\n"
+    "   pop %rdi\n"
+    "   ret\n");
 #elif SIMGRID_PROCESSOR_i686
-__asm__ (
-#if defined(__APPLE__) || defined(_WIN32)
-   ".text\n"
-   ".globl _raw_makecontext\n"
-   "_raw_makecontext:\n"
+__asm__(
+#if defined(__APPLE__)
+    ".text\n"
+    ".globl _raw_makecontext\n"
+    "_raw_makecontext:\n"
 #else
-   ".text\n"
-   ".globl raw_makecontext\n"
-   ".type raw_makecontext,@function\n"
-   "raw_makecontext:\n"
+    ".text\n"
+    ".globl raw_makecontext\n"
+    ".type raw_makecontext,@function\n"
+    "raw_makecontext:\n"
 #endif
-   "   movl 4(%esp),%eax\n"   /* stack */
-   "   addl 8(%esp),%eax\n"   /* size  */
-   "   andl $-16, %eax\n"     /* align stack */
-   "   movl 12(%esp),%ecx\n"  /* func  */
-   "   movl 16(%esp),%edx\n"  /* arg   */
-   "   movl %edx, -4(%eax)\n"
-   "   movl $0,   -8(%eax)\n" /* @return for func */
-   "   movl %ecx,-12(%eax)\n"
-   "   movl $0,  -16(%eax)\n" /* ebp */
-   "   movl $0,  -20(%eax)\n" /* ebx */
-   "   movl $0,  -24(%eax)\n" /* esi */
-   "   movl $0,  -28(%eax)\n" /* edi */
-   "   subl $28,%eax\n"
-   "   retl\n"
-);
-
-__asm__ (
-#if defined(__APPLE__) || defined(_WIN32)
-   ".text\n"
-   ".globl _raw_swapcontext\n"
-   "_raw_swapcontext:\n"
+    "   movl 4(%esp),%eax\n"  /* stack */
+    "   addl 8(%esp),%eax\n"  /* size  */
+    "   andl $-16, %eax\n"    /* align stack */
+    "   movl 12(%esp),%ecx\n" /* func  */
+    "   movl 16(%esp),%edx\n" /* arg   */
+    "   movl %edx, -4(%eax)\n"
+    "   movl $0,   -8(%eax)\n" /* @return for func */
+    "   movl %ecx,-12(%eax)\n"
+    "   movl $0,  -16(%eax)\n" /* ebp */
+    "   movl $0,  -20(%eax)\n" /* ebx */
+    "   movl $0,  -24(%eax)\n" /* esi */
+    "   movl $0,  -28(%eax)\n" /* edi */
+    "   subl $28,%eax\n"
+    "   retl\n");
+
+__asm__(
+#if defined(__APPLE__)
+    ".text\n"
+    ".globl _raw_swapcontext\n"
+    "_raw_swapcontext:\n"
 #else
-   ".text\n"
-   ".globl raw_swapcontext\n"
-   ".type raw_swapcontext,@function\n"
-   "raw_swapcontext:\n"
+    ".text\n"
+    ".globl raw_swapcontext\n"
+    ".type raw_swapcontext,@function\n"
+    "raw_swapcontext:\n"
 #endif
-   // Fetch the parameters:
-   "   movl 4(%esp),%eax\n" /* old (raw_stack_t*) */
-   "   movl 8(%esp),%edx\n" /* new (raw_stack_t)  */
-   // Save registers of the current context on the stack:
-   "   pushl %ebp\n"
-   "   pushl %ebx\n"
-   "   pushl %esi\n"
-   "   pushl %edi\n"
-   // Save the current context (stack pointer) in *old:
-   "   movl %esp,(%eax)\n"
-   // Switch to the stack of the new context:
-   "   movl %edx,%esp\n"
-   // Pop the values of the new context:
-   "   popl %edi\n"
-   "   popl %esi\n"
-   "   popl %ebx\n"
-   "   popl %ebp\n"
-   // Return using the return address of the new context:
-   "   retl\n"
-);
+    // Fetch the parameters:
+    "   movl 4(%esp),%eax\n" /* old (raw_stack_t*) */
+    "   movl 8(%esp),%edx\n" /* new (raw_stack_t)  */
+    // Save registers of the current context on the stack:
+    "   pushl %ebp\n"
+    "   pushl %ebx\n"
+    "   pushl %esi\n"
+    "   pushl %edi\n"
+    // Save the current context (stack pointer) in *old:
+    "   movl %esp,(%eax)\n"
+    // Switch to the stack of the new context:
+    "   movl %edx,%esp\n"
+    // Pop the values of the new context:
+    "   popl %edi\n"
+    "   popl %esi\n"
+    "   popl %ebx\n"
+    "   popl %ebp\n"
+    // Return using the return address of the new context:
+    "   retl\n");
 #else
 #error HAVE_RAW_CONTEXTS defined, but neither SIMGRID_PROCESSOR_x86_64 nor SIMGRID_PROCESSOR_i686. Please update the code.
 #endif
index 59efe8c..350b686 100644 (file)
 
 #include <boost/core/demangle.hpp>
 #include <memory>
-#include <typeinfo>
-
-#ifdef _WIN32
-#include <malloc.h>
-#include <windows.h>
-#else
 #include <sys/mman.h>
-#endif
-
-#ifdef __MINGW32__
-#define _aligned_malloc __mingw_aligned_malloc
-#define _aligned_free __mingw_aligned_free
-#endif /*MINGW*/
+#include <typeinfo>
 
 #if HAVE_VALGRIND_H
 #include <valgrind/valgrind.h>
@@ -99,15 +88,12 @@ SwappedContext::SwappedContext(std::function<void()>&& code, actor::ActorImpl* a
       auto* alloc          = static_cast<unsigned char*>(xbt_malloc0(size + xbt_pagesize));
       stack_               = alloc - (reinterpret_cast<uintptr_t>(alloc) & (xbt_pagesize - 1)) + xbt_pagesize;
       reinterpret_cast<unsigned char**>(stack_)[-1] = alloc;
-#elif !defined(_WIN32)
+#else
       void* alloc;
       xbt_assert(posix_memalign(&alloc, xbt_pagesize, size) == 0, "Failed to allocate stack.");
       this->stack_ = static_cast<unsigned char*>(alloc);
-#else
-      this->stack_ = static_cast<unsigned char*>(_aligned_malloc(size, xbt_pagesize));
 #endif
 
-#ifndef _WIN32
       /* This is fatal. We are going to fail at some point when we try reusing this. */
       xbt_assert(
           mprotect(this->stack_, guard_size, PROT_NONE) != -1,
@@ -117,7 +103,7 @@ SwappedContext::SwappedContext(std::function<void()>&& code, actor::ActorImpl* a
           "Please see https://simgrid.org/doc/latest/Configuring_SimGrid.html#configuring-the-user-code-virtualization "
           "for more information.",
           strerror(errno));
-#endif
+
       this->stack_ = this->stack_ + guard_size;
     } else {
       this->stack_ = static_cast<unsigned char*>(xbt_malloc0(actor->get_stacksize()));
@@ -154,7 +140,6 @@ SwappedContext::~SwappedContext()
     VALGRIND_STACK_DEREGISTER(valgrind_stack_id_);
 #endif
 
-#ifndef _WIN32
   if (guard_size > 0 && not MC_is_active()) {
     stack_ = stack_ - guard_size;
     if (mprotect(stack_, guard_size, PROT_READ | PROT_WRITE) == -1) {
@@ -166,7 +151,6 @@ SwappedContext::~SwappedContext()
     stack_ = reinterpret_cast<unsigned char**>(stack_)[-1];
 #endif
   }
-#endif /* not windows */
 
   xbt_free(stack_);
 }
index cf17829..7ed881a 100644 (file)
@@ -84,9 +84,7 @@ void ThreadContext::wrapper(ThreadContext* context)
 {
   Context::set_current(context);
 
-#ifndef WIN32
   install_sigsegv_stack(nullptr, true);
-#endif
   // Tell the caller (normally the maestro) we are starting, and wait for its green light
   context->end_.release();
   context->start();
@@ -105,9 +103,7 @@ void ThreadContext::wrapper(ThreadContext* context)
   // Signal to the caller (normally the maestro) that we have finished:
   context->yield();
 
-#ifndef WIN32
   install_sigsegv_stack(nullptr, false);
-#endif
   XBT_DEBUG("Terminating");
   Context::set_current(nullptr);
 }
index 5003e01..ae7c449 100644 (file)
 #include <libunwind.h>
 #endif
 
-#ifndef _WIN32
 #include <sys/time.h>
 #include <sys/wait.h>
 #include <unistd.h>
-#endif
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_global, mc, "Logging specific to MC (global)");
 
index 5d4b705..e808263 100644 (file)
@@ -495,9 +495,5 @@ double simgrid_get_clock()
 
 void simgrid_set_maestro(void (*code)(void*), void* data)
 {
-#ifdef _WIN32
-  XBT_WARN("simgrid_set_maestro is believed to not work on windows. Please help us investigating this issue if "
-           "you need that feature");
-#endif
   maestro_code = std::bind(code, data);
 }
index 5a734d2..beafeb5 100644 (file)
@@ -306,7 +306,7 @@ void sg_config_init(int *argc, char **argv)
       [](int value) { simgrid::kernel::context::stack_size = value * 1024; }};
 
   /* guard size for contexts stacks in memory pages */
-#if defined(_WIN32) || (PTH_STACKGROWTH != -1)
+#if (PTH_STACKGROWTH != -1)
   int default_guard_size = 0;
 #else
   int default_guard_size = 1;
index 9c641fb..520cd14 100644 (file)
 #include "xbt/file.hpp"
 
 #include "src/smpi/include/smpi_actor.hpp"
-#include <unordered_map>
 
-#ifndef WIN32
-#include <sys/mman.h>
-#endif
 #include <cerrno>
 #include <cmath>
+#include <sys/mman.h>
+#include <unordered_map>
 
 #if HAVE_PAPI
 #include <papi.h>
@@ -211,7 +209,7 @@ int smpi_gettimeofday(struct timeval* tv, struct timezone* tz)
     double secs  = trunc(now);
     double usecs = (now - secs) * 1e6;
     tv->tv_sec   = static_cast<time_t>(secs);
-    tv->tv_usec  = static_cast<decltype(tv->tv_usec)>(usecs); // suseconds_t (or useconds_t on WIN32)
+    tv->tv_usec  = static_cast<decltype(tv->tv_usec)>(usecs); // suseconds_t
   }
   if (smpi_wtime_sleep > 0)
     simgrid::s4u::this_actor::sleep_for(smpi_wtime_sleep);
index 0f77a57..b9b81f6 100644 (file)
@@ -3,6 +3,12 @@
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
+#include "private.hpp"
+#include "src/internal_config.h"
+#include "src/smpi/include/smpi_actor.hpp"
+#include "src/xbt/memory_map.hpp"
+#include "xbt/virtu.h"
+
 #include <algorithm>
 #include <cerrno>
 #include <climits>
 #include <cstring>
 #include <deque>
 #include <fcntl.h>
+#include <sys/mman.h>
 #include <sys/stat.h>
 #include <sys/types.h>
-#include <vector>
-
-#ifndef WIN32
-#include <sys/mman.h>
 #include <unistd.h>
-
-#include "private.hpp"
-#include "src/internal_config.h"
-#include "src/smpi/include/smpi_actor.hpp"
-#include "src/xbt/memory_map.hpp"
-#include "xbt/virtu.h"
+#include <vector>
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(smpi_memory, smpi, "Memory layout support for SMPI");
 
@@ -85,7 +83,6 @@ static void smpi_get_executable_global_size()
   }
   xbt_die("Did not find my data segment.");
 }
-#endif
 
 #if HAVE_SANITIZER_ADDRESS
 #include <sanitizer/asan_interface.h>
index a34d667..95067dd 100644 (file)
 
 #include <cerrno>
 
-#include <sys/types.h>
-#ifndef WIN32
-#include <sys/mman.h>
-#endif
+#include "smpi_utils.hpp"
 #include <stdlib.h>
+#include <sys/mman.h>
 #include <sys/types.h>
 #include <unistd.h>
-#include "smpi_utils.hpp"
 #ifndef MAP_ANONYMOUS
 #define MAP_ANONYMOUS MAP_ANON
 #endif
@@ -94,11 +91,9 @@ struct shared_metadata_t {
 std::map<const void*, shared_metadata_t> allocs_metadata;
 std::map<std::string, void*, std::less<>> calls;
 
-#ifndef WIN32
 int smpi_shared_malloc_bogusfile           = -1;
 int smpi_shared_malloc_bogusfile_huge_page = -1;
 unsigned long smpi_shared_malloc_blocksize = 1UL << 20;
-#endif
 }
 
 void smpi_shared_destroy()
@@ -108,7 +103,6 @@ void smpi_shared_destroy()
   calls.clear();
 }
 
-#ifndef WIN32
 static void* shm_map(int fd, size_t size, shared_data_key_type* data)
 {
   void* mem = smpi_temp_shm_mmap(fd, size);
@@ -478,7 +472,6 @@ void smpi_shared_free(void *ptr)
     xbt_free(ptr);
   }
 }
-#endif
 
 int smpi_shared_known_call(const char* func, const char* input)
 {
index b4b24c1..4379ffe 100755 (executable)
@@ -25,10 +25,7 @@ fi
 
 list_set CFLAGS @SMPI_C_FLAGS@
 list_add LINKARGS
-if [ "x@WIN32@" = "x1" ]; then
-    list_add CFLAGS "-include" "@includedir@/smpi/smpi_main.h"
-    list_add LINKARGS "@libdir@\libsimgrid.dll"
-elif [ "x@APPLE@" = "x1" ]; then
+if [ "x@APPLE@" = "x1" ]; then
     if [ "x${SMPI_PRETEND_CC}" = "x" ]; then
        list_add CFLAGS "-include" "@includedir@/smpi/smpi_helpers.h"
        list_add LINKARGS "-shared"
@@ -91,9 +88,7 @@ while [ $# -gt 0 ]; do
     esac
 done
 
-if [ "x@WIN32@" != "x1" ]; then
-    list_add CMDARGS "-fPIC"
-fi
+list_add CMDARGS "-fPIC"
 
 list_set CMDLINE "${CC}"
 list_add_not_empty CMDLINE "${CFLAGS}"
index 3a5b929..59c4eee 100755 (executable)
@@ -25,10 +25,7 @@ else
     LINKER_UNDEFINED_ERROR="1"
 fi
 
-if [ "x@WIN32@" = "x1" ]; then
-    list_add CXXFLAGS "-include" "@includedir@/smpi/smpi_main.h"
-    list_add LINKARGS "@libdir@\libsimgrid.dll"
-elif [ "x@APPLE@" = "x1" ]; then
+if [ "x@APPLE@" = "x1" ]; then
     if [ "x${SMPI_PRETEND_CC}" = "x" ]; then
        list_add CXXFLAGS "-include" "@includedir@/smpi/smpi_helpers.h"
        list_add LINKARGS "-shared"
@@ -88,9 +85,7 @@ while [ $# -gt 0 ]; do
   esac
 done
 
-if [ "x@WIN32@" != "x1" ]; then
-    list_add CMDARGS "-fPIC"
-fi
+list_add CMDARGS "-fPIC"
 
 list_set CMDLINE "${CXX}"
 list_add_not_empty CMDLINE "${CXXFLAGS}"
index 30e9a2a..c4aa27d 100644 (file)
@@ -154,7 +154,7 @@ int sthread_gettimeofday(struct timeval* tv)
     double secs  = trunc(now);
     double usecs = (now - secs) * 1e6;
     tv->tv_sec   = static_cast<time_t>(secs);
-    tv->tv_usec  = static_cast<decltype(tv->tv_usec)>(usecs); // suseconds_t (or useconds_t on WIN32)
+    tv->tv_usec  = static_cast<decltype(tv->tv_usec)>(usecs); // suseconds_t
   }
   return 0;
 }
index 9349d66..7704619 100644 (file)
 #include <fstream>
 #include <string>
 
-#ifdef _WIN32
-#include <windows.h>
-#endif
-
 XBT_LOG_NEW_CATEGORY(surf, "All SURF categories");
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_kernel, surf, "Logging specific to SURF (kernel)");
 
@@ -95,18 +91,7 @@ const std::vector<surf_model_description_t> surf_optimization_mode_description =
 /* returns whether #file_path is an absolute file path. Surprising, isn't it ? */
 static bool is_absolute_file_path(const std::string& file_path)
 {
-#ifdef _WIN32
-  WIN32_FIND_DATA wfd = {0};
-  HANDLE hFile        = FindFirstFile(file_path.c_str(), &wfd);
-
-  if (INVALID_HANDLE_VALUE == hFile)
-    return false;
-
-  FindClose(hFile);
-  return true;
-#else
   return (file_path.c_str()[0] == '/');
-#endif
 }
 
 std::ifstream* surf_ifsopen(const std::string& name)
index 3b6b613..bed3b1c 100644 (file)
@@ -29,7 +29,7 @@
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(xbt_cfg, xbt, "configuration support");
 
-XBT_EXPORT_NO_IMPORT xbt_cfg_t simgrid_config = nullptr;
+xbt_cfg_t simgrid_config = nullptr;
 
 namespace simgrid::config {
 
index 15d3e9c..7825a35 100644 (file)
@@ -23,9 +23,6 @@
 
 #include <cmath>
 #include <cstdio>
-#ifdef _WIN32
-# include <csignal> /* To silence MSVC on abort() */
-#endif
 #if HAVE_UNISTD_H
 # include <unistd.h>
 #endif
@@ -63,46 +60,11 @@ void sthread_disable()
 { //  when libsthread is LD_PRELOADED. In this case, sthread's implem gets used instead.
 }
 
-#ifdef _WIN32
-#include <windows.h>
-
-#ifndef __GNUC__
-/* Should not be necessary but for some reason, DllMain is called twice at attachment and at detachment.*/
-/* see also http://msdn.microsoft.com/en-us/library/ms682583%28VS.85%29.aspx */
-/* and http://www.microsoft.com/whdc/driver/kernel/DLL_bestprac.mspx */
-static BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
-{
-  static bool xbt_dll_process_is_attached = false;
-  if (fdwReason == DLL_PROCESS_ATTACH && not xbt_dll_process_is_attached) {
-    xbt_dll_process_is_attached = true;
-    xbt_preinit();
-  } else if (fdwReason == DLL_PROCESS_DETACH && xbt_dll_process_is_attached) {
-    xbt_dll_process_is_attached = false;
-  }
-  return 1;
-}
-#endif
-
-#endif
-
 static void xbt_preinit()
 {
-#ifdef _WIN32
-  SYSTEM_INFO si;
-  GetSystemInfo(&si);
-  xbt_pagesize = si.dwPageSize;
-#elif HAVE_SYSCONF
   xbt_pagesize = static_cast<int>(sysconf(_SC_PAGESIZE));
-#else
-# error Cannot get page size.
-#endif
-
   xbt_pagebits = static_cast<int>(log2(xbt_pagesize));
 
-#ifdef _TWO_DIGIT_EXPONENT
-  /* Even printf behaves differently on Windows... */
-  _set_output_format(_TWO_DIGIT_EXPONENT);
-#endif
   xbt_log_preinit();
   xbt_dict_preinit();
   atexit(xbt_postexit);
@@ -154,12 +116,6 @@ void xbt_abort()
 {
   /* Call __gcov_flush on abort when compiling with coverage options. */
   coverage_checkpoint();
-#ifdef _WIN32
-  /* We said *in silence*. We don't want to see the error message printed by Microsoft's implementation of abort(). */
-  raise(SIGABRT);
-  signal(SIGABRT, SIG_DFL);
-  raise(SIGABRT);
-#endif
   abort();
 }
 
index 1b424e1..2786b5d 100644 (file)
@@ -9,10 +9,6 @@
 #include "xbt/asserts.h"
 #include "xbt/file.hpp" /* this module */
 
-#ifdef _WIN32
-#include <windows.h>
-#endif
-
 #if HAVE_UNISTD_H
 #include <array>
 #include <cerrno>
index f35503e..b6a16ad 100644 (file)
 #include <sys/time.h>
 #include <time.h>
 
-#ifdef _WIN32
-#include <sys/timeb.h>
-#include <windows.h>
-#else
 #include <unistd.h>
-#endif
 
 //Freebsd doesn't provide this clock_gettime flag yet, because it was added too recently (after 1993)
 #if defined (CLOCK_PROF) && ! defined (CLOCK_PROCESS_CPUTIME_ID)
 #include <mach/task.h>
 #endif
 
-#ifdef _WIN32
-static void w32_time_to_timeval(struct timeval* tv, const FILETIME* ft)
-{
-  unsigned __int64 tm;
-  tm = (unsigned __int64)ft->dwHighDateTime << 32;
-  tm |= ft->dwLowDateTime;
-  tm /= 10;
-  tm -= 11644473600000000ULL;
-  tv->tv_sec  = (long)(tm / 1000000L);
-  tv->tv_usec = (long)(tm % 1000000L);
-}
-
-static void w32_times_to_timeval(struct timeval* tv, const FILETIME* kernel_time, const FILETIME* user_time)
-{
-  unsigned __int64 ktm, utm;
-  ktm = (unsigned __int64)kernel_time->dwHighDateTime << 32;
-  ktm |= kernel_time->dwLowDateTime;
-  ktm /= 10;
-  utm = (unsigned __int64)user_time->dwHighDateTime << 32;
-  utm |= user_time->dwLowDateTime;
-  utm /= 10;
-  tv->tv_sec  = (long)(ktm / 1000000L) + (long)(utm / 1000000L);
-  tv->tv_usec = (long)(ktm % 1000000L) + (long)(utm % 1000000L);
-}
-#endif
-
 double xbt_os_time(void)
 {
 #if HAVE_GETTIMEOFDAY
   struct timeval tv;
   gettimeofday(&tv, NULL);
-#elif defined(_WIN32)
-  struct timeval tv;
-  FILETIME ft;
-  GetSystemTimeAsFileTime(&ft);
-  w32_time_to_timeval(&tv, &ft);
-#else                           /* not windows, no gettimeofday => poor resolution */
+#else                           /* no gettimeofday => poor resolution */
   return (double) (time(NULL));
 #endif                          /* HAVE_GETTIMEOFDAY? */
 
@@ -86,10 +50,7 @@ double xbt_os_time(void)
 void xbt_os_sleep(double sec)
 {
 
-#ifdef _WIN32
-  Sleep((floor(sec) * 1000) + ((sec - floor(sec)) * 1000));
-
-#elif HAVE_NANOSLEEP
+#if HAVE_NANOSLEEP
   struct timespec ts;
   ts.tv_sec  = (time_t)sec;
   ts.tv_nsec = (long)((sec - floor(sec)) * 1e9);
@@ -114,7 +75,7 @@ struct s_xbt_os_timer {
   struct timespec start;
   struct timespec stop;
   struct timespec elapse;
-#elif HAVE_GETTIMEOFDAY || defined(_WIN32)
+#elif HAVE_GETTIMEOFDAY
   struct timeval start;
   struct timeval stop;
   struct timeval elapse;
@@ -145,7 +106,7 @@ double xbt_os_timer_elapsed(const_xbt_os_timer_t timer)
 #if HAVE_POSIX_GETTIME && defined (_POSIX_THREAD_CPUTIME)
   return ((double) timer->stop.tv_sec) - ((double) timer->start.tv_sec) + ((double) timer->elapse.tv_sec ) +
       ((((double) timer->stop.tv_nsec) - ((double) timer->start.tv_nsec) + ((double) timer->elapse.tv_nsec )) / 1e9);
-#elif HAVE_GETTIMEOFDAY || defined(_WIN32)
+#elif HAVE_GETTIMEOFDAY
   return ((double) timer->stop.tv_sec) - ((double) timer->start.tv_sec) + ((double) timer->elapse.tv_sec ) +
       ((((double) timer->stop.tv_usec) - ((double) timer->start.tv_usec) + ((double) timer->elapse.tv_usec )) /
          1000000.0);
@@ -164,12 +125,6 @@ void xbt_os_walltimer_start(xbt_os_timer_t timer)
   timer->elapse.tv_sec = 0;
   timer->elapse.tv_usec = 0;
   gettimeofday(&(timer->start), NULL);
-#elif defined(_WIN32)
-  timer->elapse.tv_sec = 0;
-  timer->elapse.tv_usec = 0;
-  FILETIME ft;
-  GetSystemTimeAsFileTime(&ft);
-  w32_time_to_timeval(&timer->start, &ft);
 #else
   timer->elapse = 0;
   timer->start = (unsigned long int) (time(NULL));
@@ -187,12 +142,6 @@ void xbt_os_walltimer_resume(xbt_os_timer_t timer)
   timer->elapse.tv_sec += timer->stop.tv_sec - timer->start.tv_sec;
   timer->elapse.tv_usec += timer->stop.tv_usec - timer->start.tv_usec;
   gettimeofday(&(timer->start), NULL);
-#elif defined(_WIN32)
-  timer->elapse.tv_sec += timer->stop.tv_sec - timer->start.tv_sec;
-  timer->elapse.tv_usec += timer->stop.tv_usec - timer->start.tv_usec;
-  FILETIME ft;
-  GetSystemTimeAsFileTime(&ft);
-  w32_time_to_timeval(&timer->start, &ft);
 #else
   timer->elapse = timer->stop - timer->start;
   timer->start = (unsigned long int) (time(NULL));
@@ -205,10 +154,6 @@ void xbt_os_walltimer_stop(xbt_os_timer_t timer)
   clock_gettime(CLOCK_REALTIME, &(timer->stop));
 #elif HAVE_GETTIMEOFDAY
   gettimeofday(&(timer->stop), NULL);
-#elif defined(_WIN32)
-  FILETIME ft;
-  GetSystemTimeAsFileTime(&ft);
-  w32_time_to_timeval(&timer->stop, &ft);
 #else
   timer->stop = (unsigned long int) (time(NULL));
 #endif
@@ -224,13 +169,6 @@ void xbt_os_cputimer_start(xbt_os_timer_t timer)
   timer->elapse.tv_sec = 0;
   timer->elapse.tv_usec = 0;
   gettimeofday(&(timer->start), NULL);
-#elif defined(_WIN32)
-  timer->elapse.tv_sec = 0;
-  timer->elapse.tv_usec = 0;
-  HANDLE h = GetCurrentProcess();
-  FILETIME creationTime, exitTime, kernelTime, userTime;
-  GetProcessTimes(h, &creationTime, &exitTime, &kernelTime, &userTime);
-  w32_times_to_timeval(&timer->start, &kernelTime, &userTime);
 #else
 # error The cpu timers of SimGrid do not seem to work on your platform.
 #endif
@@ -246,13 +184,6 @@ void xbt_os_cputimer_resume(xbt_os_timer_t timer)
   timer->elapse.tv_sec += timer->stop.tv_sec - timer->start.tv_sec;
   timer->elapse.tv_usec += timer->stop.tv_usec - timer->start.tv_usec;
   gettimeofday(&(timer->start), NULL);
-#elif defined(_WIN32)
-  timer->elapse.tv_sec += timer->stop.tv_sec - timer->start.tv_sec;
-  timer->elapse.tv_usec += timer->stop.tv_usec - timer->start.tv_usec;
-  HANDLE h = GetCurrentProcess();
-  FILETIME creationTime, exitTime, kernelTime, userTime;
-  GetProcessTimes(h, &creationTime, &exitTime, &kernelTime, &userTime);
-  w32_times_to_timeval(&timer->start, &kernelTime, &userTime);
 #else
 # error The cpu timers of SimGrid do not seem to work on your platform.
 #endif
@@ -264,11 +195,6 @@ void xbt_os_cputimer_stop(xbt_os_timer_t timer)
   clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &(timer->stop));
 #elif HAVE_GETTIMEOFDAY
   gettimeofday(&(timer->stop), NULL);
-#elif defined(_WIN32)
-  HANDLE h = GetCurrentProcess();
-  FILETIME creationTime, exitTime, kernelTime, userTime;
-  GetProcessTimes(h, &creationTime, &exitTime, &kernelTime, &userTime);
-  w32_times_to_timeval(&timer->stop, &kernelTime, &userTime);
 #else
 # error The cpu timers of SimGrid do not seem to work on your platform.
 #endif
@@ -293,11 +219,6 @@ void xbt_os_threadtimer_start(xbt_os_timer_t timer)
   timer->elapse.tv_sec = 0;
   timer->elapse.tv_usec = 0;
   gettimeofday(&(timer->start), NULL);
-#elif defined(_WIN32)
-  HANDLE h = GetCurrentThread();
-  FILETIME creationTime, exitTime, kernelTime, userTime;
-  GetThreadTimes(h, &creationTime, &exitTime, &kernelTime, &userTime);
-  w32_times_to_timeval(&timer->start, &kernelTime, &userTime);
 #else
 # error The thread timers of SimGrid do not seem to work on your platform.
 #endif
@@ -322,13 +243,6 @@ void xbt_os_threadtimer_resume(xbt_os_timer_t timer)
   timer->elapse.tv_sec += timer->stop.tv_sec - timer->start.tv_sec;
   timer->elapse.tv_usec += timer->stop.tv_usec - timer->start.tv_usec;
   gettimeofday(&(timer->start), NULL);
-#elif defined(_WIN32)
-  timer->elapse.tv_sec += timer->stop.tv_sec - timer->start.tv_sec;
-  timer->elapse.tv_usec += timer->stop.tv_usec - timer->start.tv_usec;
-  HANDLE h = GetCurrentThread();
-  FILETIME creationTime, exitTime, kernelTime, userTime;
-  GetThreadTimes(h, &creationTime, &exitTime, &kernelTime, &userTime);
-  w32_times_to_timeval(&timer->start, &kernelTime, &userTime);
 #else
 # error The thread timers of SimGrid do not seem to work on your platform.
 #endif
@@ -347,11 +261,6 @@ void xbt_os_threadtimer_stop(xbt_os_timer_t timer)
   timer->stop.tv_sec = thi->system_time.seconds + thi->user_time.seconds;
 #elif HAVE_GETTIMEOFDAY //if nothing else is available, return just time
   gettimeofday(&(timer->stop), NULL);
-#elif defined(_WIN32)
-  HANDLE h = GetCurrentThread();
-  FILETIME creationTime, exitTime, kernelTime, userTime;
-  GetThreadTimes(h, &creationTime, &exitTime, &kernelTime, &userTime);
-  w32_times_to_timeval(&timer->stop, &kernelTime, &userTime);
 #else
 # error The thread timers of SimGrid do not seem to work on your platform.
 #endif
index 476ee32..a68c200 100644 (file)
@@ -12,9 +12,6 @@ endforeach()
 set(tesh_files    ${tesh_files} ${CMAKE_CURRENT_SOURCE_DIR}/stack-overflow/stack-overflow.tesh)
 if (NOT enable_memcheck AND NOT enable_address_sanitizer AND NOT enable_thread_sanitizer)
   ADD_TESH_FACTORIES(stack-overflow   "^thread" --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/kernel/stack-overflow --setenv srcdir=${CMAKE_HOME_DIRECTORY} --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/kernel/stack-overflow stack-overflow.tesh)
-  if (WIN32)
-    SET_TESH_PROPERTIES(stack-overflow "^thread" WILL_FAIL true)
-  endif()
 endif()
 
 ## Add the tests for context-default
index f239bbf..b1483ff 100644 (file)
@@ -47,10 +47,4 @@ if(enable_debug)
   # these tests need assertions
   ADD_TESH(tesh-parser-bogus-symmetric         --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/platforms --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/platforms ${CMAKE_HOME_DIRECTORY}/teshsuite/platforms/bogus_two_hosts_asymetric.tesh)
   ADD_TESH(tesh-parser-bogus-missing-gw        --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/platforms --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/platforms ${CMAKE_HOME_DIRECTORY}/teshsuite/platforms/bogus_missing_gateway.tesh)
-
-   #These tests fail on Windows as the signal returned is not the same as Unix would send.
-  if(WIN32)
-    set_property(TEST tesh-parser-bogus-symmetric PROPERTY WILL_FAIL TRUE)
-    set_property(TEST tesh-parser-bogus-missing-gw PROPERTY WILL_FAIL TRUE)
-  endif()
 endif()
index 8edee11..be77453 100644 (file)
@@ -1,9 +1,5 @@
 if(enable_smpi)
-  if(WIN32)
-    set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h")
-  else()
-    set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc")
-  endif()
+  set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc")
 
   include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi")
   foreach(x coll-allgather coll-allgatherv coll-allreduce coll-allreduce-with-leaks coll-alltoall coll-alltoallv coll-barrier coll-bcast
@@ -16,14 +12,12 @@ if(enable_smpi)
     add_dependencies(tests ${x})
   endforeach()
 
-  if(NOT WIN32)
-    foreach(x macro-shared auto-shared macro-partial-shared macro-partial-shared-communication )
-      add_executable       (${x}  EXCLUDE_FROM_ALL ${x}/${x}.c)
-      target_link_libraries(${x}  simgrid)
-      set_target_properties(${x}  PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${x})
-      add_dependencies(tests ${x})
-    endforeach()
-  endif()
+  foreach(x macro-shared auto-shared macro-partial-shared macro-partial-shared-communication )
+    add_executable       (${x}  EXCLUDE_FROM_ALL ${x}/${x}.c)
+    target_link_libraries(${x}  simgrid)
+    set_target_properties(${x}  PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${x})
+    add_dependencies(tests ${x})
+  endforeach()
 
   if(enable_smpi AND SMPI_FORTRAN)
     set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpif90")
@@ -63,12 +57,10 @@ set(bin_files       ${bin_files}    ${CMAKE_CURRENT_SOURCE_DIR}/hostfile
 
 
 if(enable_smpi)
-  if(NOT WIN32)
-    ADD_TESH_FACTORIES(tesh-smpi-macro-shared "*" --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/smpi/macro-shared --cd ${CMAKE_BINARY_DIR}/teshsuite/smpi/macro-shared ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/macro-shared/macro-shared.tesh)
-    ADD_TESH_FACTORIES(tesh-smpi-auto-shared "*" --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/smpi/auto-shared --cd ${CMAKE_BINARY_DIR}/teshsuite/smpi/auto-shared ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/auto-shared/auto-shared.tesh)
-    ADD_TESH_FACTORIES(tesh-smpi-macro-partial-shared "*" --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/smpi/macro-partial-shared --cd ${CMAKE_BINARY_DIR}/teshsuite/smpi/macro-partial-shared ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/macro-partial-shared/macro-partial-shared.tesh)
-    ADD_TESH_FACTORIES(tesh-smpi-macro-partial-shared-communication "*" --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/smpi/macro-partial-shared-communication --cd ${CMAKE_BINARY_DIR}/teshsuite/smpi/macro-partial-shared-communication ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/macro-partial-shared-communication/macro-partial-shared-communication.tesh)
-  endif()
+  ADD_TESH_FACTORIES(tesh-smpi-macro-shared "*" --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/smpi/macro-shared --cd ${CMAKE_BINARY_DIR}/teshsuite/smpi/macro-shared ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/macro-shared/macro-shared.tesh)
+  ADD_TESH_FACTORIES(tesh-smpi-auto-shared "*" --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/smpi/auto-shared --cd ${CMAKE_BINARY_DIR}/teshsuite/smpi/auto-shared ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/auto-shared/auto-shared.tesh)
+  ADD_TESH_FACTORIES(tesh-smpi-macro-partial-shared "*" --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/smpi/macro-partial-shared --cd ${CMAKE_BINARY_DIR}/teshsuite/smpi/macro-partial-shared ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/macro-partial-shared/macro-partial-shared.tesh)
+  ADD_TESH_FACTORIES(tesh-smpi-macro-partial-shared-communication "*" --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/smpi/macro-partial-shared-communication --cd ${CMAKE_BINARY_DIR}/teshsuite/smpi/macro-partial-shared-communication ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/macro-partial-shared-communication/macro-partial-shared-communication.tesh)
 
   foreach(x coll-allgather coll-allgatherv coll-allreduce coll-alltoall coll-alltoallv coll-barrier coll-bcast
             coll-gather coll-reduce coll-reduce-scatter coll-scatter macro-sample pt2pt-dsend pt2pt-pingpong
index faa130b..f355696 100644 (file)
@@ -33,11 +33,7 @@ set(txt_files  ${txt_files}  ${CMAKE_CURRENT_SOURCE_DIR}/README
 
 #build only once files used in each test (C version compiled here at root, F77 is in f77/util, and F90 in F90/util)
 
-if(WIN32)
-  set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h")
-else()
-  set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc")
-endif()
+set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc")
 
 include_directories("${CMAKE_HOME_DIRECTORY}/include/smpi")
 include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include/")
index 19391f7..acdfd5d 100644 (file)
@@ -1,10 +1,6 @@
 if(enable_smpi AND enable_smpi_MPICH3_testsuite)
-  if(WIN32)
-    set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h")
-  else()
-    set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc")
-    set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff")
-  endif()
+  set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc")
+  set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff")
 
   include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi")
   include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../include/")
index 2fa2e68..6c4a1a7 100644 (file)
@@ -1,10 +1,6 @@
 if(enable_smpi AND enable_smpi_MPICH3_testsuite)
-  if(WIN32)
-    set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h")
-  else()
-    set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc")
-    set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff")
-  endif()
+  set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc")
+  set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff")
   # There are too many warnings with these programs
   set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-sign-compare")
 
index 4c2657a..4bed718 100644 (file)
@@ -1,10 +1,6 @@
 if(enable_smpi AND enable_smpi_MPICH3_testsuite)
-  if(WIN32)
-    set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h")
-  else()
-    set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc")
-    set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff")
-  endif()
+  set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc")
+  set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff")
 
   include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi")
   include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../include/")
index 1f1bd33..b9d31e5 100644 (file)
@@ -1,10 +1,6 @@
 if(enable_smpi AND enable_smpi_MPICH3_testsuite)
-  if(WIN32)
-    set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h")
-  else()
-    set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc")
-    set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff")
-  endif()
+  set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc")
+  set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff")
 
   include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi")
   include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../include/")
index 1a7cff1..e941496 100644 (file)
@@ -1,10 +1,6 @@
 if(enable_smpi AND enable_smpi_MPICH3_testsuite)
-  if(WIN32)
-    set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h")
-  else()
-    set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc")
-    set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff")
-  endif()
+  set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc")
+  set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff")
 
   include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi")
   include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../include/")
index c6464fe..fee3ec3 100644 (file)
@@ -1,10 +1,6 @@
 if(enable_smpi AND enable_smpi_MPICH3_testsuite AND SMPI_FORTRAN)
-  if(WIN32)
-    set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h")
-  else()
-    set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc")
-    set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff")
-  endif()
+  set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc")
+  set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff")
 
   include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi")
 
index 6321488..30bbd89 100644 (file)
@@ -1,10 +1,6 @@
 if(enable_smpi AND enable_smpi_MPICH3_testsuite AND SMPI_FORTRAN)
-  if(WIN32)
-    set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h")
-  else()
-    set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc")
-    set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff")
-  endif()
+  set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc")
+  set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff")
 
   include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi")
 
index 44b8e3e..d28313a 100644 (file)
@@ -1,10 +1,6 @@
 if(enable_smpi AND enable_smpi_MPICH3_testsuite AND SMPI_FORTRAN)
-  if(WIN32)
-    set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h")
-  else()
-    set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc")
-    set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff")
-  endif()
+  set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc")
+  set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff")
 
   include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi")
 
index 2c55fa3..4c55031 100644 (file)
@@ -1,10 +1,6 @@
 if(enable_smpi AND enable_smpi_MPICH3_testsuite AND SMPI_FORTRAN)
-  if(WIN32)
-    set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h")
-  else()
-    set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc")
-    set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff")
-  endif()
+  set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc")
+  set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff")
 
   include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi")
   include_directories(${CMAKE_CURRENT_BINARY_DIR})
index 3eee5c8..9ac4ac9 100644 (file)
@@ -1,10 +1,6 @@
 if(enable_smpi AND enable_smpi_MPICH3_testsuite AND SMPI_FORTRAN)
-  if(WIN32)
-    set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h")
-  else()
-    set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc")
-    set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff")
-  endif()
+  set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc")
+  set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff")
 
   include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi")
   include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../../include/")
index e1b635f..4aac50d 100644 (file)
@@ -1,10 +1,6 @@
 if(enable_smpi AND enable_smpi_MPICH3_testsuite AND SMPI_FORTRAN)
-  if(WIN32)
-    set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h")
-  else()
-    set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc")
-    set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff")
-  endif()
+  set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc")
+  set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff")
 
   set(CMAKE_INCLUDE_CURRENT_DIR ON)
   include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi")
index 6e51d8d..2a3e74f 100644 (file)
@@ -1,10 +1,6 @@
 if(enable_smpi AND enable_smpi_MPICH3_testsuite AND SMPI_FORTRAN)
-  if(WIN32)
-    set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h")
-  else()
-    set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc")
-    set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff")
-  endif()
+  set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc")
+  set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff")
 
   include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi")
 
index 0fa67d5..f6f088d 100644 (file)
@@ -1,10 +1,6 @@
 if(enable_smpi AND enable_smpi_MPICH3_testsuite AND SMPI_FORTRAN)
-  if(WIN32)
-    set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h")
-  else()
-    set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc")
-    set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff")
-  endif()
+  set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc")
+  set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff")
 
   set(CMAKE_INCLUDE_CURRENT_DIR ON)
   include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi")
index 6b659ce..1daf583 100644 (file)
@@ -1,10 +1,6 @@
 if(enable_smpi AND enable_smpi_MPICH3_testsuite AND SMPI_FORTRAN)
-  if(WIN32)
-    set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h")
-  else()
-    set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc")
-    set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff")
-  endif()
+  set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc")
+  set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff")
 
   include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi")
 
index 19223a3..f8964a5 100644 (file)
@@ -1,10 +1,6 @@
 if(enable_smpi AND enable_smpi_MPICH3_testsuite AND SMPI_FORTRAN)
-  if(WIN32)
-    set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h")
-  else()
-    set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc")
-    set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff")
-  endif()
+  set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc")
+  set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff")
 
   include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi")
 
index 1387e60..e88db7e 100644 (file)
@@ -1,10 +1,6 @@
 if(enable_smpi AND enable_smpi_MPICH3_testsuite AND SMPI_FORTRAN)
-  if(WIN32)
-    set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h")
-  else()
-    set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc")
-    set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff")
-  endif()
+  set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc")
+  set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff")
 
   include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi")
 
index b051d25..1dc21fe 100644 (file)
@@ -1,10 +1,6 @@
 if(enable_smpi AND enable_smpi_MPICH3_testsuite AND SMPI_FORTRAN)
-  if(WIN32)
-    set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h")
-  else()
-    set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc")
-    set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpif90")
-  endif()
+  set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc")
+  set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpif90")
 
   include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi")
 
index bd31a74..e80c514 100644 (file)
@@ -1,10 +1,6 @@
 if(enable_smpi AND enable_smpi_MPICH3_testsuite AND SMPI_FORTRAN)
-  if(WIN32)
-    set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h")
-  else()
-    set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc")
-    set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpif90")
-  endif()
+  set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc")
+  set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpif90")
 
   include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi")
 
index 00d809c..b4fb632 100644 (file)
@@ -1,10 +1,6 @@
 if(enable_smpi AND enable_smpi_MPICH3_testsuite AND SMPI_FORTRAN)
-  if(WIN32)
-    set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h")
-  else()
-    set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc")
-    set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpif90")
-  endif()
+  set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc")
+  set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpif90")
 
   include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi")
 
index cd3e8f3..3ce5a7c 100644 (file)
@@ -1,10 +1,6 @@
 if(enable_smpi AND enable_smpi_MPICH3_testsuite AND SMPI_FORTRAN)
-  if(WIN32)
-    set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h")
-  else()
-    set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc")
-    set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpif90")
-  endif()
+  set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc")
+  set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpif90")
 
   include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi")
 
index 89bcd81..4ad7bd8 100644 (file)
@@ -1,10 +1,6 @@
 if(enable_smpi AND enable_smpi_MPICH3_testsuite AND SMPI_FORTRAN)
-  if(WIN32)
-    set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h")
-  else()
-    set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc")
-    set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpif90")
-  endif()
+  set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc")
+  set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpif90")
 
   include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi")
 
index 8e004af..48f19fc 100644 (file)
@@ -1,10 +1,6 @@
 if(enable_smpi AND enable_smpi_MPICH3_testsuite AND SMPI_FORTRAN)
-  if(WIN32)
-    set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h")
-  else()
-    set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc")
-    set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpif90")
-  endif()
+  set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc")
+  set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpif90")
 
   include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi")
 
index 6f38ae4..e2f0a9b 100644 (file)
@@ -1,10 +1,6 @@
 if(enable_smpi AND enable_smpi_MPICH3_testsuite AND SMPI_FORTRAN)
-  if(WIN32)
-    set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h")
-  else()
-    set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc")
-    set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpif90")
-  endif()
+  set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc")
+  set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpif90")
 
   include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi")
 
index 69d6462..2f3cb24 100644 (file)
@@ -1,10 +1,6 @@
 if(enable_smpi AND enable_smpi_MPICH3_testsuite)
-  if(WIN32)
-    set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h")
-  else()
-    set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc")
-    set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff")
-  endif()
+  set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc")
+  set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff")
 
   include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi")
   include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../include/")
index dcca724..4d6d572 100644 (file)
@@ -1,10 +1,6 @@
 if(enable_smpi AND enable_smpi_MPICH3_testsuite)
-  if(WIN32)
-    set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h")
-  else()
-    set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc")
-    set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff")
-  endif()
+  set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc")
+  set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff")
 
   include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi")
   include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../include/")
index 973df2f..4a8a6e8 100644 (file)
@@ -1,10 +1,6 @@
 if(enable_smpi AND enable_smpi_MPICH3_testsuite)
-  if(WIN32)
-    set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h")
-  else()
-    set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc")
-    set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff")
-  endif()
+  set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc")
+  set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff")
 
   include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi")
   include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../include/")
index cfde872..643b4ab 100644 (file)
@@ -1,10 +1,6 @@
 if(enable_smpi AND enable_smpi_MPICH3_testsuite)
-  if(WIN32)
-    set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h")
-  else()
-    set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc")
-    set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff")
-  endif()
+  set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc")
+  set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff")
 
   include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi")
   include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../include/")
index fffa73f..c57bc7b 100644 (file)
@@ -1,10 +1,6 @@
 if(enable_smpi AND enable_smpi_MPICH3_testsuite)
-  if(WIN32)
-    set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h")
-  else()
-    set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc")
-    set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff")
-  endif()
+  set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc")
+  set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff")
 
   include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi")
   include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../include/")
index 955ab60..8a8431a 100644 (file)
@@ -1,10 +1,6 @@
 if(enable_smpi AND enable_smpi_MPICH3_testsuite)
-  if(WIN32)
-    set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h")
-  else()
-    set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc")
-    set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff")
-  endif()
+  set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc")
+  set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff")
 
   include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi")
   include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../include/")
index 088f9ab..9115003 100644 (file)
@@ -1,10 +1,6 @@
 if(enable_smpi AND enable_smpi_MPICH3_testsuite)
-  if(WIN32)
-    set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h")
-  else()
-    set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc")
-    set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff")
-  endif()
+  set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc")
+  set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff")
 
   set(MPICH_FLAGS "-DHAVE_STDLIB_H=1 -DHAVE_UNISTD_H=1 -DHAVE_STRING_H=1 -DUSE_STDARG=1 -DHAVE_LONG_DOUBLE=1 -DHAVE_PROTOTYPES=1 -DHAVE_SIGNAL_H=1 -DHAVE_SIGACTION=1 -DHAVE_SLEEP=1 -DHAVE_SYSCONF=1  -Wno-error=unused-variable")
   include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi")
index 8b2da74..671fbcd 100644 (file)
@@ -1,10 +1,6 @@
 if(enable_smpi AND enable_smpi_MPICH3_testsuite)
-  if(WIN32)
-    set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h")
-  else()
-    set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc")
-    set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff")
-  endif()
+  set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc")
+  set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff")
 
   include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi")
   include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../include/")
index 636365c..da04a8a 100644 (file)
@@ -288,27 +288,3 @@ if(NOT $ENV{LDFLAGS} STREQUAL "")
   message(STATUS "Add LDFLAGS: \"$ENV{LDFLAGS}\" to CMAKE_C_LINK_FLAGS")
   set(CMAKE_C_LINK_FLAGS "${CMAKE_C_LINK_FLAGS} $ENV{LDFLAGS}")
 endif()
-
-if(MINGW)
-  # http://stackoverflow.com/questions/10452262/create-64-bit-jni-under-windows
-  # We don't want to ship libgcc_s_seh-1.dll nor libstdc++-6.dll
-  set(CMAKE_C_FLAGS   "${CMAKE_C_FLAGS}   -static-libgcc")
-  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static-libgcc -static-libstdc++")
-  set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS   "${CMAKE_SHARED_LIBRARY_LINK_C_FLAGS} -static-libgcc")
-  set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "${CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS} -static-libgcc -static-libstdc++")
-
-  # JNI searches for stdcalls
-  set(CMAKE_C_FLAGS   "${CMAKE_C_FLAGS}   -Wl,--add-stdcall-alias")
-  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,--add-stdcall-alias")
-  set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "${CMAKE_SHARED_LIBRARY_LINK_C_FLAGS} -Wl,--add-stdcall-alias")
-  set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "${CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS} -Wl,--add-stdcall-alias")
-
-  # Specify the data model that we are using (yeah it may help Java)
-  if(CMAKE_SIZEOF_VOID_P EQUAL 4) # 32 bits
-    set(CMAKE_C_FLAGS   "${CMAKE_C_FLAGS}   -m32")
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32")
-  else()
-    set(CMAKE_C_FLAGS   "${CMAKE_C_FLAGS}   -m64")
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m64")
-  endif()
-endif()
index 72813dc..d9b2bb1 100644 (file)
@@ -14,14 +14,6 @@ find_package(JNI REQUIRED)
 message(STATUS "[Java] JNI found: ${JNI_FOUND}")
 message(STATUS "[Java] JNI include dirs: ${JNI_INCLUDE_DIRS}")
 
-if(WIN32)
-  execute_process(COMMAND         java -d64 -version
-                  OUTPUT_VARIABLE JVM_IS_64_BITS)
-  if("${JVM_IS_64_BITS}" MATCHES "Error")
-    message(fatal_error "SimGrid can only use Java 64 bits")
-  endif()
-endif()
-
 # Rules to build libsimgrid-java
 ################################
 
@@ -122,21 +114,6 @@ if(enable_lib_in_jar)
     COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_BINARY_DIR}/lib/${LIBSIMGRID_JAVA_SO} ${JAVA_NATIVE_PATH}/${LIBSIMGRID_JAVA_SO}
   )
 
-if(WIN32)
-  add_custom_command(
-    TARGET simgrid-java_jar POST_BUILD
-    COMMENT "Add the windows-specific native libs into simgrid.jar..."
-    DEPENDS simgrid simgrid-java ${JAVALIBS}
-
-    # There is no way to disable the dependency of mingw-64 on that lib, unfortunately nor to script cmake -E properly
-    # So let's be brutal and copy it in any case (even on non-windows builds) from the location where appveyor provides it.
-    # The copy is only expected to work on the appveyor builder, but that's all we need right now
-    # since our users are directed to download that file as nightly build.
-    COMMAND ${CMAKE_COMMAND} -E copy_if_different C:/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/libwinpthread-1.dll ${JAVA_NATIVE_PATH}/libwinpthread-1.dll || true
-    COMMAND ${CMAKE_COMMAND} -E copy_if_different C:/ProgramData/chocolatey/lib/mingw/tools/install/mingw64/bin/libwinpthread-1.dll  ${JAVA_NATIVE_PATH}/libwinpthread-1.dll || true
-  )
-endif()
-
 if(APPLE)
   add_custom_command(
     TARGET simgrid-java_jar POST_BUILD
index a2ab544..6875eab 100644 (file)
@@ -10,7 +10,7 @@ set(FLEX_MIN_PATCH 39)
 
 # Let's generate header files required by SMPI when the call location tracing
 # has been activated.
-if(enable_maintainer_mode AND NOT WIN32)
+if(enable_maintainer_mode)
   add_custom_command(OUTPUT ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_extended_traces.h
                             ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_extended_traces_fortran.h
     DEPENDS
@@ -35,7 +35,7 @@ if(enable_maintainer_mode AND NOT WIN32)
   )
 endif()
 
-if(enable_maintainer_mode AND NOT WIN32)
+if(enable_maintainer_mode)
   find_program(FLEX_EXE NAMES flex)
   find_program(FLEXML_EXE NAMES flexml)
   find_program(SED_EXE NAMES sed)
diff --git a/tools/cmake/MakeLibWin.cmake b/tools/cmake/MakeLibWin.cmake
deleted file mode 100644 (file)
index d76e274..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-### Make Libs
-
-add_library(simgrid SHARED ${simgrid_sources})
-
-if(MSVC)
-  set_target_properties(simgrid  PROPERTIES
-       COMPILE_FLAGS "/DDLL_EXPORT"
-       VERSION ${libsimgrid_version} )
-else()
-  set_target_properties(simgrid  PROPERTIES
-       COMPILE_FLAGS "-DDLL_EXPORT"
-       LINK_FLAGS "-shared"
-       VERSION ${libsimgrid_version}
-       PREFIX "lib" SUFFIX ".dll"
-       IMPORT_PREFIX "lib" IMPORT_SUFFIX ".dll")
-
-  set(SIMGRID_DEP "-lm")
-
-  if (HAVE_BOOST_CONTEXTS)
-    target_link_libraries(simgrid ${Boost_CONTEXT_LIBRARY})
-  endif()
-
-  if (HAVE_BOOST_STACKTRACE_BACKTRACE)
-    target_link_libraries(simgrid ${Boost_STACKTRACE_BACKTRACE_LIBRARY})
-  endif()
-
-  if (HAVE_BOOST_ADDR2LINE_BACKTRACE)
-    target_link_libraries(simgrid ${Boost_STACKTRACE_ADDR2LINE_LIBRARY})
-  endif()
-endif()
-
-target_link_libraries(simgrid  ${SIMGRID_DEP})
-
-# The library can obviously use the internal headers
-set_property(TARGET simgrid
-             APPEND PROPERTY INCLUDE_DIRECTORIES "${INTERNAL_INCLUDES}")
index b165f35..b3ed2f3 100644 (file)
@@ -39,14 +39,8 @@ if(enable-model-checking)
   SET(enable_model-checking ON CACHE BOOL "Whether to compile the model-checker" FORCE)
 endif()
 
-if(WIN32)
-  option(enable_smpi "Whether SMPI is included in the library." off)
-else()
-  option(enable_smpi "Whether SMPI is included in the library." on)
-  # PAPI does not support windows (they did in 3.7, but not anymore in 5.x)
-  # See http://icl.cs.utk.edu/papi/custom/index.html?lid=62&slid=96
-  option(enable_smpi_papi    "Whether SMPI supports PAPI bindings." off)
-endif()
+option(enable_smpi "Whether SMPI is included in the library." on)
+option(enable_smpi_papi    "Whether SMPI supports PAPI bindings." off)
 option(enable_smpi_MPICH3_testsuite "Whether the test suite form MPICH 3 should be built" off)
 option(enable_smpi_MBI_testsuite "Whether the test suite from MBI should be built." off)
 
index 4ded9f1..aa6cf46 100644 (file)
@@ -40,9 +40,6 @@ ENDIF()
 MACRO(ADD_TESH NAME)
   SET(ARGT ${ARGV})
   LIST(REMOVE_AT ARGT 0)
-  IF(WIN32)
-    STRING(REPLACE "§" "\;" ARGT "${ARGT}")
-  ENDIF()
   if(VALGRIND_WRAPPER)
     ADD_TEST(${NAME} ${TESH_COMMAND} --wrapper "${VALGRIND_WRAPPER}" ${TESH_OPTION} ${ARGT})
   else()
@@ -113,11 +110,7 @@ MACRO(SET_TESH_PROPERTIES NAME FACTORIES)
 ENDMACRO()
 
 IF(enable_java)
-  IF(WIN32)
-    SET(TESH_CLASSPATH_SEPARATOR "§")
-  ELSE()
-    SET(TESH_CLASSPATH_SEPARATOR ":")
-  ENDIF()
+  SET(TESH_CLASSPATH_SEPARATOR ":")
   SET(TESH_CLASSPATH "${CMAKE_BINARY_DIR}/examples/deprecated/java/${TESH_CLASSPATH_SEPARATOR}${CMAKE_BINARY_DIR}/teshsuite/java/${TESH_CLASSPATH_SEPARATOR}${SIMGRID_JAR}")
 ENDIF()
 
index 77e6bf9..eb1cade 100644 (file)
@@ -6,7 +6,7 @@ foreach(x setenv set-output-ignore set-output-sort set-return set-timeout backgr
           catch-all-bg-output catch-return catch-signal catch-timeout catch-timeout-output catch-wrong-output cd color
           ignore-regexp IO-bigsize IO-broken-pipe IO-orders)
   set(tesh_files  ${tesh_files} ${CMAKE_CURRENT_SOURCE_DIR}/${x}.tesh)
-  if(NOT enable_memcheck AND NOT WIN32)
+  if(NOT enable_memcheck)
     ADD_TESH(tesh-self-${x} --setenv bindir=${CMAKE_BINARY_DIR}/bin ${CMAKE_HOME_DIRECTORY}/tools/tesh/${x}.tesh)
   endif()
 endforeach()