From: Arnaud Giersch Date: Tue, 12 Oct 2021 14:56:45 +0000 (+0200) Subject: Kill trailing whitespaces in source code files. X-Git-Tag: v3.30~330 X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/73e97710413bba3ee2ae8baab0537fbd78811016 Kill trailing whitespaces in source code files. --- diff --git a/.clang-format b/.clang-format index 65ed4224af..5d0593870f 100644 --- a/.clang-format +++ b/.clang-format @@ -19,7 +19,7 @@ AlwaysBreakBeforeMultilineStrings: false AlwaysBreakTemplateDeclarations: false BinPackArguments: true BinPackParameters: true -BraceWrapping: +BraceWrapping: AfterClass: false AfterControlStatement: false AfterEnum: false @@ -45,7 +45,7 @@ DerivePointerAlignment: false DisableFormat: false ExperimentalAutoDetectBinPacking: false ForEachMacros: [ 'xbt_dynar_foreach', 'xbt_dict_foreach' ] -IncludeCategories: +IncludeCategories: - Regex: '^"(llvm|llvm-c|clang|clang-c)/' Priority: 2 - Regex: '^(<|"(gtest|isl|json)/)' diff --git a/.gitignore b/.gitignore index 83b2d1250a..03c3a4458b 100644 --- a/.gitignore +++ b/.gitignore @@ -39,7 +39,7 @@ src/surf/xml/simgrid_dtd.l ### Jedule examples/deprecated/simdag/scheduling/sd_scheduling.jed teshsuite/simdag/platforms/simgrid.jed -### Libraries links +### Libraries links [Ss]im[Gg]rid-*.tar.gz simgrid.jar ### Generated files @@ -99,7 +99,7 @@ doc/simgrid.tag doc/doxygen/logcategories.doc doc/javadoc doc/example_lists/ -### Specific of project +### Specific of project .settings/ .csettings/ examples/deprecated/java/.classpath diff --git a/CMakeLists.txt b/CMakeLists.txt index 8cb47e6d42..c3b459aabf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -34,7 +34,7 @@ include(GNUInstallDirs) #-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-# # Check for the compiler # #-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-# -## +## ## Check the C/C++ standard that we need ## See also tools/cmake/Flags.cmake that sets our paranoid warning flags INCLUDE(CheckCCompilerFlag) @@ -44,7 +44,7 @@ CHECK_C_COMPILER_FLAG(-fstack-cleaner HAVE_C_STACK_CLEANER) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g3") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g3") -if (CMAKE_COMPILER_IS_GNUCC) +if (CMAKE_COMPILER_IS_GNUCC) if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "5.0") message(FATAL_ERROR "SimGrid needs at least g++ version 5.0 to compile but you have ${CMAKE_CXX_COMPILER_VERSION}." @@ -71,16 +71,16 @@ find_package(Threads) include(${CMAKE_HOME_DIRECTORY}/tools/cmake/Option.cmake) ### SMPI vs. Fortran -if ((NOT DEFINED enable_smpi) OR enable_smpi) +if ((NOT DEFINED enable_smpi) OR enable_smpi) # First unset the compiler in case we're re-running cmake over a previous # configuration where it was saved as smpiff unset(CMAKE_Fortran_COMPILER) - + SET(SMPI_FORTRAN 0) if(enable_fortran) enable_language(Fortran OPTIONAL) endif() - + if(CMAKE_Fortran_COMPILER) # Fortran compiler detected: save it, then replace by smpiff @@ -110,7 +110,7 @@ if ((NOT DEFINED enable_smpi) OR enable_smpi) endif() -### SET THE LIBRARY EXTENSION +### SET THE LIBRARY EXTENSION if(APPLE) set(LIB_EXE "dylib") elseif(WIN32) @@ -182,7 +182,7 @@ if(WIN32) endif() # library dependency cannot start with a space (CMP0004), so initialize it with something that is never deactivated. -set(SIMGRID_DEP "-lm") +set(SIMGRID_DEP "-lm") ### Determine the assembly flavor that we need today set(HAVE_RAW_CONTEXTS 0) @@ -314,7 +314,7 @@ set(_Boost_STACKTRACE_ADDR2LINE_HEADERS "boost/stacktrace.hpp") message(STATUS "Mandatory components found. SimGrid is compilable.") endif() endif() - endif() + endif() # Checks for header libraries functions. CHECK_LIBRARY_EXISTS(rt clock_gettime "" HAVE_POSIX_GETTIME) @@ -408,7 +408,7 @@ if(enable_model-checking) set(enable_java FALSE) endif() else() - SET(SIMGRID_HAVE_MC 0) + SET(SIMGRID_HAVE_MC 0) set(HAVE_MMALLOC 0) endif() mark_as_advanced(PATH_LIBDW_H) @@ -574,7 +574,7 @@ foreach(script cc cxx ff f90 run) configure_file(${CMAKE_HOME_DIRECTORY}/src/smpi/smpi${script}.in ${CMAKE_BINARY_DIR}/bin/smpi${script} @ONLY) endforeach() -### SMPI scripts used when compiling simgrid +### SMPI scripts used when compiling simgrid set(exec_prefix "${CMAKE_BINARY_DIR}/smpi_script/") set(includedir "${CMAKE_HOME_DIRECTORY}/include") set(libdir "${CMAKE_BINARY_DIR}/lib") diff --git a/FindSimGrid.cmake b/FindSimGrid.cmake index 43dc8d082d..70cd898bac 100644 --- a/FindSimGrid.cmake +++ b/FindSimGrid.cmake @@ -1,4 +1,4 @@ -# CMake find module to search for the SimGrid library. +# CMake find module to search for the SimGrid library. # Copyright (c) 2016-2021. The SimGrid Team. # @@ -48,7 +48,7 @@ # Since SimGrid header files require C++14, so we set CMAKE_CXX_STANDARD to 14. # Change this variable in your own file if you need a later standard. -# +# # IMPROVING THIS FILE # ------------------- # - Use automatic SimGridConfig.cmake creation via export/install(EXPORT in main CMakeLists.txt: @@ -72,7 +72,7 @@ if (NOT SimGrid_INCLUDE_DIR) NAMES simgrid_config.h PATHS ${SimGrid_PATH}/include /opt/simgrid/include ) -endif() +endif() find_library(SimGrid_LIBRARY NAMES simgrid PATHS ${SimGrid_PATH}/lib /opt/simgrid/lib @@ -100,7 +100,7 @@ if (SimGrid_INCLUDE_DIR) set(SimGrid_VERSION_${CMAKE_MATCH_1} ${CMAKE_MATCH_2}) endforeach() unset(SimGrid_VERSION_STRING) - unset(SimGrid_VERSION_REGEX) + unset(SimGrid_VERSION_REGEX) endif () include(FindPackageHandleStandardArgs) diff --git a/contrib/benchmarking_code_block/Rhist.R b/contrib/benchmarking_code_block/Rhist.R index cf642c4b6d..4eb5b2e966 100644 --- a/contrib/benchmarking_code_block/Rhist.R +++ b/contrib/benchmarking_code_block/Rhist.R @@ -24,7 +24,7 @@ merge_empty_bins <- function (h){ j<-j+1 } } - + counts2[j]<-h$counts[length(h$counts)] breaks2[j+1]<-h$breaks[length(h$breaks)] @@ -74,7 +74,7 @@ for(i in unique(NAME)){ h<-merge_empty_bins(h) } } - + cat(i, file = outputfile, sep = "\t", append = TRUE) cat("\t", file = outputfile, append = TRUE) cat(sum(h$counts), file =outputfile, sep = "\t", append = TRUE) diff --git a/contrib/benchmarking_code_block/Rplot_hist.R b/contrib/benchmarking_code_block/Rplot_hist.R index 18f5f23a0d..9c21927f96 100644 --- a/contrib/benchmarking_code_block/Rplot_hist.R +++ b/contrib/benchmarking_code_block/Rplot_hist.R @@ -40,14 +40,14 @@ i<-1 # Reading histograms one by one, line by line while (length(oneLine <- readLines(fp, n = 1, warn = FALSE)) > 0){ - myVector <- (strsplit(oneLine, "\t")) - + myVector <- (strsplit(oneLine, "\t")) + dfl <- ldply (myVector, data.frame) name<-as.character(dfl[1,]) nbins<-as.numeric(as.character(dfl[4,])) allbreaks<-as.numeric(as.character(dfl[5:(5+nbins-1),])) - + dh<-data.frame(Name=as.character(dfl[1,]), Total=as.numeric(as.character(dfl[2,])), Mean=as.numeric(as.character(dfl[3,])), Nbins=as.numeric(as.character(dfl[4,]))) dh<-cbind(dh,Bstart=allbreaks[-length(allbreaks)]) diff --git a/docs/Build.sh b/docs/Build.sh index 7da20b4b17..24aa30c5a5 100755 --- a/docs/Build.sh +++ b/docs/Build.sh @@ -30,14 +30,14 @@ else set -x perl ./bin/extract_logs_hierarchy.pl ../ > build/log_categories.rst set +x -fi +fi if [ "x$1" != 'xjava' ] && [ -e source/java ] ; then echo "javasphinx not rerun: 'java' was not provided as an argument" else set -x rm -rf source/java - + # Use that script without installing javasphinx: javasphinx-apidoc --force -o source/java/ ../src/bindings/java/org/simgrid/msg PYTHONPATH=${PYTHONPATH}:source/_ext/javasphinx python3 - --force -o source/java/ ../src/bindings/java/org/simgrid/msg <) { chomp $file; - parse_file($file); + parse_file($file); } parse_file("$path/include/xbt/sysdep.h"); close FILES; @@ -94,7 +94,7 @@ my %used; sub display_subtree { my $name=shift; my $indent=shift; - + $used{$name} = 1; unless ($name eq "XBT_LOG_ROOT_CAT") { # do not display the root print "$indent - $name: ".($desc{$name}|| "(undocumented)")."\n"; diff --git a/docs/find-missing.py b/docs/find-missing.py index 145e441574..913d595820 100755 --- a/docs/find-missing.py +++ b/docs/find-missing.py @@ -190,7 +190,7 @@ for arg in xml_files: elif kind == "typedef": if compoundname not in doxy_type: doxy_type[compoundname] = [] - doxy_type[compoundname].append(name) + doxy_type[compoundname].append(name) elif kind == "friend": pass # Ignore friendship else: @@ -256,7 +256,7 @@ with os.popen('grep doxygentypedef:: find-missing.ignore source/*rst|sed \'s/^.* if len(doxy_type[klass]) == 0: del doxy_type[klass] -# Dump the undocumented Doxygen declarations +# Dump the undocumented Doxygen declarations for obj in sorted(doxy_funs): for meth in sorted(doxy_funs[obj]): for args in sorted(doxy_funs[obj][meth]): diff --git a/docs/source/tuto_smpi/gemm_mpi.cpp b/docs/source/tuto_smpi/gemm_mpi.cpp index 92a14d60a8..4a5346ebde 100644 --- a/docs/source/tuto_smpi/gemm_mpi.cpp +++ b/docs/source/tuto_smpi/gemm_mpi.cpp @@ -78,7 +78,7 @@ int main(int argc, char* argv[]) multiply((size/nproc)*nproc, size-1); } } - + // MPI_Barrier(MPI_COMM_WORLD); // end = MPI_Wtime(); @@ -97,7 +97,6 @@ int main(int argc, char* argv[]) // msec_per_matrix_mul, // flops_per_matrix_mul); // } - return 0; } diff --git a/examples/c/CMakeLists.txt b/examples/c/CMakeLists.txt index 5c833fff62..25cccf5ba1 100644 --- a/examples/c/CMakeLists.txt +++ b/examples/c/CMakeLists.txt @@ -4,7 +4,7 @@ foreach(x actor-create actor-daemon actor-exiting actor-join actor-kill actor-lifetime actor-migrate actor-stacksize actor-suspend actor-yield - app-masterworker app-token-ring + app-masterworker app-token-ring comm-pingpong comm-wait comm-waitall comm-waitany cloud-capping cloud-masterworker cloud-migration cloud-simple dht-pastry @@ -37,7 +37,7 @@ endforeach() # Chainsend example -add_executable (c-app-chainsend EXCLUDE_FROM_ALL app-chainsend/chainsend.c app-chainsend/broadcaster.c +add_executable (c-app-chainsend EXCLUDE_FROM_ALL app-chainsend/chainsend.c app-chainsend/broadcaster.c app-chainsend/peer.c) target_link_libraries(c-app-chainsend simgrid) set_target_properties(c-app-chainsend PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/app-chainsend) @@ -131,10 +131,10 @@ else() set(parallel-factories "*") endif() -ADD_TESH_FACTORIES(c-app-bittorrent-parallel "raw" --cfg contexts/nthreads:4 ${CONTEXTS_SYNCHRO} - --setenv bindir=${CMAKE_BINARY_DIR}/examples/c/app-bittorrent - --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/platforms - --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms +ADD_TESH_FACTORIES(c-app-bittorrent-parallel "raw" --cfg contexts/nthreads:4 ${CONTEXTS_SYNCHRO} + --setenv bindir=${CMAKE_BINARY_DIR}/examples/c/app-bittorrent + --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/platforms + --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --cd ${CMAKE_HOME_DIRECTORY}/examples/c/app-bittorrent app-bittorrent.tesh) ADD_TESH_FACTORIES(c-dht-kademlia-parallel "${parallel-factories}" --cfg contexts/nthreads:4 ${CONTEXTS_SYNCHRO} diff --git a/examples/cpp/CMakeLists.txt b/examples/cpp/CMakeLists.txt index a266bd43cf..138ec4a4d6 100644 --- a/examples/cpp/CMakeLists.txt +++ b/examples/cpp/CMakeLists.txt @@ -33,7 +33,7 @@ if(SIMGRID_HAVE_MC) target_link_libraries(s4u-mc-bugged1-liveness simgrid) set_target_properties(s4u-mc-bugged1-liveness PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/mc-bugged1-liveness) add_dependencies(tests-mc s4u-mc-bugged1-liveness) - + if(HAVE_C_STACK_CLEANER) add_executable (s4u-mc-bugged1-liveness-cleaner-on EXCLUDE_FROM_ALL s4u-mc-bugged1-liveness/s4u-mc-bugged1-liveness.cpp) target_link_libraries(s4u-mc-bugged1-liveness-cleaner-on simgrid) @@ -125,7 +125,7 @@ endforeach() ################### # MASTERWORKERS EXAMPLE -foreach(variant fun class) +foreach(variant fun class) add_executable (s4u-app-masterworkers-${variant} EXCLUDE_FROM_ALL app-masterworkers/s4u-app-masterworkers-${variant}.cpp) target_link_libraries(s4u-app-masterworkers-${variant} simgrid) set_target_properties(s4u-app-masterworkers-${variant} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/app-masterworkers) @@ -142,25 +142,25 @@ if(SIMGRID_HAVE_MC) add_dependencies(tests-mc s4u-${example}) endif() endforeach() - + # Model-checking liveness IF(HAVE_UCONTEXT_CONTEXTS AND SIMGRID_PROCESSOR_x86_64) # liveness model-checking works only on 64bits (for now ...) add_dependencies(tests-mc s4u-mc-bugged1-liveness) - ADD_TESH(s4u-mc-bugged1-liveness-ucontext --setenv bindir=${CMAKE_CURRENT_BINARY_DIR}/mc-bugged1-liveness - --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms + ADD_TESH(s4u-mc-bugged1-liveness-ucontext --setenv bindir=${CMAKE_CURRENT_BINARY_DIR}/mc-bugged1-liveness + --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --cd ${CMAKE_CURRENT_SOURCE_DIR}/mc-bugged1-liveness ${CMAKE_HOME_DIRECTORY}/examples/cpp/mc-bugged1-liveness/s4u-mc-bugged1-liveness.tesh) # This example hit the 5' timeout on CI, disable it for now -# ADD_TESH(s4u-mc-bugged1-liveness-visited-ucontext --setenv bindir=${CMAKE_CURRENT_BINARY_DIR}/mc-bugged1-liveness -# --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms +# ADD_TESH(s4u-mc-bugged1-liveness-visited-ucontext --setenv bindir=${CMAKE_CURRENT_BINARY_DIR}/mc-bugged1-liveness +# --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms # --cd ${CMAKE_CURRENT_SOURCE_DIR}/mc-bugged1-liveness # ${CMAKE_HOME_DIRECTORY}/examples/cpp/mc-bugged1-liveness/s4u-mc-bugged1-liveness-visited.tesh) IF(HAVE_C_STACK_CLEANER) add_dependencies(tests-mc s4u-mc-bugged1-liveness-stack-cleaner) # This test checks if the stack cleaner is making a difference: ADD_TEST(s4u-mc-bugged1-liveness-stack-cleaner ${CMAKE_HOME_DIRECTORY}/examples/cpp/mc-bugged1-liveness/s4u-mc-bugged1-liveness-stack-cleaner - ${CMAKE_HOME_DIRECTORY}/examples/cpp/mc-bugged1-liveness/ + ${CMAKE_HOME_DIRECTORY}/examples/cpp/mc-bugged1-liveness/ ${CMAKE_CURRENT_BINARY_DIR}/mc-bugged1-liveness/) ENDIF() ENDIF() @@ -180,13 +180,13 @@ else() set(parallel-factories "*") endif() -foreach(example app-bittorrent app-masterworkers +foreach(example app-bittorrent app-masterworkers dht-chord dht-kademlia ) ADD_TESH_FACTORIES(s4u-${example}-parallel "${parallel-factories}" --cfg contexts/nthreads:4 ${CONTEXTS_SYNCHRO} - --setenv bindir=${CMAKE_CURRENT_BINARY_DIR}/${example} - --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms - --cd ${CMAKE_CURRENT_SOURCE_DIR}/${example} + --setenv bindir=${CMAKE_CURRENT_BINARY_DIR}/${example} + --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms + --cd ${CMAKE_CURRENT_SOURCE_DIR}/${example} ${CMAKE_HOME_DIRECTORY}/examples/cpp/${example}/s4u-${example}.tesh) endforeach() @@ -215,10 +215,10 @@ foreach (example exec-ptask trace-categories trace-masterworkers trace-platform set(tesh_files ${tesh_files} ${CMAKE_CURRENT_SOURCE_DIR}/${example}/s4u-${example}.tesh) set(examples_src ${examples_src} ${CMAKE_CURRENT_SOURCE_DIR}/${example}/s4u-${example}.cpp) - + ADD_TESH(s4u-${example} --setenv bindir=${CMAKE_CURRENT_BINARY_DIR}/${example} --setenv srcdir=${CMAKE_CURRENT_SOURCE_DIR}/${example} - --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms + --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --cd ${CMAKE_CURRENT_BINARY_DIR}/${example} ${CMAKE_HOME_DIRECTORY}/examples/cpp/${example}/s4u-${example}.tesh) endforeach() @@ -239,7 +239,7 @@ endif() # Add all extra files to the archive #################################### set(examples_src ${examples_src} ${CMAKE_CURRENT_SOURCE_DIR}/mc-bugged1-liveness/s4u-mc-bugged1-liveness.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/network-ns3/s4u-network-ns3.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/network-ns3/s4u-network-ns3.cpp ${CMAKE_CURRENT_SOURCE_DIR}/network-ns3-wifi/s4u-network-ns3-wifi.cpp PARENT_SCOPE) set(tesh_files ${tesh_files} ${CMAKE_CURRENT_SOURCE_DIR}/comm-pingpong/simix-breakpoint.tesh ${CMAKE_CURRENT_SOURCE_DIR}/mc-bugged1-liveness/s4u-mc-bugged1-liveness.tesh diff --git a/examples/deprecated/java/app/bittorrent/Peer.java b/examples/deprecated/java/app/bittorrent/Peer.java index 3bd30bf8d7..ce2047f961 100644 --- a/examples/deprecated/java/app/bittorrent/Peer.java +++ b/examples/deprecated/java/app/bittorrent/Peer.java @@ -49,7 +49,7 @@ public class Peer extends Process { Msg.info("Wrong number of arguments"); } init(Integer.parseInt(args[0]), (args.length == 3)); - + //Retrieve the deadline deadline = Double.parseDouble(args[1]); if (deadline < 0) { @@ -61,7 +61,7 @@ public class Peer extends Process { if (getPeersData()) { Msg.debug("Got " + peers.size() + " peers from the tracker"); Msg.debug("Here is my current status: " + getStatus()); - beginReceiveTime = Msg.getClock(); + beginReceiveTime = Msg.getClock(); if (hasFinished()) { pieces = Common.FILE_PIECES; sendHandshakeAll(); @@ -265,39 +265,39 @@ public class Peer extends Process { assert message.index >= 0 && message.index < Common.FILE_PIECES; assert remotePeer.bitfield != null; remotePeer.bitfield[message.index] = '1'; - piecesCount[message.index]++; + piecesCount[message.index]++; //Send interested message to the peer if he has what we want if (!remotePeer.amInterested && currentPieces.contains(message.index) ) { remotePeer.amInterested = true; sendInterested(remotePeer.mailbox); } - + if (currentPieces.contains(message.index)) { - int blockIndex = getFirstBlock(message.index); + int blockIndex = getFirstBlock(message.index); int blockLength = Common.PIECES_BLOCKS - blockIndex ; - blockLength = blockLength > Common.BLOCKS_REQUESTED ? Common.BLOCKS_REQUESTED : blockLength; + blockLength = blockLength > Common.BLOCKS_REQUESTED ? Common.BLOCKS_REQUESTED : blockLength; sendRequest(message.mailbox,message.index,blockIndex,blockLength); } break; case REQUEST: assert message.index >= 0 && message.index < Common.FILE_PIECES; if (!remotePeer.chokedUpload) { - Msg.debug("Received a REQUEST from " + message.peerId + "(" + message.issuerHostname + ") for " + Msg.debug("Received a REQUEST from " + message.peerId + "(" + message.issuerHostname + ") for " + message.peerId); if (bitfield[message.index] == '1') { - sendPiece(message.mailbox,message.index,false,message.blockIndex,message.blockLength); + sendPiece(message.mailbox,message.index,false,message.blockIndex,message.blockLength); } else { - Msg.debug("Received a REQUEST from " + message.peerId + " (" + message.issuerHostname + Msg.debug("Received a REQUEST from " + message.peerId + " (" + message.issuerHostname + ") but he is choked" ); } } break; case PIECE: if (message.stalled) { - Msg.debug("The received piece " + message.index + " from " + message.peerId + " (" + message.issuerHostname + Msg.debug("The received piece " + message.index + " from " + message.peerId + " (" + message.issuerHostname + ") is stalled"); } else { - Msg.debug("Received piece " + message.index + " from " + message.peerId + " (" + Msg.debug("Received piece " + message.index + " from " + message.peerId + " (" + message.issuerHostname + ")"); if (bitfield[message.index] == '0') { updateBitfieldBlocks(message.index,message.blockIndex,message.blockLength); @@ -493,7 +493,7 @@ public class Peer extends Process { return true; } - // Returns the first block of a piece that we don't have. + // Returns the first block of a piece that we don't have. private int getFirstBlock(int piece) { int blockIndex = -1; for (int i = 0; i < Common.PIECES_BLOCKS; i++) { @@ -517,7 +517,7 @@ public class Peer extends Process { //Getting the block to send. int blockIndex = getFirstBlock(piece); int blockLength = Common.PIECES_BLOCKS - blockIndex ; - blockLength = blockLength > Common.BLOCKS_REQUESTED ? Common.BLOCKS_REQUESTED : blockLength; + blockLength = blockLength > Common.BLOCKS_REQUESTED ? Common.BLOCKS_REQUESTED : blockLength; if (remotePeer.bitfield[piece] == '1') { sendRequest(remotePeer.mailbox, piece, blockIndex, blockLength); } @@ -531,9 +531,9 @@ public class Peer extends Process { } for (Connection connection : peers.values()) { if (connection.bitfield != null && connection.bitfield[currentPiece] == '1' && !connection.amInterested) { - connection.amInterested = true; + connection.amInterested = true; MessageTask task = new MessageTask(MessageTask.Type.INTERESTED, hostname, this.mailbox, this.id); - task.dsend(connection.mailbox); + task.dsend(connection.mailbox); } } currentPiece = -1; @@ -605,7 +605,7 @@ public class Peer extends Process { private void sendRequest(String mailbox, int piece, int blockIndex, int blockLength) { Msg.debug("Sending a REQUEST to " + mailbox + " for piece " + piece + " and blocks " + blockIndex + "," + (blockIndex + blockLength)); - MessageTask task = new MessageTask(MessageTask.Type.REQUEST, hostname, this.mailbox, this.id, piece, blockIndex, + MessageTask task = new MessageTask(MessageTask.Type.REQUEST, hostname, this.mailbox, this.id, piece, blockIndex, blockLength); task.dsend(mailbox); } diff --git a/examples/deprecated/java/app/centralizedmutex/Coordinator.java b/examples/deprecated/java/app/centralizedmutex/Coordinator.java index e7d2b117a8..178d027762 100644 --- a/examples/deprecated/java/app/centralizedmutex/Coordinator.java +++ b/examples/deprecated/java/app/centralizedmutex/Coordinator.java @@ -20,7 +20,7 @@ public class Coordinator extends Process { public void main(String[] args) throws MsgException { int csToServe = Integer.parseInt(args[0]); LinkedList waitingQueue=new LinkedList<>(); - + while (csToServe >0) { Task task = Task.receive("coordinator"); if (task instanceof RequestTask) { diff --git a/examples/deprecated/java/app/masterworker/Master.java b/examples/deprecated/java/app/masterworker/Master.java index 8659a47086..116b6eced2 100644 --- a/examples/deprecated/java/app/masterworker/Master.java +++ b/examples/deprecated/java/app/masterworker/Master.java @@ -16,7 +16,7 @@ import org.simgrid.msg.Process; public class Master extends Process { public Master(Host host, String name, String[]args) { super(host,name,args); - } + } public void main(String[] args) throws MsgException { if (args.length < 4) { Msg.info("Master needs 4 arguments"); @@ -32,7 +32,7 @@ public class Master extends Process { Msg.info("Hello! My PID is "+getPID()+". Got "+ workersCount + " workers and "+tasksCount+" tasks to process"); for (int i = 0; i < tasksCount; i++) { - Task task = new Task("Task_" + i, taskComputeSize, taskCommunicateSize); + Task task = new Task("Task_" + i, taskComputeSize, taskCommunicateSize); Msg.debug("Sending \"" + task.getName()+ "\" to \"worker_" + i % workersCount + "\""); task.send("worker_"+(i%workersCount)); } diff --git a/examples/deprecated/java/app/masterworker/Worker.java b/examples/deprecated/java/app/masterworker/Worker.java index ff98387c40..84f1a356e5 100644 --- a/examples/deprecated/java/app/masterworker/Worker.java +++ b/examples/deprecated/java/app/masterworker/Worker.java @@ -28,7 +28,7 @@ public class Worker extends Process { int num = Integer.parseInt(args[0]); Msg.debug("Receiving on 'worker_"+num+"'"); - while(true) { + while(true) { Task task = Task.receive("worker_"+num); if ("finalize".equals(task.getName())) { diff --git a/examples/deprecated/java/app/pingpong/Main.java b/examples/deprecated/java/app/pingpong/Main.java index 07d88a8965..64fbfdc4f5 100644 --- a/examples/deprecated/java/app/pingpong/Main.java +++ b/examples/deprecated/java/app/pingpong/Main.java @@ -8,27 +8,27 @@ import java.io.File; import org.simgrid.msg.HostNotFoundException; import org.simgrid.msg.Msg; - + class Main { protected static final int TASK_COUNT = 3; - + private Main() { throw new IllegalAccessError("Utility class"); } public static void main(String[] args) throws HostNotFoundException { Msg.init(args); - + String platfFile = "../../examples/platforms/small_platform.xml"; if (args.length == 1) platfFile = args[0]; - - File f = new File(platfFile); + + File f = new File(platfFile); if (!f.exists()) { Msg.error("File " + platfFile + " does not exist in " + System.getProperty("user.dir")); Msg.error("Usage : Main ../platforms/platform.xml"); } - + Msg.createEnvironment(platfFile); new Sender("Jacquelin", "Sender", new String[] {"Boivin"}).start(); new Receiver ("Boivin", "Receiver", null).start(); diff --git a/examples/deprecated/java/app/pingpong/PingPongTask.java b/examples/deprecated/java/app/pingpong/PingPongTask.java index 0dff39ce91..4634508300 100644 --- a/examples/deprecated/java/app/pingpong/PingPongTask.java +++ b/examples/deprecated/java/app/pingpong/PingPongTask.java @@ -15,8 +15,8 @@ public class PingPongTask extends Task { public PingPongTask(String name, double computeDuration, double messageSize, double timeVal) { super(name,computeDuration,messageSize); - - this.timeVal = timeVal; + + this.timeVal = timeVal; } public double getTime() { diff --git a/examples/deprecated/java/app/pingpong/Sender.java b/examples/deprecated/java/app/pingpong/Sender.java index 33aa613dbe..095e15bd67 100644 --- a/examples/deprecated/java/app/pingpong/Sender.java +++ b/examples/deprecated/java/app/pingpong/Sender.java @@ -25,7 +25,7 @@ public class Sender extends Process { for(int pos = 0; pos < args.length ; pos++) { String hostname = Host.getByName(args[pos]).getName(); // Make sure that this host exists - double time = Msg.getClock(); + double time = Msg.getClock(); Msg.info("sender time: " + time); PingPongTask task = new PingPongTask("no name", /* Duration: 0 flops */ 0, COMM_SIZE_LAT, time); diff --git a/examples/deprecated/java/app/tokenring/Main.java b/examples/deprecated/java/app/tokenring/Main.java index 5192a41440..6efdd20d15 100644 --- a/examples/deprecated/java/app/tokenring/Main.java +++ b/examples/deprecated/java/app/tokenring/Main.java @@ -16,12 +16,12 @@ class Main { public static void main(String[] args) { Msg.init(args); - + String platform = "../platforms/small_platform.xml"; - if(args.length >= 1) + if(args.length >= 1) platform = args[0]; Msg.createEnvironment(platform); - + Host[] hosts = Host.all(); for (int rank = 0; rank < hosts.length; rank++) { Process proc = new RelayRunner(hosts[rank], Integer.toString(rank), null); diff --git a/examples/deprecated/java/app/tokenring/RelayRunner.java b/examples/deprecated/java/app/tokenring/RelayRunner.java index 32224bf9fd..6641337aa8 100644 --- a/examples/deprecated/java/app/tokenring/RelayRunner.java +++ b/examples/deprecated/java/app/tokenring/RelayRunner.java @@ -21,27 +21,27 @@ public class RelayRunner extends Process { /* This is the function executed by this kind of processes */ @Override public void main(String[] args) throws MsgException { - // In this example, the processes are given numerical names: "0", "1", "2", and so on + // In this example, the processes are given numerical names: "0", "1", "2", and so on int rank = Integer.parseInt(this.getName()); if (rank == 0) { /* The root (rank 0) first sends the token then waits to receive it back */ - - String mailbox = "1"; + + String mailbox = "1"; Task token = new Task("Token", 0/* no computation associated*/ , TASK_COMM_SIZE ); Msg.info("Host '"+rank+"' send '"+token.getName()+"' to Host '"+mailbox+"'"); token.send(mailbox); - + token = Task.receive(this.getName()); // Get a message from the mailbox having the same name as the current processor - + Msg.info("Host '"+rank+"' received '"+token.getName()+"'"); } else { /* The others processes receive on their name (coming from their left neighbor -- rank-1) * and send to their right neighbor (rank+1) */ Task token = Task.receive(this.getName()); - + Msg.info("Host '"+rank+"' received '"+token.getName()+"'"); String mailbox = Integer.toString(rank+1); @@ -49,7 +49,7 @@ public class RelayRunner extends Process { /* The last process has no right neighbor, so it sends the token back to rank 0 */ mailbox = "0"; } - + Msg.info("Host '"+rank+"' send '"+token.getName()+"' to Host '"+mailbox+"'"); token.send(mailbox); } diff --git a/examples/deprecated/java/async/dsend/Main.java b/examples/deprecated/java/async/dsend/Main.java index 16bb16b240..cd7104f395 100644 --- a/examples/deprecated/java/async/dsend/Main.java +++ b/examples/deprecated/java/async/dsend/Main.java @@ -6,8 +6,8 @@ package async.dsend; /** This example demonstrates the use of the Task.dsend() method. - * - * This way, the sender can be detached from the communication: it is not blocked as with Task.send() + * + * This way, the sender can be detached from the communication: it is not blocked as with Task.send() * and has nothing to do at the end as with Task.isend() where it must do a Comm.wait(). */ diff --git a/examples/deprecated/java/async/dsend/Sender.java b/examples/deprecated/java/async/dsend/Sender.java index 338fe320b0..333f0f7ef2 100644 --- a/examples/deprecated/java/async/dsend/Sender.java +++ b/examples/deprecated/java/async/dsend/Sender.java @@ -27,7 +27,7 @@ public class Sender extends Process { Msg.info("Hello! Got "+ receiverCount + " receivers to contact"); for (int i = 1; i <= receiverCount; i++) { - Task task = new Task("Task_" + i, taskComputeSize, taskCommunicateSize); + Task task = new Task("Task_" + i, taskComputeSize, taskCommunicateSize); Msg.info("Sending \"" + task.getName()+ "\" to \"" + hosts[i].getName() + "\""); task.dsend(hosts[i].getName()); } diff --git a/examples/deprecated/java/async/waitall/Main.java b/examples/deprecated/java/async/waitall/Main.java index 385da41af4..ad2b1535ee 100644 --- a/examples/deprecated/java/async/waitall/Main.java +++ b/examples/deprecated/java/async/waitall/Main.java @@ -6,13 +6,13 @@ package async.waitall; /** This example demonstrates the use of the asynchronous communications - * + * * Task.isend() and Task.irecv() are used to start the communications in non-blocking mode. - * - * The sends are then blocked onto with Comm.waitCompletion(), that locks until the given + * + * The sends are then blocked onto with Comm.waitCompletion(), that locks until the given * communication terminates. - * - * The receives are packed into an array, and the sender blocks until all of them terminate + * + * The receives are packed into an array, and the sender blocks until all of them terminate * with Comm.waitAll(). */ diff --git a/examples/deprecated/java/async/waitall/Sender.java b/examples/deprecated/java/async/waitall/Sender.java index e3c82d587c..3c06c79088 100644 --- a/examples/deprecated/java/async/waitall/Sender.java +++ b/examples/deprecated/java/async/waitall/Sender.java @@ -29,7 +29,7 @@ public class Sender extends Process { Comm[] communicators = new Comm[receiverCount]; for (int i = 1; i <= receiverCount; i++) { - Task task = new Task("Task_" + i, taskComputeSize, taskCommunicateSize); + Task task = new Task("Task_" + i, taskComputeSize, taskCommunicateSize); Msg.info("Start the Sending '" + task.getName()+ "' to '" + hosts[i].getName() + "'"); communicators[i-1] = task.isend(hosts[i].getName()); } diff --git a/examples/deprecated/java/async/yield/Main.java b/examples/deprecated/java/async/yield/Main.java index 67e89078bb..c286cb61d7 100644 --- a/examples/deprecated/java/async/yield/Main.java +++ b/examples/deprecated/java/async/yield/Main.java @@ -6,8 +6,8 @@ package async.yield; /** This example demonstrates the use of the Task.dsend() method. - * - * This way, the sender can be detached from the communication: it is not blocked as with Task.send() + * + * This way, the sender can be detached from the communication: it is not blocked as with Task.send() * and has nothing to do at the end as with Task.isend() where it must do a Comm.wait(). */ @@ -33,7 +33,7 @@ class Main { Host[] hosts = Host.all(); new Yielder(hosts[0],"Yielder", new String[] {"10"}).start(); new Yielder(hosts[1],"Yielder", new String[] {"15"}).start(); - + /* execute the simulation. */ Msg.run(); } diff --git a/examples/deprecated/java/cloud/masterworker/Main.java b/examples/deprecated/java/cloud/masterworker/Main.java index 0002f09bf5..6304233f07 100644 --- a/examples/deprecated/java/cloud/masterworker/Main.java +++ b/examples/deprecated/java/cloud/masterworker/Main.java @@ -21,18 +21,18 @@ class Main { } public static void main(String[] args) { - Msg.init(args); + Msg.init(args); String platfFile = "../../examples/platforms/small_platform.xml"; if (args.length >= 1) platfFile = args[0]; - - File f = new File(platfFile); + + File f = new File(platfFile); if (!f.exists()) { Msg.error("File " + platfFile + " does not exist in " + System.getProperty("user.dir")); Msg.error("Usage : Main ../platforms/platform.xml"); } - + Msg.createEnvironment(platfFile); Host[] hosts = Host.all(); if (hosts.length < NHOSTS+1) { @@ -41,7 +41,7 @@ class Main { System.exit(42); } new Master(hosts[0],"Master",hosts).start(); - + /* Execute the simulation */ Msg.run(); } diff --git a/examples/deprecated/java/cloud/masterworker/Master.java b/examples/deprecated/java/cloud/masterworker/Master.java index cb50ce8433..5ff79275b6 100644 --- a/examples/deprecated/java/cloud/masterworker/Master.java +++ b/examples/deprecated/java/cloud/masterworker/Master.java @@ -24,9 +24,9 @@ public class Master extends Process { int workersCount = Main.NHOSTS; for (int step = 1; step <= Main.NSTEPS ; step++) { - // Create one VM per host and bind a process inside each one. + // Create one VM per host and bind a process inside each one. for (int i = 0; i < workersCount; i++) { - Msg.verb("create VM0-s"+step+"-"+i); + Msg.verb("create VM0-s"+step+"-"+i); VM vm = new VM(hosts[i+1],"VM0-s"+step+"-"+i); vm.start(); Worker worker= new Worker(vm,"WK:"+step+":"+ i); @@ -48,9 +48,9 @@ public class Master extends Process { Msg.verb("Wait a while, and resume all VMs."); waitFor(2); - for (VM vm : vms) + for (VM vm : vms) vm.resume(); - + Msg.verb("Sleep long enough for everyone to be done with previous batch of work"); waitFor(1000*step - Msg.getClock()); @@ -63,7 +63,7 @@ public class Master extends Process { Msg.verb("Let's kill everyone."); - for (VM vm : vms) + for (VM vm : vms) vm.destroy(); Msg.info("XXXXXXXXXXXXXXX Step "+step+" done."); } diff --git a/examples/deprecated/java/cloud/migration/XVM.java b/examples/deprecated/java/cloud/migration/XVM.java index 5345008a97..ed27fd72fb 100644 --- a/examples/deprecated/java/cloud/migration/XVM.java +++ b/examples/deprecated/java/cloud/migration/XVM.java @@ -24,7 +24,7 @@ public class XVM extends VM { this.daemon = new Daemon(this); } - public void setLoad(int load){ + public void setLoad(int load){ if (load >0) { this.setBound(this.getSpeed()*load/100); daemon.resume(); @@ -48,13 +48,13 @@ public class XVM extends VM { @Override public void migrate(Host host) throws HostFailureException { Msg.info("Start migration of VM " + this.getName() + " to " + host.getName()); - Msg.info(" currentLoad:" + this.currentLoad + "/ramSize:" + this.ramsize + "/dpIntensity:" + this.dpIntensity + Msg.info(" currentLoad:" + this.currentLoad + "/ramSize:" + this.ramsize + "/dpIntensity:" + this.dpIntensity + "/remaining:" + String.format(java.util.Locale.US, "%.2E",this.daemon.getRemaining())); try{ super.migrate(host); } catch (Exception e){ Msg.info("Something wrong during the live migration of VM "+this.getName()); - throw new HostFailureException(); + throw new HostFailureException(); } this.setLoad(this.currentLoad); //Fixed the fact that setBound is not propagated to the new node. Msg.info("End of migration of VM " + this.getName() + " to node " + host.getName()); diff --git a/examples/deprecated/java/dht/chord/Common.java b/examples/deprecated/java/dht/chord/Common.java index 27856bd569..c9a63466ec 100644 --- a/examples/deprecated/java/dht/chord/Common.java +++ b/examples/deprecated/java/dht/chord/Common.java @@ -9,7 +9,7 @@ package dht.chord; public class Common { public static final int COMM_SIZE = 10; public static final int COMP_SIZE = 0; - + public static final int NB_BITS = 24; public static final int NB_KEYS = 16777216; public static final int TIMEOUT = 50; diff --git a/examples/deprecated/java/dht/chord/Node.java b/examples/deprecated/java/dht/chord/Node.java index 17a7c7ad40..812aa8d0aa 100644 --- a/examples/deprecated/java/dht/chord/Node.java +++ b/examples/deprecated/java/dht/chord/Node.java @@ -113,7 +113,7 @@ public class Node extends Process { private void handleTask(Task task) { if (task instanceof FindSuccessorTask) { FindSuccessorTask fTask = (FindSuccessorTask)task; - Msg.debug("Receiving a 'Find Successor' request from " + fTask.getIssuerHostName() + " for id " + + Msg.debug("Receiving a 'Find Successor' request from " + fTask.getIssuerHostName() + " for id " + fTask.getRequestId()); // is my successor the successor? if (isInInterval(fTask.getRequestId(), this.id + 1, fingers[0])) { @@ -150,7 +150,7 @@ public class Node extends Process { setPredecessor(-1); } - // Makes the current node join the ring, knowing the id of a node already in the ring + // Makes the current node join the ring, knowing the id of a node already in the ring private boolean join(int knownId) { Msg.info("Joining the ring with id " + this.id + " knowing node " + knownId); setPredecessor(-1); diff --git a/examples/deprecated/java/dht/kademlia/FindNodeTask.java b/examples/deprecated/java/dht/kademlia/FindNodeTask.java index 91a85397d6..ea49434b5b 100644 --- a/examples/deprecated/java/dht/kademlia/FindNodeTask.java +++ b/examples/deprecated/java/dht/kademlia/FindNodeTask.java @@ -15,7 +15,7 @@ public class FindNodeTask extends KademliaTask { private int destination; public FindNodeTask(int senderId, int destination) { - super(senderId); + super(senderId); this.destination = destination; } diff --git a/examples/deprecated/java/dht/kademlia/Node.java b/examples/deprecated/java/dht/kademlia/Node.java index 3948268b1d..adb0ff5edf 100644 --- a/examples/deprecated/java/dht/kademlia/Node.java +++ b/examples/deprecated/java/dht/kademlia/Node.java @@ -134,8 +134,8 @@ public class Node extends Process { } while (!answerGot && trials < Common.MAX_JOIN_TRIALS); /* Second step: Send a FIND_NODE in a node in each bucket */ int bucketId = table.findBucket(idKnown).getId(); - for (int i = 0; ((bucketId - i) > 0 || - (bucketId + i) <= Common.IDENTIFIER_SIZE) && + for (int i = 0; ((bucketId - i) > 0 || + (bucketId + i) <= Common.IDENTIFIER_SIZE) && i < Common.JOIN_BUCKETS_QUERIES; i++) { if (bucketId - i > 0) { int idInBucket = table.getIdInPrefix(this.id,bucketId - i); @@ -178,7 +178,7 @@ public class Node extends Process { if (!comm.test()) { waitFor(1); } else { - Task task = comm.getTask(); + Task task = comm.getTask(); if (task instanceof FindNodeAnswerTask) { FindNodeAnswerTask answerTask = (FindNodeAnswerTask)task; //Check if we received what we are looking for. @@ -189,7 +189,7 @@ public class Node extends Process { table.update(c.getId()); } answers++; - + nodesAdded = nodeList.merge(answerTask.getAnswer()); } else { /* If it's not our answer, we answer to the node that has queried us anyway */ @@ -211,7 +211,7 @@ public class Node extends Process { } } while (answers < queries && Msg.getClock() < timeout); destinationFound = nodeList.destinationFound(); - } while (!destinationFound && (nodesAdded > 0 || answers == 0) && Msg.getClock() < globalTimeout + } while (!destinationFound && (nodesAdded > 0 || answers == 0) && Msg.getClock() < globalTimeout && steps < Common.MAX_STEPS); if (destinationFound) { diff --git a/examples/deprecated/java/energy/consumption/Main.java b/examples/deprecated/java/energy/consumption/Main.java index 4d5605d0c1..c321c47183 100644 --- a/examples/deprecated/java/energy/consumption/Main.java +++ b/examples/deprecated/java/energy/consumption/Main.java @@ -14,9 +14,9 @@ public class Main { throw new IllegalAccessError("Utility class"); } - public static void main(String[] args) throws MsgException { - Msg.energyInit(); - Msg.init(args); + public static void main(String[] args) throws MsgException { + Msg.energyInit(); + Msg.init(args); if (args.length < 1) { Msg.info("Usage : Energy platform_file"); diff --git a/examples/deprecated/java/energy/pstate/PstateRunner.java b/examples/deprecated/java/energy/pstate/PstateRunner.java index 27352d3d9e..da3fe78bb6 100644 --- a/examples/deprecated/java/energy/pstate/PstateRunner.java +++ b/examples/deprecated/java/energy/pstate/PstateRunner.java @@ -18,7 +18,7 @@ public class PstateRunner extends Process { public class DVFS extends Process { public DVFS (Host host, String name) { - super(host, name); + super(host, name); } @Override @@ -77,8 +77,8 @@ public class PstateRunner extends Process { @Override public void main(String[] strings) throws HostNotFoundException, HostFailureException { - new DVFS (Host.getByName("MyHost1"), "dvfs_test").start(); - new DVFS (Host.getByName("MyHost2"), "dvfs_test").start(); + new DVFS (Host.getByName("MyHost1"), "dvfs_test").start(); + new DVFS (Host.getByName("MyHost2"), "dvfs_test").start(); } } diff --git a/examples/deprecated/java/energy/vm/EnergyVMRunner.java b/examples/deprecated/java/energy/vm/EnergyVMRunner.java index 5debbca6c3..a7dfd9008e 100644 --- a/examples/deprecated/java/energy/vm/EnergyVMRunner.java +++ b/examples/deprecated/java/energy/vm/EnergyVMRunner.java @@ -19,7 +19,7 @@ public class EnergyVMRunner extends Process { public class DummyProcess extends Process { public DummyProcess (Host host, String name) { - super(host, name); + super(host, name); } @Override @@ -30,8 +30,8 @@ public class EnergyVMRunner extends Process { } catch (HostFailureException | TaskCancelledException e) { Msg.error(e.getMessage()); e.printStackTrace(); - } - Msg.info("This worker is done."); + } + Msg.info("This worker is done."); } } @@ -54,8 +54,8 @@ public class EnergyVMRunner extends Process { vmHost2.start(); Msg.info("Create two tasks on Host1: one inside a VM, the other directly on the host"); - new DummyProcess (vmHost1, "p11").start(); - new DummyProcess (vmHost1, "p12").start(); + new DummyProcess (vmHost1, "p11").start(); + new DummyProcess (vmHost1, "p12").start(); Msg.info("Create two tasks on Host2: both directly on the host"); new DummyProcess (vmHost2, "p21").start(); @@ -66,9 +66,9 @@ public class EnergyVMRunner extends Process { new DummyProcess (host3, "p312").start(); Msg.info("Wait 5 seconds. The tasks are still running (they run for 3 seconds, but 2 tasks are co-located, " - + "so they run for 6 seconds)"); + + "so they run for 6 seconds)"); waitFor(5); - Msg.info("Wait another 5 seconds. The tasks stop at some point in between"); + Msg.info("Wait another 5 seconds. The tasks stop at some point in between"); waitFor(5); vmHost1.destroy(); diff --git a/examples/deprecated/java/hostload/Main.java b/examples/deprecated/java/hostload/Main.java index 59dc339ca2..4cc55fe662 100644 --- a/examples/deprecated/java/hostload/Main.java +++ b/examples/deprecated/java/hostload/Main.java @@ -15,7 +15,7 @@ public class Main { public static void main(String[] args) { Msg.loadInit(); - Msg.init(args); + Msg.init(args); if (args.length < 1) { Msg.info("Usage : Load platform_file"); diff --git a/examples/deprecated/java/task/priority/Main.java b/examples/deprecated/java/task/priority/Main.java index 62f71a248b..eae862ce5e 100644 --- a/examples/deprecated/java/task/priority/Main.java +++ b/examples/deprecated/java/task/priority/Main.java @@ -7,7 +7,7 @@ package task.priority; import org.simgrid.msg.Msg; -/* Demonstrates the use of Task.setPriority to change the computation priority of a task */ +/* Demonstrates the use of Task.setPriority to change the computation priority of a task */ public class Main { private Main() { throw new IllegalAccessError("Utility class"); diff --git a/examples/deprecated/java/task/priority/Test.java b/examples/deprecated/java/task/priority/Test.java index 633005f34a..45485dfe52 100644 --- a/examples/deprecated/java/task/priority/Test.java +++ b/examples/deprecated/java/task/priority/Test.java @@ -16,7 +16,7 @@ public class Test extends Process { super(host,name,args); } - public void main(String[] args) throws MsgException { + public void main(String[] args) throws MsgException { double computationAmount = Double.parseDouble(args[0]); double priority = Double.parseDouble(args[1]); diff --git a/examples/deprecated/java/trace/pingpong/Receiver.java b/examples/deprecated/java/trace/pingpong/Receiver.java index 04fee6d6f2..aa2ae1aca8 100644 --- a/examples/deprecated/java/trace/pingpong/Receiver.java +++ b/examples/deprecated/java/trace/pingpong/Receiver.java @@ -25,7 +25,7 @@ public class Receiver extends Process { Msg.info("hello!"); Trace.hostPushState (getHost().getName(), PM_STATE, "waitingPing"); - /* Wait for the ping */ + /* Wait for the ping */ Msg.info("try to get a task"); PingPongTask ping = (PingPongTask)Task.receive(getHost().getName()); diff --git a/examples/deprecated/java/trace/pingpong/Sender.java b/examples/deprecated/java/trace/pingpong/Sender.java index 2f538fb074..19e03ad66f 100644 --- a/examples/deprecated/java/trace/pingpong/Sender.java +++ b/examples/deprecated/java/trace/pingpong/Sender.java @@ -23,12 +23,12 @@ public class Sender extends Process { } public void main(String[] args) throws MsgException { - Msg.info("hello !"); + Msg.info("hello !"); Trace.hostPushState (getHost().getName(), PM_STATE, "sendingPing"); int hostCount = args.length; Msg.info("host count: " + hostCount); - String[] mailboxes = new String[hostCount]; + String[] mailboxes = new String[hostCount]; double time; double computeDuration = 0; PingPongTask ping; @@ -37,8 +37,8 @@ public class Sender extends Process { mailboxes[pos] = Host.getByName(args[pos]).getName(); } - for (int pos = 0; pos < hostCount; pos++) { - time = Msg.getClock(); + for (int pos = 0; pos < hostCount; pos++) { + time = Msg.getClock(); Msg.info("sender time: " + time); ping = new PingPongTask("no name",computeDuration,COMM_SIZE_LAT); ping.setTime(time); @@ -59,11 +59,11 @@ public class Sender extends Process { Msg.info(" --- bw "+ COMM_SIZE_BW/communicationTime + " ----"); - /* Pop the last state (going back to sending ping) */ + /* Pop the last state (going back to sending ping) */ Trace.hostPopState (getHost().getName(), PM_STATE); } - /* Pop the sendingPong state */ + /* Pop the sendingPong state */ Trace.hostPopState (getHost().getName(), PM_STATE); Msg.info("goodbye!"); } diff --git a/examples/deprecated/msg/mc/CMakeLists.txt b/examples/deprecated/msg/mc/CMakeLists.txt index 7702525f5a..35da57442d 100644 --- a/examples/deprecated/msg/mc/CMakeLists.txt +++ b/examples/deprecated/msg/mc/CMakeLists.txt @@ -17,7 +17,7 @@ set(bin_files ${bin_files} ${CMAKE_CURRENT_SOURCE_DIR}/promela_bugged2_li #if(SIMGRID_HAVE_MC) # IF(HAVE_UCONTEXT_CONTEXTS AND SIMGRID_PROCESSOR_x86_64) # liveness model-checking works only on 64bits (for now ...) # ADD_TESH(mc-bugged2-liveness-ucontext --setenv bindir=${CMAKE_CURRENT_BINARY_DIR} -# --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms +# --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms # --cd ${CMAKE_HOME_DIRECTORY}/examples/deprecated/msg/mc # bugged2-liveness.tesh) # ENDIF() diff --git a/examples/platforms/optorsim/transform_optorsim_platform.pl b/examples/platforms/optorsim/transform_optorsim_platform.pl index 94cd4a5da1..8dbd51c5cd 100644 --- a/examples/platforms/optorsim/transform_optorsim_platform.pl +++ b/examples/platforms/optorsim/transform_optorsim_platform.pl @@ -80,23 +80,23 @@ while(defined($line=)){ push @hosts, " radical=\"1-$nb_host\" power=\"1000000000\" bw=\"125000000\" lat=\"5E-5\"\n"; push @hosts, " router_id=\"cluster$src-router\"/>\n"; } - } + } my $table = $4; @tokens = split(/ /,$table); foreach $token (@tokens) { if($src >= $dst){ if($token != "0") #if there is a link between src and dst - { - #Create a link - if($1 == "0"){ + { + #Create a link + if($1 == "0"){ push @links_router, " \n"; } else{ push @links, " \n"; } - + #Create the route between router and router - if($is_router[$src] && $is_router[$dst]) + if($is_router[$src] && $is_router[$dst]) { if(@list_of_name){ push @routes_router, " "; @@ -107,9 +107,9 @@ while(defined($line=)){ push @routes_router, " "; push @routes_router, " \n"; } - + #Create the route between cluster and cluster - elsif(!$is_router[$src] && !$is_router[$dst]) + elsif(!$is_router[$src] && !$is_router[$dst]) { if(@list_of_name){ push @routes_cluster, " )){ } push @routes_cluster, " \n"; push @routes_cluster, " \n"; - } + } else { push @routes, " )){ {push @routes, "src=\"AS_intern\" gw_src=\"$list_of_name[$src]\" ";} else #cluster {push @routes, "src=\"$list_of_name[$src]\" gw_src=\"$list_of_name[$src]-router\" ";} - - + + if($is_router[$dst]) #router {push @routes, "dst=\"AS_intern\" gw_dst=\"$list_of_name[$dst]\">\n";} else #cluster @@ -142,8 +142,8 @@ while(defined($line=)){ {push @routes, "src=\"AS_intern\" gw_src=\"router$src\" ";} else #cluster {push @routes, "src=\"cluster$src\" gw_src=\"cluster$src-router\" ";} - - + + if($is_router[$dst]) #router {push @routes, "dst=\"AS_intern\" gw_dst=\"router$dst\">\n";} else #cluster @@ -151,10 +151,10 @@ while(defined($line=)){ } push @routes, " \n"; push @routes, " \n"; - + } - - $num_link++; + + $num_link++; } } $dst++; @@ -174,7 +174,7 @@ print @routers; print @links_router; print @routes_router; print " \n"; -print "\n"; +print "\n"; print @hosts; print @routes_cluster; print "\n"; diff --git a/examples/platforms/syscoord/generate_peer_platform.pl b/examples/platforms/syscoord/generate_peer_platform.pl index 58820811dd..41be2505c7 100755 --- a/examples/platforms/syscoord/generate_peer_platform.pl +++ b/examples/platforms/syscoord/generate_peer_platform.pl @@ -23,12 +23,12 @@ open INPUT, $ARGV[0] or die "Unable to open $ARGV[1]: $!\n"; while(defined($line=)) { next if ($line =~ /^#/); - # 278 7.2 -9.4 h 2.3 + # 278 7.2 -9.4 h 2.3 if($line =~ /^([^ ]*) ([^ ]*) ([^ ]*) h ([^ ]*) *$/) { print "\t\t\n"; next; } die "Parse error: $line\n"; -} +} print "\t\n"; print "\n"; diff --git a/examples/python/network-nonlinear/network-nonlinear.py b/examples/python/network-nonlinear/network-nonlinear.py index 69f39eb4fc..5ff974857a 100644 --- a/examples/python/network-nonlinear/network-nonlinear.py +++ b/examples/python/network-nonlinear/network-nonlinear.py @@ -17,7 +17,7 @@ class Sender: def __init__(self, msg_count: int, msg_size=int(1e6)): self.msg_count = msg_count self.msg_size = msg_size - + # Actors that are created as object will execute their __call__ method. # So, the following constitutes the main function of the Sender actor. def __call__(self): @@ -57,7 +57,7 @@ class Receiver: comm, data = mbox.get_async() pending_comms.append(comm) pending_msgs.append(data) - + while len(pending_comms) > 0: index = Comm.wait_any(pending_comms) msg = pending_msgs[index].get() @@ -88,7 +88,7 @@ def load_platform(): ________ __________ | Sender |===============| Receiver | |________| Link1 |__________| - + """ zone = NetZone.create_full_zone("Zone1") sender = zone.create_host("sender", 1).seal() diff --git a/examples/smpi/gemm/gemm.c b/examples/smpi/gemm/gemm.c index 3e1580ca72..3daf63b598 100644 --- a/examples/smpi/gemm/gemm.c +++ b/examples/smpi/gemm/gemm.c @@ -51,7 +51,7 @@ int main(int argc, char* argv[]) MPI_Init(&argc, &argv); MPI_Comm_size(MPI_COMM_WORLD, &nproc); MPI_Comm_rank(MPI_COMM_WORLD, &rank); - + if(argc<2){ if (rank == 0) printf("Usage : gemm size \"native/sampling\"\n"); @@ -73,7 +73,6 @@ int main(int argc, char* argv[]) float *b = (float*)malloc(sizeof(float)*size*size); float *c = (float*)malloc(sizeof(float)*size*size); - MPI_Barrier(MPI_COMM_WORLD); start = MPI_Wtime(); @@ -130,7 +129,7 @@ int main(int argc, char* argv[]) multiply_sampled(a, b, c, (size/nproc)*nproc, size-1, size); } } - + MPI_Barrier(MPI_COMM_WORLD); end = MPI_Wtime(); @@ -151,7 +150,6 @@ int main(int argc, char* argv[]) sec_per_matrix_mul, flops_per_matrix_mul); } - return 0; } diff --git a/examples/smpi/replay_multiple/generate_multiple_deployment.sh b/examples/smpi/replay_multiple/generate_multiple_deployment.sh index 18ff4104e3..1159b9ccbd 100755 --- a/examples/smpi/replay_multiple/generate_multiple_deployment.sh +++ b/examples/smpi/replay_multiple/generate_multiple_deployment.sh @@ -65,7 +65,7 @@ while [ $# -gt 0 ]; do ;; *) PROC_ARGS="${PROC_ARGS:+$PROC_ARGS }$1" - shift + shift ;; esac done @@ -135,13 +135,13 @@ if [ -n "${DESCRIPTIONFILE}" ] && [ -f "${DESCRIPTIONFILE}" ]; then instance=$(echo "$line"|cut -d' ' -f1) hosttrace=$(tr '\n\r' ' ' < $(echo "$line"|cut -d' ' -f2)) NUMPROCSMINE=$(wc -l < $(echo "$line"|cut -d' ' -f2)) - + if [ $NUMPROCSMINE != $(echo "$line"|cut -d' ' -f3) ]; then echo "declared num of processes for instance $instance : $(echo "$line"|cut -d' ' -f3) is not the same as the one in the replay files : $NUMPROCSMINE. Please check consistency of these information" exit 1 fi - + sleeptime=$(echo "$line"|cut -d' ' -f4) HAVE_SEQ=$(which seq 2>/dev/null) @@ -179,7 +179,7 @@ if [ -n "${DESCRIPTIONFILE}" ] && [ -f "${DESCRIPTIONFILE}" ]; then echo " " echo " " echo " " - + echo " " echo " " } >> "${APPLICATIONTMP}" diff --git a/include/simgrid/config.h.in b/include/simgrid/config.h.in index 5170028ff0..3d4aa549a8 100644 --- a/include/simgrid/config.h.in +++ b/include/simgrid/config.h.in @@ -21,5 +21,5 @@ #cmakedefine01 SIMGRID_HAVE_MC /* Was the ns-3 support compiled in? */ #cmakedefine01 SIMGRID_HAVE_NS3 -#cmakedefine NS3_MINOR_VERSION @NS3_MINOR_VERSION@ +#cmakedefine NS3_MINOR_VERSION @NS3_MINOR_VERSION@ #endif /* SIMGRID_PUBLIC_CONFIG_H */ diff --git a/include/smpi/mpif.h.in b/include/smpi/mpif.h.in index 40860dbf26..36f495a4e7 100644 --- a/include/smpi/mpif.h.in +++ b/include/smpi/mpif.h.in @@ -242,7 +242,7 @@ integer MPI_LB, MPI_UB parameter(MPI_LB=44) parameter(MPI_UB=45) - + INTEGER MPI_ADDRESS_KIND, MPI_OFFSET_KIND PARAMETER (MPI_ADDRESS_KIND=@CMAKE_SIZEOF_VOID_P@) PARAMETER (MPI_OFFSET_KIND=@CMAKE_SIZEOF_VOID_P@) diff --git a/include/smpi/smpi.h b/include/smpi/smpi.h index e5209d4131..fe6a72caeb 100644 --- a/include/smpi/smpi.h +++ b/include/smpi/smpi.h @@ -1048,8 +1048,9 @@ MPI_CALL(XBT_PUBLIC int, MPI_Dist_graph_create, (MPI_Comm comm_old, int n, const const int* weights, MPI_Info info, int reorder, MPI_Comm* comm_dist_graph)); MPI_CALL(XBT_PUBLIC int, MPI_Dist_graph_create_adjacent, (MPI_Comm comm_old, int indegree, const int* sources, const int* sourceweights, int outdegree, const int* destinations, const int* destweights, MPI_Info info, int reorder, MPI_Comm* comm_dist_graph)); -MPI_CALL(XBT_PUBLIC int, MPI_Dist_graph_neighbors, (MPI_Comm comm, int maxindegree, int* sources, int* sourceweights, - int maxoutdegree, int* destinations, int* destweights)); +MPI_CALL(XBT_PUBLIC int, MPI_Dist_graph_neighbors, + (MPI_Comm comm, int maxindegree, int* sources, int* sourceweights, int maxoutdegree, int* destinations, + int* destweights)); MPI_CALL(XBT_PUBLIC int, MPI_Dist_graph_neighbors_count, (MPI_Comm comm, int *indegree, int *outdegree, int *weighted)); MPI_CALL(XBT_PUBLIC int, MPI_Win_test, (MPI_Win win, int* flag)); @@ -1254,4 +1255,4 @@ XBT_PUBLIC void smpi_comm_copy_buffer_callback(simgrid::kernel::activity::CommIm size_t buff_size); #endif -#endif +#endif diff --git a/sonar-project.properties b/sonar-project.properties index ac7ed97360..895666e897 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -1,4 +1,4 @@ -# This file is used to scan the project for issues automatically +# This file is used to scan the project for issues automatically # Browse the result here: https://sonarcloud.io/organizations/simgrid/projects?sort=-size sonar.organization=simgrid @@ -117,9 +117,9 @@ sonar.issue.ignore.multicriteria.c10c.resourceKey=teshsuite/simdag/flatifier/*.c # Declarations should be placed in a namespace # But examples are intended to remain small and simple -sonar.issue.ignore.multicriteria.cex1a.ruleKey=cpp:GlobalNamespaceMembers +sonar.issue.ignore.multicriteria.cex1a.ruleKey=cpp:GlobalNamespaceMembers sonar.issue.ignore.multicriteria.cex1a.resourceKey=examples/**/*.cpp -sonar.issue.ignore.multicriteria.cex1b.ruleKey=cpp:GlobalNamespaceMembers +sonar.issue.ignore.multicriteria.cex1b.ruleKey=cpp:GlobalNamespaceMembers sonar.issue.ignore.multicriteria.cex1b.resourceKey=examples/**/*.hpp # Functions which do not return should be declared as "noreturn" diff --git a/src/bindings/java/org/simgrid/NativeLib.java b/src/bindings/java/org/simgrid/NativeLib.java index 7bb2b10e33..eb938c019e 100644 --- a/src/bindings/java/org/simgrid/NativeLib.java +++ b/src/bindings/java/org/simgrid/NativeLib.java @@ -36,7 +36,7 @@ public final class NativeLib { public static void main(String[] args) { System.out.println("This jarfile searches the native code under: " +getPath()); } - + /** Main function loading all the native classes that we need */ public static void nativeInit() { if (isNativeInited) @@ -60,13 +60,13 @@ public final class NativeLib { } catch (UnsatisfiedLinkError|SecurityException|IOException e) { cause = e; } - + /* If not found, try to see if we can find a version on disk */ try { System.loadLibrary(name); return; } catch (UnsatisfiedLinkError systemException) { /* don't care */ } - + System.err.println("\nCannot load the bindings to the "+name+" library in path "+getPath()+" and no usable SimGrid installation found on disk."); if (cause != null) { if (cause.getMessage().contains("libcgraph.so")) @@ -87,7 +87,7 @@ public final class NativeLib { /** Try to extract the library from the jarfile before loading it */ private static boolean loadLibAsStream (String name) throws IOException, UnsatisfiedLinkError { String path = NativeLib.getPath(); - + // We must write the lib onto the disk before loading it -- stupid operating systems if (tempDir == null) { final String tempPrefix = "simgrid-java-"; @@ -111,14 +111,14 @@ public final class NativeLib { // don't leak the files on disk, but remove it on JVM shutdown Runtime.getRuntime().addShutdownHook(new Thread(new FileCleaner(tempDir.toFile()))); } - + /* For each possible filename of the given library on all possible OSes, try it */ for (String filename : new String[] { name, "lib"+name+".so", /* linux */ name+".dll", "lib"+name+".dll", /* windows (pure and mingw) */ "lib"+name+".dylib" /* macOS */}) { - + File fileOut = new File(tempDir.toFile(), filename); try ( // Try-with-resources. These stream will be autoclosed when needed. InputStream in = NativeLib.class.getClassLoader().getResourceAsStream(path+filename); @@ -135,7 +135,7 @@ public final class NativeLib { } } } - + /* No suitable name found */ return false; } @@ -162,7 +162,7 @@ public final class NativeLib { return prefix + "/" + os + "/" + arch + "/"; } - + /** A hackish mechanism used to remove the file containing our library when the JVM shuts down */ private static class FileCleaner implements Runnable { private File dir; diff --git a/src/bindings/java/org/simgrid/msg/Comm.java b/src/bindings/java/org/simgrid/msg/Comm.java index c9f2adf498..dba6dfff66 100644 --- a/src/bindings/java/org/simgrid/msg/Comm.java +++ b/src/bindings/java/org/simgrid/msg/Comm.java @@ -76,5 +76,5 @@ public class Comm { static { org.simgrid.NativeLib.nativeInit(); nativeInit(); - } + } } diff --git a/src/bindings/java/org/simgrid/msg/Host.java b/src/bindings/java/org/simgrid/msg/Host.java index 9a9b0f47c6..4019e8182f 100644 --- a/src/bindings/java/org/simgrid/msg/Host.java +++ b/src/bindings/java/org/simgrid/msg/Host.java @@ -138,7 +138,7 @@ public class Host { public native double getConsumedEnergy(); /** Returns the current load of the host, as a ratio = achieved_flops / (core_current_speed * core_amount) - * + * * See simgrid::plugin::HostLoad::get_current_load() for the full documentation. */ public native double getCurrentLoad(); @@ -146,7 +146,7 @@ public class Host { public native double getComputedFlops(); /** Returns the average load of the host as a ratio since the beginning of the simulation*/ public native double getAvgLoad(); - + /** Returns the current pstate */ public native int getPstate(); /** Changes the current pstate */ @@ -164,5 +164,5 @@ public class Host { private static native void nativeInit(); static { nativeInit(); - } + } } diff --git a/src/bindings/java/org/simgrid/msg/Msg.java b/src/bindings/java/org/simgrid/msg/Msg.java index 38761e1ef0..bfeab8e70e 100644 --- a/src/bindings/java/org/simgrid/msg/Msg.java +++ b/src/bindings/java/org/simgrid/msg/Msg.java @@ -37,7 +37,7 @@ public final class Msg { * @param args The arguments of the command line of the simulation. */ public static final native void init(String[]args); - + /** Tell the kernel that you want to use the energy plugin */ public static final native void energyInit(); @@ -83,7 +83,7 @@ public final class Msg { /* Execute the simulation */ Msg.run(); } - + /* Class initializer, to initialize various JNI stuff */ static { org.simgrid.NativeLib.nativeInit(); diff --git a/src/bindings/java/org/simgrid/msg/Mutex.java b/src/bindings/java/org/simgrid/msg/Mutex.java index f3d9c4723f..5541086e98 100644 --- a/src/bindings/java/org/simgrid/msg/Mutex.java +++ b/src/bindings/java/org/simgrid/msg/Mutex.java @@ -33,7 +33,7 @@ public class Mutex { static { org.simgrid.NativeLib.nativeInit(); nativeInit(); - } + } } diff --git a/src/bindings/java/org/simgrid/msg/Process.java b/src/bindings/java/org/simgrid/msg/Process.java index c198186c6f..c5cdfc1b9a 100644 --- a/src/bindings/java/org/simgrid/msg/Process.java +++ b/src/bindings/java/org/simgrid/msg/Process.java @@ -54,7 +54,7 @@ public abstract class Process implements Runnable { private double killTime = -1; // Used from the C world private String name = null; - + private int pid = -1; private int ppid = -1; private Host host = null; @@ -108,14 +108,14 @@ public abstract class Process implements Runnable { * @param host Where to create the process. * @param name The name of the process. * @param argsParam The arguments of main method of the process. - */ + */ protected Process(Host host, String name, String[]argsParam) { if (host == null) throw new IllegalArgumentException("Cannot create a process on the null host"); if (name == null) throw new IllegalArgumentException("Process name cannot be null"); - + this.host = host; this.name = name; @@ -144,7 +144,7 @@ public abstract class Process implements Runnable { * @param host where to create the process. */ protected native void create(Host host); - + /** * This method kills all running process of the simulation. */ @@ -158,21 +158,21 @@ public abstract class Process implements Runnable { public static void kill(Process p) { p.kill(); } - + /** Suspends the process. See {@link #resume()} to resume it afterward */ public native void suspend(); /** Resume a process that was suspended by {@link #suspend()}. */ - public native void resume(); + public native void resume(); /** Tests if a process is suspended. * * @see suspend() * @see resume() */ public native boolean isSuspended(); - + /** Yield the current process. All other processes that are ready at the same timestamp will be executed first */ public static native void yield(); - + /** * Specify whether the process should restart when its host restarts after a failure * @@ -250,11 +250,11 @@ public abstract class Process implements Runnable { * @param host The host where to migrate the process. * */ - public native void migrate(Host host); + public native void migrate(Host host); /** * Makes the current process sleep until millis milliseconds have elapsed. * You should note that unlike "waitFor" which takes seconds (as usual in SimGrid), this method takes milliseconds (as usual for sleep() in Java). - * + * * @param millis the length of time to sleep in milliseconds. */ public static void sleep(long millis) throws HostFailureException { diff --git a/src/bindings/java/org/simgrid/msg/Task.java b/src/bindings/java/org/simgrid/msg/Task.java index 3565938b0c..c93c03c97b 100644 --- a/src/bindings/java/org/simgrid/msg/Task.java +++ b/src/bindings/java/org/simgrid/msg/Task.java @@ -52,9 +52,9 @@ public class Task { throw new IllegalArgumentException("Task flopsAmount (" + flopsAmount + ") cannot be negative"); if (bytesAmount<0) throw new IllegalArgumentException("Task bytesAmount (" + bytesAmount + ") cannot be negative"); - + create(name, flopsAmount, bytesAmount); - + this.name = name; this.messageSize = bytesAmount; } @@ -81,7 +81,7 @@ public class Task { throw new IllegalArgumentException("Host list is null"); if (name == null) throw new IllegalArgumentException("Parallel task name is null"); - + parallelCreate(name, hosts, flopsAmount, bytesAmount); this.name = name; } diff --git a/src/bindings/java/org/simgrid/msg/VM.java b/src/bindings/java/org/simgrid/msg/VM.java index 8fd68071ef..f977ffd35c 100644 --- a/src/bindings/java/org/simgrid/msg/VM.java +++ b/src/bindings/java/org/simgrid/msg/VM.java @@ -17,7 +17,7 @@ public class VM extends Host { * Create a `basic` VM : 1 core and 1GB of RAM. * @param host Host node * @param name name of the machine - */ + */ public VM(Host host, String name) { this(host,name, /*coreAmount*/1, 1024, 0, 0); } @@ -27,7 +27,7 @@ public class VM extends Host { * @param host Host node * @param name name of the machine * @param coreAmount the amount of cores of the VM - */ + */ public VM(Host host, String name, int coreAmount) { this(host,name, coreAmount, 1024, 0, 0); } @@ -39,7 +39,7 @@ public class VM extends Host { * @param ramSize size of the RAM that should be allocated (in MBytes) * @param migNetSpeed (network bandwidth allocated for migrations in MB/s, if you don't know put zero ;)) * @param dpIntensity (dirty page percentage according to migNetSpeed, [0-100], if you don't know put zero ;)) - */ + */ public VM(Host host, String name, int ramSize, int migNetSpeed, int dpIntensity){ this(host, name, /*coreAmount*/1, ramSize, migNetSpeed, dpIntensity); } @@ -77,7 +77,7 @@ public class VM extends Host { } private native void nativeFinalize(); - /** Returns whether the given VM is currently suspended */ + /** Returns whether the given VM is currently suspended */ public native boolean isCreated(); /** Returns whether the given VM is currently running */ @@ -86,14 +86,14 @@ public class VM extends Host { /** Returns whether the given VM is currently running */ public native boolean isMigrating(); - /** Returns whether the given VM is currently suspended */ + /** Returns whether the given VM is currently suspended */ public native boolean isSuspended(); /** Returns the amount of virtual CPUs provided */ public int getCoreAmount() { return coreAmount; } - + /** * Natively implemented method create the VM. * @param ramSize size of the RAM that should be allocated (in MB) @@ -123,7 +123,7 @@ public class VM extends Host { /** Change the host on which all processes are running * (pre-copy is implemented) - */ + */ public void migrate(Host destination) throws HostFailureException{ try { this.nativeMigration(destination); @@ -140,7 +140,7 @@ public class VM extends Host { * * No suspension cost occurs. If you want to simulate this too, you want to use a @ref File.write() before or * after, depending on the exact semantic of VM suspend to you. - */ + */ public native void suspend(); /** Immediately resumes the execution of all processes within the given VM diff --git a/src/mc/VisitedState.cpp b/src/mc/VisitedState.cpp index e482d83e13..4992e31d6f 100644 --- a/src/mc/VisitedState.cpp +++ b/src/mc/VisitedState.cpp @@ -21,7 +21,7 @@ namespace mc { /** @brief Save the current state */ VisitedState::VisitedState(unsigned long state_number) : num(state_number) -{ +{ this->heap_bytes_used = api::get().get_remote_heap_bytes(); this->actors_count = api::get().get_actors_size(); this->system_state = std::make_shared(state_number); diff --git a/src/mc/checker/LivenessChecker.cpp b/src/mc/checker/LivenessChecker.cpp index 6456c08f78..071bc6f3a7 100644 --- a/src/mc/checker/LivenessChecker.cpp +++ b/src/mc/checker/LivenessChecker.cpp @@ -60,7 +60,7 @@ Pair::Pair(unsigned long expanded_pairs) : num(expanded_pairs) std::shared_ptr> LivenessChecker::get_proposition_values() const { - auto values = api::get().automaton_propositional_symbol_evaluate(); + auto values = api::get().automaton_propositional_symbol_evaluate(); return std::make_shared>(std::move(values)); } @@ -392,7 +392,7 @@ void LivenessChecker::run() // (application_state, automaton_state) pair to the exploration stack: for (int i = api::get().get_dynar_length(current_pair->automaton_state->out) - 1; i >= 0; i--) { auto transition_succ_label = api::get().get_automaton_transition_label(current_pair->automaton_state->out, i); - auto transition_succ_dst = api::get().get_automaton_transition_dst(current_pair->automaton_state->out, i); + auto transition_succ_dst = api::get().get_automaton_transition_dst(current_pair->automaton_state->out, i); if (evaluate_label(transition_succ_label, *prop_values)) exploration_stack_.push_back(this->create_pair(current_pair.get(), transition_succ_dst, prop_values)); } diff --git a/src/mc/checker/SafetyChecker.cpp b/src/mc/checker/SafetyChecker.cpp index fb87859b12..bfb95171f7 100644 --- a/src/mc/checker/SafetyChecker.cpp +++ b/src/mc/checker/SafetyChecker.cpp @@ -150,7 +150,7 @@ void SafetyChecker::run() /* If this is a new state (or if we don't care about state-equality reduction) */ if (visited_state_ == nullptr) { /* Get an enabled process and insert it in the interleave set of the next state */ - auto actors = api::get().get_actors(); + auto actors = api::get().get_actors(); for (auto& remoteActor : actors) { auto actor = remoteActor.copy.get_buffer(); if (get_session().actor_is_enabled(actor->get_pid())) { diff --git a/src/mc/mc_config.cpp b/src/mc/mc_config.cpp index 78c86b6153..78276de728 100644 --- a/src/mc/mc_config.cpp +++ b/src/mc/mc_config.cpp @@ -73,9 +73,8 @@ simgrid::config::Flag _sg_mc_send_determinism{ }}; simgrid::config::Flag _sg_mc_unfolding_checker{ - "model-check/unfolding-checker", "Whether to enable the unfolding-based dynamic partial order reduction to MPI programs", - false, - [](bool) { + "model-check/unfolding-checker", + "Whether to enable the unfolding-based dynamic partial order reduction to MPI programs", false, [](bool) { _mc_cfg_cb_check("value to to enable/disable the unfolding-based dynamic partial order reduction to MPI programs"); }}; diff --git a/src/smpi/bindings/smpi_pmpi_coll.cpp b/src/smpi/bindings/smpi_pmpi_coll.cpp index 83054976bc..e7e348d99d 100644 --- a/src/smpi/bindings/smpi_pmpi_coll.cpp +++ b/src/smpi/bindings/smpi_pmpi_coll.cpp @@ -58,8 +58,7 @@ int PMPI_Bcast(void *buf, int count, MPI_Datatype datatype, int root, MPI_Comm c return PMPI_Ibcast(buf, count, datatype, root, comm, MPI_REQUEST_IGNORED); } -int PMPI_Ibcast(void *buf, int count, MPI_Datatype datatype, - int root, MPI_Comm comm, MPI_Request* request) +int PMPI_Ibcast(void* buf, int count, MPI_Datatype datatype, int root, MPI_Comm comm, MPI_Request* request) { SET_BUF1(buf) CHECK_COMM(5) diff --git a/src/smpi/bindings/smpi_pmpi_request.cpp b/src/smpi/bindings/smpi_pmpi_request.cpp index f903f068d3..79a5f4dbc6 100644 --- a/src/smpi/bindings/smpi_pmpi_request.cpp +++ b/src/smpi/bindings/smpi_pmpi_request.cpp @@ -30,7 +30,7 @@ static aid_t getPid(MPI_Comm comm, int id) CHECK_REQUEST(7)\ *request = MPI_REQUEST_NULL;\ CHECK_SEND_INPUTS - + #define CHECK_IRECV_INPUTS\ SET_BUF1(buf)\ CHECK_REQUEST(7)\ @@ -98,9 +98,7 @@ int PMPI_Start(MPI_Request * request) MPI_Request req = *request; aid_t my_proc_id = (req->comm() != MPI_COMM_NULL) ? simgrid::s4u::this_actor::get_pid() : -1; TRACE_smpi_comm_in(my_proc_id, __func__, - new simgrid::instr::Pt2PtTIData("Start", req->dst(), - req->size(), - req->tag(), + new simgrid::instr::Pt2PtTIData("Start", req->dst(), req->size(), req->tag(), simgrid::smpi::Datatype::encode(req->type()))); if (not TRACE_smpi_view_internals() && req->flags() & MPI_REQ_SEND) TRACE_smpi_send(my_proc_id, my_proc_id, getPid(req->comm(), req->dst()), req->tag(), req->size()); @@ -258,7 +256,7 @@ int PMPI_Recv(void *buf, int count, MPI_Datatype datatype, int src, int tag, MPI aid_t src_traced = (status != MPI_STATUS_IGNORE) ? getPid(comm, status->MPI_SOURCE) : getPid(comm, src); TRACE_smpi_recv(src_traced, my_proc_id, tag); } - + TRACE_smpi_comm_out(my_proc_id); } @@ -588,7 +586,7 @@ int PMPI_Wait(MPI_Request * request, MPI_Status * status) simgrid::smpi::Status::empty(status); - CHECK_NULL(1, MPI_ERR_ARG, request) + CHECK_NULL(1, MPI_ERR_ARG, request) if (*request == MPI_REQUEST_NULL) { retval = MPI_SUCCESS; } else { @@ -717,7 +715,7 @@ int PMPI_Test_cancelled(const MPI_Status* status, int* flag){ return MPI_ERR_ARG; } *flag=simgrid::smpi::Status::cancelled(status); - return MPI_SUCCESS; + return MPI_SUCCESS; } int PMPI_Status_set_cancelled(MPI_Status* status, int flag){ @@ -725,7 +723,7 @@ int PMPI_Status_set_cancelled(MPI_Status* status, int flag){ return MPI_ERR_ARG; } simgrid::smpi::Status::set_cancelled(status,flag); - return MPI_SUCCESS; + return MPI_SUCCESS; } int PMPI_Status_set_elements(MPI_Status* status, MPI_Datatype datatype, int count){ diff --git a/src/smpi/bindings/smpi_pmpi_type.cpp b/src/smpi/bindings/smpi_pmpi_type.cpp index 651eb67509..978ab0e64d 100644 --- a/src/smpi/bindings/smpi_pmpi_type.cpp +++ b/src/smpi/bindings/smpi_pmpi_type.cpp @@ -283,9 +283,8 @@ int PMPI_Type_set_attr (MPI_Datatype type, int type_keyval, void *attribute_val) return type->attr_put(type_keyval, attribute_val); } -int PMPI_Type_get_contents (MPI_Datatype type, int max_integers, int max_addresses, - int max_datatypes, int* array_of_integers, MPI_Aint* array_of_addresses, - MPI_Datatype *array_of_datatypes) +int PMPI_Type_get_contents(MPI_Datatype type, int max_integers, int max_addresses, int max_datatypes, + int* array_of_integers, MPI_Aint* array_of_addresses, MPI_Datatype* array_of_datatypes) { CHECK_MPI_NULL(1, MPI_DATATYPE_NULL, MPI_ERR_TYPE, type) CHECK_NEGATIVE(2, MPI_ERR_COUNT, max_integers) @@ -301,8 +300,7 @@ int PMPI_Type_get_contents (MPI_Datatype type, int max_integers, int max_address array_of_integers, array_of_addresses, array_of_datatypes); } -int PMPI_Type_get_envelope (MPI_Datatype type, int *num_integers, int *num_addresses, - int *num_datatypes, int *combiner) +int PMPI_Type_get_envelope(MPI_Datatype type, int* num_integers, int* num_addresses, int* num_datatypes, int* combiner) { CHECK_MPI_NULL(1, MPI_DATATYPE_NULL, MPI_ERR_TYPE, type) CHECK_NULL(2, MPI_ERR_ARG, num_integers) diff --git a/src/smpi/bindings/smpi_pmpi_win.cpp b/src/smpi/bindings/smpi_pmpi_win.cpp index 014cb17930..f2af8085b9 100644 --- a/src/smpi/bindings/smpi_pmpi_win.cpp +++ b/src/smpi/bindings/smpi_pmpi_win.cpp @@ -175,7 +175,7 @@ int PMPI_Get( void *origin_addr, int origin_count, MPI_Datatype origin_datatype, retval = win->get( origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count, target_datatype); TRACE_smpi_comm_out(my_proc_id); - + return retval; } diff --git a/src/smpi/colls/barrier/barrier-mpich-smp.cpp b/src/smpi/colls/barrier/barrier-mpich-smp.cpp index 028bf5dc1e..0fa7da837c 100644 --- a/src/smpi/colls/barrier/barrier-mpich-smp.cpp +++ b/src/smpi/colls/barrier/barrier-mpich-smp.cpp @@ -23,7 +23,7 @@ int barrier__mpich_smp(MPI_Comm comm) int mpi_errno_ret = MPI_SUCCESS; MPI_Comm shmem_comm = MPI_COMM_NULL, leader_comm = MPI_COMM_NULL; int local_rank = -1; - + if(comm->get_leaders_comm()==MPI_COMM_NULL){ comm->init_smp(); } diff --git a/src/smpi/colls/smpi_nbc_impl.cpp b/src/smpi/colls/smpi_nbc_impl.cpp index a6aa5277af..bf159345f5 100644 --- a/src/smpi/colls/smpi_nbc_impl.cpp +++ b/src/smpi/colls/smpi_nbc_impl.cpp @@ -79,8 +79,8 @@ int colls::iallgather(const void* sendbuf, int sendcount, MPI_Datatype sendtype, for (int other = 0; other < size; other++) { if(other != rank) { requests.push_back(Request::isend_init(sendbuf, sendcount, sendtype, other, system_tag, comm)); - requests.push_back(Request::irecv_init(static_cast(recvbuf) + other * recvcount * recvext, - recvcount, recvtype, other, system_tag, comm)); + requests.push_back(Request::irecv_init(static_cast(recvbuf) + other * recvcount * recvext, recvcount, + recvtype, other, system_tag, comm)); } } (*request)->start_nbc_requests(requests); diff --git a/src/smpi/include/private.hpp b/src/smpi/include/private.hpp index 022643fad0..d3c021e775 100644 --- a/src/smpi/include/private.hpp +++ b/src/smpi/include/private.hpp @@ -57,7 +57,7 @@ constexpr int SMPI_RMA_TAG = -6666; extern XBT_PUBLIC int mpi_in_place_; extern XBT_PUBLIC int mpi_bottom_; extern XBT_PUBLIC int mpi_status_ignore_; -extern XBT_PUBLIC int mpi_statuses_ignore_; +extern XBT_PUBLIC int mpi_statuses_ignore_; /* Convert between Fortran and C */ #define FORT_ADDR(addr, val, val2) \ (((void *)(addr) == (void*) &(val2)) \ diff --git a/src/smpi/include/smpi_actor.hpp b/src/smpi/include/smpi_actor.hpp index f4b1157d93..8380476a89 100644 --- a/src/smpi/include/smpi_actor.hpp +++ b/src/smpi/include/smpi_actor.hpp @@ -36,9 +36,9 @@ class ActorExt { #endif std::string tracing_category_ = ""; MPI_Info info_env_; - void* bsend_buffer_ = nullptr; - int bsend_buffer_size_ = 0; - + void* bsend_buffer_ = nullptr; + int bsend_buffer_size_ = 0; + #if HAVE_PAPI /** Contains hardware data as read by PAPI **/ int papi_event_set_; diff --git a/src/smpi/include/smpi_datatype.hpp b/src/smpi/include/smpi_datatype.hpp index 044cae6acb..cacdfbe89c 100644 --- a/src/smpi/include/smpi_datatype.hpp +++ b/src/smpi/include/smpi_datatype.hpp @@ -90,10 +90,8 @@ class Datatype_contents { std::vector integers_; std::vector addresses_; std::vector datatypes_; - Datatype_contents(int combiner, - int number_of_integers, const int* integers, - int number_of_addresses, const MPI_Aint* addresses, - int number_of_datatypes, const MPI_Datatype* datatypes); + Datatype_contents(int combiner, int number_of_integers, const int* integers, int number_of_addresses, + const MPI_Aint* addresses, int number_of_datatypes, const MPI_Datatype* datatypes); Datatype_contents(const Datatype_contents&) = delete; Datatype_contents& operator=(const Datatype_contents&) = delete; ~Datatype_contents(); diff --git a/src/smpi/internals/smpi_bench.cpp b/src/smpi/internals/smpi_bench.cpp index 35ee7a226e..f2a5e625a3 100644 --- a/src/smpi/internals/smpi_bench.cpp +++ b/src/smpi/internals/smpi_bench.cpp @@ -365,7 +365,7 @@ int smpi_sample_2(int global, const char *file,const char *tag, int iter_count) XBT_DEBUG("No benchmark (either no need, or just ran one): count (%d) >= iter (%d) (or <2) or stderr (%f) < thres (%f), or thresh is negative and ignored. " "Mean is %f, will be injected %d times", data.count, data.iters, data.relstderr, data.threshold, data.mean, iter_count); - + //we ended benchmarking, let's inject all the time, now, and fast forward out of the loop. smpi_process()->set_sampling(0); smpi_execute(data.mean*iter_count); diff --git a/src/smpi/internals/smpi_config.cpp b/src/smpi/internals/smpi_config.cpp index 0414512df8..f73840099f 100644 --- a/src/smpi/internals/smpi_config.cpp +++ b/src/smpi/internals/smpi_config.cpp @@ -47,19 +47,19 @@ simgrid::config::Flag _smpi_cfg_simulate_computation{ "smpi/simulate-computation", "Whether the computational part of the simulated application should be simulated.", true}; simgrid::config::Flag _smpi_cfg_shared_malloc_string{ - "smpi/shared-malloc", "Whether SMPI_SHARED_MALLOC is enabled. Disable it for debugging purposes.", "global", - [](const std::string& val) { - if ((val == "yes") || (val == "1") || (val == "on") || (val == "global")) { - _smpi_cfg_shared_malloc = SharedMallocType::GLOBAL; - } else if (val == "local") { - _smpi_cfg_shared_malloc = SharedMallocType::LOCAL; - } else if ((val == "no") || (val == "0") || (val == "off")) { - _smpi_cfg_shared_malloc = SharedMallocType::NONE; - } else { - xbt_die("Invalid value '%s' for option smpi/shared-malloc. Possible values: 'on' or 'global', 'local', 'off'", - val.c_str()); - } - } }; + "smpi/shared-malloc", "Whether SMPI_SHARED_MALLOC is enabled. Disable it for debugging purposes.", "global", + [](const std::string& val) { + if ((val == "yes") || (val == "1") || (val == "on") || (val == "global")) { + _smpi_cfg_shared_malloc = SharedMallocType::GLOBAL; + } else if (val == "local") { + _smpi_cfg_shared_malloc = SharedMallocType::LOCAL; + } else if ((val == "no") || (val == "0") || (val == "off")) { + _smpi_cfg_shared_malloc = SharedMallocType::NONE; + } else { + xbt_die("Invalid value '%s' for option smpi/shared-malloc. Possible values: 'on' or 'global', 'local', 'off'", + val.c_str()); + } + }}; simgrid::config::Flag _smpi_cfg_cpu_threshold{ "smpi/cpu-threshold", "Minimal computation time (in seconds) not discarded, or -1 for infinity.", 1e-6, @@ -71,9 +71,9 @@ simgrid::config::Flag _smpi_cfg_cpu_threshold{ simgrid::config::Flag _smpi_cfg_async_small_thresh{"smpi/async-small-thresh", "Maximal size of messages that are to be sent asynchronously, without waiting for the receiver", 0}; -simgrid::config::Flag _smpi_cfg_detached_send_thresh{"smpi/send-is-detached-thresh", - "Threshold of message size where MPI_Send stops behaving like MPI_Isend and becomes MPI_Ssend", - 65536}; +simgrid::config::Flag _smpi_cfg_detached_send_thresh{ + "smpi/send-is-detached-thresh", + "Threshold of message size where MPI_Send stops behaving like MPI_Isend and becomes MPI_Ssend", 65536}; simgrid::config::Flag _smpi_cfg_grow_injected_times{"smpi/grow-injected-times", "Whether we want to make the injected time in MPI_Iprobe and MPI_Test grow, to " "allow faster simulation. This can make simulation less precise, though.", @@ -88,9 +88,9 @@ simgrid::config::Flag _smpi_cfg_trace_call_location{"smpi/trace-call-loca "Should filename and linenumber of MPI calls be traced?", false}; simgrid::config::Flag _smpi_cfg_trace_call_use_absolute_path{"smpi/trace-call-use-absolute-path", "Should filenames for trace-call tracing be absolute or not?", false}; -simgrid::config::Flag _smpi_cfg_comp_adjustment_file{"smpi/comp-adjustment-file", - "A file containing speedups or slowdowns for some parts of the code.", - "", [](const std::string& filename){ +simgrid::config::Flag _smpi_cfg_comp_adjustment_file{ + "smpi/comp-adjustment-file", "A file containing speedups or slowdowns for some parts of the code.", "", + [](const std::string& filename) { if (not filename.empty()) { std::ifstream fstream(filename); xbt_assert(fstream.is_open(), "Could not open file %s. Does it exist?", filename.c_str()); @@ -253,16 +253,16 @@ void smpi_init_options_internal(bool called_by_smpi_main) } }); - simgrid::config::declare_flag("smpi/privatize-libs", - "Add libraries (; separated) to privatize (libgfortran for example)." - "You need to provide the full names of the files (libgfortran.so.4), or its full path", - ""); + simgrid::config::declare_flag( + "smpi/privatize-libs", + "Add libraries (; separated) to privatize (libgfortran for example)." + "You need to provide the full names of the files (libgfortran.so.4), or its full path", + ""); simgrid::config::declare_flag("smpi/shared-malloc-blocksize", - "Size of the bogus file which will be created for global shared allocations", + "Size of the bogus file which will be created for global shared allocations", 1UL << 20); simgrid::config::declare_flag("smpi/shared-malloc-hugepage", - "Path to a mounted hugetlbfs, to use huge pages with shared malloc.", - ""); + "Path to a mounted hugetlbfs, to use huge pages with shared malloc.", ""); simgrid::config::declare_flag( "smpi/os", "Small messages timings (MPI_Send minimum time for small messages)", "0:0:0:0:0"); diff --git a/src/smpi/internals/smpi_deployment.cpp b/src/smpi/internals/smpi_deployment.cpp index f1656e5cae..4fbc3a1a93 100644 --- a/src/smpi/internals/smpi_deployment.cpp +++ b/src/smpi/internals/smpi_deployment.cpp @@ -65,7 +65,6 @@ void smpi_deployment_register_process(const std::string& instance_id, int rank, { const Instance& instance = smpi_instances.at(instance_id); instance.comm_world_->group()->set_mapping(actor->get_pid(), rank); - } void smpi_deployment_startup_barrier(const std::string& instance_id) diff --git a/src/smpi/internals/smpi_utils.cpp b/src/smpi/internals/smpi_utils.cpp index 16fe5b5cff..d8ec68c68c 100644 --- a/src/smpi/internals/smpi_utils.cpp +++ b/src/smpi/internals/smpi_utils.cpp @@ -320,11 +320,14 @@ void set_current_buffer(int i, const char* name, const void* buf){ } } -void print_buffer_info(){ - if(not current_buffer1.name.empty()) - XBT_INFO("Buffer %s was allocated from %s line %d, with size %zu", current_buffer1.name.c_str(), current_buffer1.alloc.file.c_str(), current_buffer1.alloc.line, current_buffer1.alloc.size); - if(not current_buffer2.name.empty()) - XBT_INFO("Buffer %s was allocated from %s line %d, with size %zu", current_buffer2.name.c_str(), current_buffer2.alloc.file.c_str(), current_buffer2.alloc.line, current_buffer2.alloc.size); +void print_buffer_info() +{ + if (not current_buffer1.name.empty()) + XBT_INFO("Buffer %s was allocated from %s line %d, with size %zu", current_buffer1.name.c_str(), + current_buffer1.alloc.file.c_str(), current_buffer1.alloc.line, current_buffer1.alloc.size); + if (not current_buffer2.name.empty()) + XBT_INFO("Buffer %s was allocated from %s line %d, with size %zu", current_buffer2.name.c_str(), + current_buffer2.alloc.file.c_str(), current_buffer2.alloc.line, current_buffer2.alloc.size); } size_t get_buffer_size(const void* buf){ diff --git a/src/smpi/mpi/smpi_datatype_derived.cpp b/src/smpi/mpi/smpi_datatype_derived.cpp index 17c2f4c0e2..fa4a389ee6 100644 --- a/src/smpi/mpi/smpi_datatype_derived.cpp +++ b/src/smpi/mpi/smpi_datatype_derived.cpp @@ -245,7 +245,7 @@ Type_Indexed::Type_Indexed(int size, MPI_Aint lb, MPI_Aint ub, int flags, int co } int Type_Indexed::clone(MPI_Datatype* type) -{ +{ *type = new Type_Indexed(this->size(), this->lb(), this->ub(), this->flags(), this->block_count_, this->block_lengths_, (int*)(this->block_indices_), this->old_type_); (*type)->copy_attrs(this); return MPI_SUCCESS; diff --git a/src/smpi/mpi/smpi_file.cpp b/src/smpi/mpi/smpi_file.cpp index 82c5e2fe5f..91561ea5dd 100644 --- a/src/smpi/mpi/smpi_file.cpp +++ b/src/smpi/mpi/smpi_file.cpp @@ -167,7 +167,7 @@ namespace smpi{ /*Ordered and Shared Versions, with RMA-based locks : Based on the model described in :*/ /* @InProceedings{10.1007/11557265_15,*/ - /* author="Latham, Robert and Ross, Robert and Thakur, Rajeev and Toonen, Brian",*/ + /* author="Latham, Robert and Ross, Robert and Thakur, Rajeev and Toonen, Brian",*/ /* title="Implementing MPI-IO Shared File Pointers Without File System Support",*/ /* booktitle="Recent Advances in Parallel Virtual Machine and Message Passing Interface",*/ /* year="2005",*/ diff --git a/src/smpi/mpi/smpi_request.cpp b/src/smpi/mpi/smpi_request.cpp index 2ab04d595b..132d3a7a42 100644 --- a/src/smpi/mpi/smpi_request.cpp +++ b/src/smpi/mpi/smpi_request.cpp @@ -712,7 +712,7 @@ int Request::testany(int count, MPI_Request requests[], int *index, int* flag, M XBT_DEBUG("Exception in testany"); return 0; } - + if (i != -1) { // -1 is not MPI_UNDEFINED but a SIMIX return code. (nothing matches) *index = map[i]; if (requests[*index] != MPI_REQUEST_NULL && (requests[*index]->flags_ & MPI_REQ_GENERALIZED) && @@ -771,7 +771,7 @@ int Request::testall(int count, MPI_Request requests[], int* outflag, MPI_Status }else{ *outflag=0; } - if (ret != MPI_SUCCESS) + if (ret != MPI_SUCCESS) error = 1; }else{ Status::empty(pstat); @@ -780,9 +780,9 @@ int Request::testall(int count, MPI_Request requests[], int* outflag, MPI_Status status[i] = *pstat; } } - if(error==1) + if (error == 1) return MPI_ERR_IN_STATUS; - else + else return MPI_SUCCESS; } @@ -813,11 +813,11 @@ void Request::iprobe(int source, int tag, MPI_Comm comm, int* flag, MPI_Status* /*(seconds * flop/s -> total flops)*/ smpi_iprobe_sleep * speed * maxrate) ->set_name("iprobe") /* Not the entire CPU can be used when iprobing: This is important for - * the energy consumption caused by polling with iprobes. + * the energy consumption caused by polling with iprobes. * Note also that the number of flops that was * computed above contains a maxrate factor and is hence reduced (maxrate < 1) */ - ->set_bound(maxrate*speed) + ->set_bound(maxrate * speed) ->start() ->wait(); } @@ -1180,8 +1180,7 @@ int Request::waitsome(int incount, MPI_Request requests[], int *indices, MPI_Sta indices[count] = index; count++; for (int i = 0; i < incount; i++) { - if (i!=index && requests[i] != MPI_REQUEST_NULL - && not(requests[i]->flags_ & MPI_REQ_FINISHED)) { + if (i != index && requests[i] != MPI_REQUEST_NULL && not(requests[i]->flags_ & MPI_REQ_FINISHED)) { test(&requests[i], pstat,&flag); if (flag==1){ indices[count] = i; diff --git a/src/smpi/mpi/smpi_topo.cpp b/src/smpi/mpi/smpi_topo.cpp index 31864fb51e..0c698482c9 100644 --- a/src/smpi/mpi/smpi_topo.cpp +++ b/src/smpi/mpi/smpi_topo.cpp @@ -63,7 +63,7 @@ Topo_Cart::Topo_Cart(MPI_Comm comm_old, int ndims, const int dims[], const int p position_[i] = rank / nranks; rank = rank % nranks; } - + if(comm_cart != nullptr){ const Group* oldGroup = comm_old->group(); auto* newGroup = new Group(newSize); diff --git a/src/smpi/mpi/smpi_win.cpp b/src/smpi/mpi/smpi_win.cpp index 38f901aab6..57f58a509f 100644 --- a/src/smpi/mpi/smpi_win.cpp +++ b/src/smpi/mpi/smpi_win.cpp @@ -84,7 +84,7 @@ Win::~Win(){ colls::barrier(comm_); Comm::unref(comm_); - + if (rank_ == 0) delete bar_; diff --git a/src/smpi/smpirun.in b/src/smpi/smpirun.in index 6c62ff44f3..8b99fb69c1 100755 --- a/src/smpi/smpirun.in +++ b/src/smpi/smpirun.in @@ -47,7 +47,7 @@ Options: -np # use that amount of processes from the hostfile. # By default, all processes of the hostfile are used. -no-privatize # Disable the globals privatization, that is activated by default - -tmpdir # Directory used to store temporary files. Defaults to system's. + -tmpdir # Directory used to store temporary files. Defaults to system's. -trace-ti # activate time independent tracing (for replay, default in smpi_simgrid.txt) -trace # activate tracing (Paje, default in smpi_simgrid.trace) -trace-comment # put a comment on the top of the trace file diff --git a/src/xbt/automaton/parserPromela.lex b/src/xbt/automaton/parserPromela.lex index 74ac058544..c32becfcff 100644 --- a/src/xbt/automaton/parserPromela.lex +++ b/src/xbt/automaton/parserPromela.lex @@ -73,7 +73,7 @@ commentaire "/*"([^\*\/]*{nouv_ligne}*[^\*\/]*)*"*/" [a-zA-Z]{caractere}* { yylval.string=(char *)malloc(strlen(yytext)+1); sscanf(yytext,"%s",yylval.string); return (ID); } - + {numl} { } . { } diff --git a/teshsuite/msg/CMakeLists.txt b/teshsuite/msg/CMakeLists.txt index 7ceb0265dc..1c22032505 100644 --- a/teshsuite/msg/CMakeLists.txt +++ b/teshsuite/msg/CMakeLists.txt @@ -6,7 +6,7 @@ if(enable_msg) ADD_TESH_FACTORIES(tesh-msg-task_destroy_cancel "raw" --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/msg/task_destroy_cancel - --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/msg/task_destroy_cancel + --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/msg/task_destroy_cancel ${CMAKE_HOME_DIRECTORY}/teshsuite/msg/task_destroy_cancel/task_destroy_cancel.tesh) endif() diff --git a/teshsuite/python/platform-mix/platform-mix.py b/teshsuite/python/platform-mix/platform-mix.py index 2ca7f619ca..778ee1a4da 100644 --- a/teshsuite/python/platform-mix/platform-mix.py +++ b/teshsuite/python/platform-mix/platform-mix.py @@ -12,7 +12,7 @@ class Sender: """ def __init__(self, hosts): self.hosts = hosts - + # Actors that are created as object will execute their __call__ method. # So, the following constitutes the main function of the Sender actor. def __call__(self): diff --git a/teshsuite/s4u/CMakeLists.txt b/teshsuite/s4u/CMakeLists.txt index 1a4c45ef52..2468678296 100644 --- a/teshsuite/s4u/CMakeLists.txt +++ b/teshsuite/s4u/CMakeLists.txt @@ -2,7 +2,7 @@ foreach(x actor actor-autorestart actor-suspend activity-lifecycle comm-get-sender comm-pt2pt wait-all-for wait-any-for cloud-interrupt-migration cloud-two-execs - concurrent_rw + concurrent_rw host-on-off host-on-off-actors host-on-off-recv host-multicore-speed-file io-set-bw basic-link-test basic-parsing-test evaluate-get-route-time evaluate-parse-time is-router storage_client_server listen_async pid @@ -34,7 +34,7 @@ foreach(x actor actor-autorestart actor-suspend ADD_TESH_FACTORIES(tesh-s4u-${x} "*" --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/s4u/${x} --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite/s4u/${x} --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --cd ${CMAKE_BINARY_DIR}/teshsuite/s4u/${x} ${CMAKE_HOME_DIRECTORY}/teshsuite/s4u/${x}/${x}.tesh) endforeach() -foreach(x basic-link-test basic-parsing-test host-on-off host-on-off-actors host-on-off-recv host-multicore-speed-file is-router listen_async +foreach(x basic-link-test basic-parsing-test host-on-off host-on-off-actors host-on-off-recv host-multicore-speed-file is-router listen_async pid storage_client_server trace-integration seal-platform issue71) set(tesh_files ${tesh_files} ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x}.tesh) ADD_TESH(tesh-s4u-${x} --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite/s4u/${x} --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --cd ${CMAKE_BINARY_DIR}/teshsuite/s4u/${x} ${CMAKE_HOME_DIRECTORY}/teshsuite/s4u/${x}/${x}.tesh) diff --git a/teshsuite/s4u/ns3-simultaneous-send-rcv/ns3-simultaneous-send-rcv.cpp b/teshsuite/s4u/ns3-simultaneous-send-rcv/ns3-simultaneous-send-rcv.cpp index e90bdc4d0d..f84d8a7320 100644 --- a/teshsuite/s4u/ns3-simultaneous-send-rcv/ns3-simultaneous-send-rcv.cpp +++ b/teshsuite/s4u/ns3-simultaneous-send-rcv/ns3-simultaneous-send-rcv.cpp @@ -43,7 +43,7 @@ static void test_receive(){ int main(int argc, char *argv[]) { simgrid::s4u::Engine e(&argc, argv); - + e.load_platform(argv[1]); auto hosts = e.get_all_hosts(); diff --git a/teshsuite/smpi/CMakeLists.txt b/teshsuite/smpi/CMakeLists.txt index 1986807c08..3327d0bab9 100644 --- a/teshsuite/smpi/CMakeLists.txt +++ b/teshsuite/smpi/CMakeLists.txt @@ -8,14 +8,14 @@ if(enable_smpi) 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 coll-gather coll-reduce coll-reduce-scatter coll-scatter macro-sample pt2pt-dsend pt2pt-pingpong - type-hvector type-indexed type-struct type-vector bug-17132 gh-139 timers privatization + type-hvector type-indexed type-struct type-vector bug-17132 gh-139 timers privatization io-simple io-simple-at io-all io-all-at io-shared io-ordered topo-cart-sub replay-ti-colls) 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(NOT WIN32) foreach(x macro-shared auto-shared macro-partial-shared macro-partial-shared-communication ) add_executable (${x} EXCLUDE_FROM_ALL ${x}/${x}.c) @@ -162,7 +162,7 @@ if(enable_smpi) ADD_TESH(tesh-smpi-replay-ti-tracing-coll --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/replay-ti-colls --cd ${CMAKE_BINARY_DIR}/teshsuite/smpi/replay-ti-colls ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/replay-ti-colls/replay-ti-colls.tesh) ADD_TESH_FACTORIES(tesh-smpi-gh-139 "thread" --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/smpi/gh-139 --cd ${CMAKE_BINARY_DIR}/teshsuite/smpi/gh-139 ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/gh-139/gh-139.tesh) - + # Simple privatization tests if(HAVE_PRIVATIZATION) foreach(PRIVATIZATION dlopen mmap) diff --git a/teshsuite/smpi/fort_args/fort_args.f90 b/teshsuite/smpi/fort_args/fort_args.f90 index 5d13591caa..65965e66a6 100644 --- a/teshsuite/smpi/fort_args/fort_args.f90 +++ b/teshsuite/smpi/fort_args/fort_args.f90 @@ -13,7 +13,7 @@ program getarg_1 I = 0 call MPI_Init(ierr) CALL GETARG(I,ARGS) - ! This should return the invoking command. The actual value depends + ! This should return the invoking command. The actual value depends ! on the OS, but a blank string is wrong no matter what. ! ??? What about deep embedded systems? if (args.eq.'') STOP 2 diff --git a/teshsuite/smpi/io-all-at/io-all-at.c b/teshsuite/smpi/io-all-at/io-all-at.c index 1d8cade231..55fc1a8521 100644 --- a/teshsuite/smpi/io-all-at/io-all-at.c +++ b/teshsuite/smpi/io-all-at/io-all-at.c @@ -21,18 +21,18 @@ int main( int argc, char *argv[] ) MPI_File fh; MPI_Comm comm; MPI_Status status; - + MPI_Init( &argc, &argv ); - + comm = MPI_COMM_WORLD; MPI_File_open( comm, (char*)"/scratch/testfile", MPI_MODE_RDWR | MPI_MODE_CREATE | MPI_MODE_DELETE_ON_CLOSE, MPI_INFO_NULL, &fh ); MPI_Comm_size( comm, &size ); MPI_Comm_rank( comm, &rank ); buf = (int *)malloc( 10 * sizeof(int) ); buf[0] = rank; - + /* Write to file */ - MPI_File_seek( fh, sizeof(int)*rank, MPI_SEEK_SET ); + MPI_File_seek(fh, sizeof(int) * rank, MPI_SEEK_SET); MPI_File_write_all( fh, buf, 1, MPI_INT, &status ); MPI_Get_count( &status, MPI_INT, &count ); if (count != 1) { @@ -72,10 +72,10 @@ int main( int argc, char *argv[] ) // errs++; // fprintf( stderr, "%d: buf = %d\n", rank, buf[0] );fflush(stderr); // } - + free( buf ); MPI_File_close( &fh ); - + MPI_Finalize(); return errs; } diff --git a/teshsuite/smpi/io-all/io-all.c b/teshsuite/smpi/io-all/io-all.c index 884bfdd484..0085e1c080 100644 --- a/teshsuite/smpi/io-all/io-all.c +++ b/teshsuite/smpi/io-all/io-all.c @@ -21,18 +21,18 @@ int main( int argc, char *argv[] ) MPI_File fh; MPI_Comm comm; MPI_Status status; - + MPI_Init( &argc, &argv ); - + comm = MPI_COMM_WORLD; MPI_File_open( comm, (char*)"/scratch/testfile", MPI_MODE_RDWR | MPI_MODE_CREATE | MPI_MODE_DELETE_ON_CLOSE, MPI_INFO_NULL, &fh ); MPI_Comm_size( comm, &size ); MPI_Comm_rank( comm, &rank ); buf = (int *)malloc( 10 * sizeof(int) ); buf[0] = rank; - + /* Write to file */ - MPI_File_seek( fh, sizeof(int)*rank, MPI_SEEK_SET ); + MPI_File_seek(fh, sizeof(int) * rank, MPI_SEEK_SET); MPI_File_write_all( fh, buf, 1, MPI_INT, &status ); MPI_Get_count( &status, MPI_INT, &count ); if (count != 1) { @@ -40,7 +40,7 @@ int main( int argc, char *argv[] ) fprintf( stderr, "Wrong count (%d) on write\n", count );fflush(stderr); } /* Write to file, overlapping */ - MPI_File_seek( fh, sizeof(int)*rank, MPI_SEEK_SET ); + MPI_File_seek(fh, sizeof(int) * rank, MPI_SEEK_SET); MPI_File_write_all( fh, buf, 10, MPI_INT, &status ); MPI_Get_count( &status, MPI_INT, &count ); if (count != 10) { @@ -74,10 +74,10 @@ int main( int argc, char *argv[] ) // errs++; // fprintf( stderr, "%d: buf = %d\n", rank, buf[0] );fflush(stderr); // } - + free( buf ); MPI_File_close( &fh ); - + MPI_Finalize(); return errs; } diff --git a/teshsuite/smpi/io-ordered/io-ordered.c b/teshsuite/smpi/io-ordered/io-ordered.c index d7b6f763aa..d16fdb27d7 100644 --- a/teshsuite/smpi/io-ordered/io-ordered.c +++ b/teshsuite/smpi/io-ordered/io-ordered.c @@ -21,16 +21,16 @@ int main( int argc, char *argv[] ) MPI_File fh; MPI_Comm comm; MPI_Status status; - + MPI_Init( &argc, &argv ); - + comm = MPI_COMM_WORLD; MPI_File_open( comm, (char*)"/scratch/testfile", MPI_MODE_RDWR | MPI_MODE_CREATE | MPI_MODE_DELETE_ON_CLOSE, MPI_INFO_NULL, &fh ); MPI_Comm_size( comm, &size ); MPI_Comm_rank( comm, &rank ); buf = (int *)malloc( 10* sizeof(int) ); buf[0] = rank; - + /* Write to file */ MPI_File_write_ordered( fh, buf, 10, MPI_INT, &status ); MPI_Get_count( &status, MPI_INT, &count ); @@ -49,7 +49,7 @@ int main( int argc, char *argv[] ) free( buf ); MPI_File_close( &fh ); - + MPI_Finalize(); return errs; } diff --git a/teshsuite/smpi/io-shared/io-shared.c b/teshsuite/smpi/io-shared/io-shared.c index 84fe25d59b..4457c3d1a9 100644 --- a/teshsuite/smpi/io-shared/io-shared.c +++ b/teshsuite/smpi/io-shared/io-shared.c @@ -21,9 +21,9 @@ int main( int argc, char *argv[] ) MPI_File fh; MPI_Comm comm; MPI_Status status; - + MPI_Init( &argc, &argv ); - + comm = MPI_COMM_WORLD; MPI_File_open( comm, (char*)"/scratch/testfile", MPI_MODE_RDWR | MPI_MODE_CREATE | MPI_MODE_DELETE_ON_CLOSE, MPI_INFO_NULL, &fh ); MPI_Comm_size( comm, &size ); @@ -33,7 +33,7 @@ int main( int argc, char *argv[] ) MPI_File_seek_shared( fh, 0, MPI_SEEK_SET ); MPI_Barrier(comm); - + memset( &status, 0xff, sizeof(MPI_Status) ); MPI_File_write_shared( fh, buf, 1, MPI_INT, &status ); MPI_Get_count( &status, MPI_INT, &count ); @@ -65,7 +65,7 @@ int main( int argc, char *argv[] ) free( buf ); MPI_File_close( &fh ); - + MPI_Finalize(); return errs; } diff --git a/teshsuite/smpi/io-simple-at/io-simple-at.c b/teshsuite/smpi/io-simple-at/io-simple-at.c index a9b6fcdd41..28a0abf5e4 100644 --- a/teshsuite/smpi/io-simple-at/io-simple-at.c +++ b/teshsuite/smpi/io-simple-at/io-simple-at.c @@ -21,16 +21,16 @@ int main( int argc, char *argv[] ) MPI_File fh; MPI_Comm comm; MPI_Status status; - + MPI_Init( &argc, &argv ); - + comm = MPI_COMM_WORLD; MPI_File_open( comm, (char*)"/scratch/testfile", MPI_MODE_RDWR | MPI_MODE_CREATE | MPI_MODE_DELETE_ON_CLOSE, MPI_INFO_NULL, &fh ); MPI_Comm_size( comm, &size ); MPI_Comm_rank( comm, &rank ); buf = (int *)malloc( size * sizeof(int) ); buf[0] = rank; - + /* Write to file */ MPI_File_write_at( fh, sizeof(int)*rank, buf, 1, MPI_INT, &status ); MPI_Get_count( &status, MPI_INT, &count ); @@ -65,10 +65,10 @@ int main( int argc, char *argv[] ) // errs++; // fprintf( stderr, "%d: buf = %d\n", rank, buf[0] );fflush(stderr); // } - + free( buf ); MPI_File_close( &fh ); - + MPI_Finalize(); return errs; } diff --git a/teshsuite/smpi/io-simple/io-simple.c b/teshsuite/smpi/io-simple/io-simple.c index 1d0cc7a7ff..65f006d340 100644 --- a/teshsuite/smpi/io-simple/io-simple.c +++ b/teshsuite/smpi/io-simple/io-simple.c @@ -21,18 +21,18 @@ int main( int argc, char *argv[] ) MPI_File fh; MPI_Comm comm; MPI_Status status; - + MPI_Init( &argc, &argv ); - + comm = MPI_COMM_WORLD; MPI_File_open( comm, (char*)"/scratch/testfile", MPI_MODE_RDWR | MPI_MODE_CREATE | MPI_MODE_DELETE_ON_CLOSE, MPI_INFO_NULL, &fh ); MPI_Comm_size( comm, &size ); MPI_Comm_rank( comm, &rank ); buf = (int *)malloc( size * sizeof(int) ); buf[0] = rank; - + /* Write to file */ - MPI_File_seek( fh, sizeof(int)*rank, MPI_SEEK_SET ); + MPI_File_seek(fh, sizeof(int) * rank, MPI_SEEK_SET); MPI_File_write( fh, buf, 1, MPI_INT, &status ); MPI_Get_count( &status, MPI_INT, &count ); if (count != 1) { @@ -67,10 +67,10 @@ int main( int argc, char *argv[] ) // errs++; // fprintf( stderr, "%d: buf = %d\n", rank, buf[0] );fflush(stderr); // } - + free( buf ); MPI_File_close( &fh ); - + MPI_Finalize(); return errs; } diff --git a/teshsuite/smpi/macro-shared/macro-shared.c b/teshsuite/smpi/macro-shared/macro-shared.c index 3d66e9031d..ddcd2d6142 100644 --- a/teshsuite/smpi/macro-shared/macro-shared.c +++ b/teshsuite/smpi/macro-shared/macro-shared.c @@ -59,7 +59,7 @@ int main(int argc, char *argv[]) MPI_Send(buf, 1, MPI_AINT, 1, 100, MPI_COMM_WORLD); else if (rank ==1) MPI_Recv(buf, 1, MPI_AINT, 0, 100, MPI_COMM_WORLD, MPI_STATUS_IGNORE); - + //same thing with an MPI_IN_PLACE collective (no) if (rank == 0) MPI_Scatter(buf, 1, MPI_AINT, MPI_IN_PLACE, -1, MPI_DATATYPE_NULL, 0, MPI_COMM_WORLD); diff --git a/teshsuite/smpi/mpich3-test/attr/CMakeLists.txt b/teshsuite/smpi/mpich3-test/attr/CMakeLists.txt index 5d6930f37e..6e86b2ed1a 100644 --- a/teshsuite/smpi/mpich3-test/attr/CMakeLists.txt +++ b/teshsuite/smpi/mpich3-test/attr/CMakeLists.txt @@ -10,7 +10,7 @@ if(enable_smpi AND enable_smpi_MPICH3_testsuite) include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../include/") foreach(file attr2type attrdeleteget attrend2 attrend attrerr attrerrcomm attrerrtype attrorder attrordercomm attrordertype attrt - baseattr2 baseattrcomm fkeyval fkeyvalcomm fkeyvaltype keyval_double_free) #attric + baseattr2 baseattrcomm fkeyval fkeyvalcomm fkeyvaltype keyval_double_free) #attric add_executable(${file} EXCLUDE_FROM_ALL ${file}.c) add_dependencies(tests ${file}) target_link_libraries(${file} simgrid mtest_c) diff --git a/teshsuite/smpi/mpich3-test/attr/testlist b/teshsuite/smpi/mpich3-test/attr/testlist index 8d54a3e8c2..56fb8c5c9b 100644 --- a/teshsuite/smpi/mpich3-test/attr/testlist +++ b/teshsuite/smpi/mpich3-test/attr/testlist @@ -2,9 +2,9 @@ attrt 2 #needs MPI_Intercomm_create #attric 4 attrerr 1 -# The MPI-2 specification makes it clear that delect attributes are +# The MPI-2 specification makes it clear that delect attributes are # called on MPI_COMM_WORLD and MPI_COMM_SELF at the very beginning of -# MPI_Finalize. This is useful for tools that want to perform the MPI +# MPI_Finalize. This is useful for tools that want to perform the MPI # equivalent of an "at_exit" action. # SMPI does not keep a copy of comm_self at all times for memory reasons... #attrend 1 diff --git a/teshsuite/smpi/mpich3-test/checktests b/teshsuite/smpi/mpich3-test/checktests index 0c6ed522e6..630f2258cd 100755 --- a/teshsuite/smpi/mpich3-test/checktests +++ b/teshsuite/smpi/mpich3-test/checktests @@ -41,7 +41,7 @@ while () { $testStatus = $_; } close (SFD); - + if (-s $resultsFile) { open (RFD, "<$resultsFile"); $runLine = ; diff --git a/teshsuite/smpi/mpich3-test/coll/CMakeLists.txt b/teshsuite/smpi/mpich3-test/coll/CMakeLists.txt index c0223df01f..34cf096f22 100644 --- a/teshsuite/smpi/mpich3-test/coll/CMakeLists.txt +++ b/teshsuite/smpi/mpich3-test/coll/CMakeLists.txt @@ -8,12 +8,12 @@ if(enable_smpi AND enable_smpi_MPICH3_testsuite) include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi") include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../include/") - + foreach(test allgather2 allgather3 allgather_struct allgatherv2 allgatherv3 - allred2 allred3 allred4 allred5 allred6 allredmany alltoall1 + allred2 allred3 allred4 allred5 allred6 allredmany alltoall1 alltoallv0 alltoallv alltoallw1 alltoallw2 alltoallw_zeros bcasttest bcastzerotype coll2 coll3 coll4 coll5 coll6 coll7 coll8 - coll9 coll10 coll11 coll12 coll13 exscan exscan2 gather gather2 + coll9 coll10 coll11 coll12 coll13 exscan exscan2 gather gather2 gather_big ibarrier longuser nonblocking nonblocking2 nonblocking3 iallred # icallgather icallgatherv icallreduce # icalltoall icalltoallv icalltoallw icbarrier icbcast @@ -37,14 +37,14 @@ if(enable_smpi AND enable_smpi_MPICH3_testsuite) add_executable(${test} EXCLUDE_FROM_ALL bcast.c) add_dependencies(tests ${test}) target_link_libraries(${test} simgrid mtest_c) - endforeach() + endforeach() set_target_properties(bcast_min_datatypes PROPERTIES COMPILE_FLAGS "-DBCAST_MIN_DATATYPES_ONLY" LINK_FLAGS "-DBCAST_MIN_DATATYPES_ONLY") set_target_properties(bcast_comm_world PROPERTIES COMPILE_FLAGS "-DBCAST_COMM_WORLD_ONLY" LINK_FLAGS "-DBCAST_COMM_WORLD_ONLY") - + add_executable(reduce_mpich EXCLUDE_FROM_ALL reduce.c) add_dependencies(tests reduce_mpich) target_link_libraries(reduce_mpich simgrid mtest_c) - + # These tests take 5 to 15 seconds to run, so we don't want to run them several times. # But at the same time, we'd like to check if they work for all factories and all privatization algorithm # Thus the current matrix @@ -83,94 +83,94 @@ if(enable_smpi AND enable_smpi_MPICH3_testsuite) endif() set(examples_src ${examples_src} - ${CMAKE_CURRENT_SOURCE_DIR}/allgather2.c - ${CMAKE_CURRENT_SOURCE_DIR}/allgather_struct.c - ${CMAKE_CURRENT_SOURCE_DIR}/allgather3.c - ${CMAKE_CURRENT_SOURCE_DIR}/allgatherv2.c - ${CMAKE_CURRENT_SOURCE_DIR}/allgatherv3.c - ${CMAKE_CURRENT_SOURCE_DIR}/allgatherv4.c - ${CMAKE_CURRENT_SOURCE_DIR}/allred2.c - ${CMAKE_CURRENT_SOURCE_DIR}/allred3.c - ${CMAKE_CURRENT_SOURCE_DIR}/allred4.c - ${CMAKE_CURRENT_SOURCE_DIR}/allred5.c - ${CMAKE_CURRENT_SOURCE_DIR}/allred6.c - ${CMAKE_CURRENT_SOURCE_DIR}/allred.c - ${CMAKE_CURRENT_SOURCE_DIR}/allredmany.c - ${CMAKE_CURRENT_SOURCE_DIR}/alltoall1.c - ${CMAKE_CURRENT_SOURCE_DIR}/alltoallv0.c - ${CMAKE_CURRENT_SOURCE_DIR}/alltoallv.c - ${CMAKE_CURRENT_SOURCE_DIR}/alltoallw1.c - ${CMAKE_CURRENT_SOURCE_DIR}/alltoallw2.c - ${CMAKE_CURRENT_SOURCE_DIR}/alltoallw_zeros.c - ${CMAKE_CURRENT_SOURCE_DIR}/bcast.c - ${CMAKE_CURRENT_SOURCE_DIR}/bcasttest.c - ${CMAKE_CURRENT_SOURCE_DIR}/bcastzerotype.c - ${CMAKE_CURRENT_SOURCE_DIR}/coll10.c - ${CMAKE_CURRENT_SOURCE_DIR}/coll11.c - ${CMAKE_CURRENT_SOURCE_DIR}/coll12.c - ${CMAKE_CURRENT_SOURCE_DIR}/coll13.c - ${CMAKE_CURRENT_SOURCE_DIR}/coll2.c - ${CMAKE_CURRENT_SOURCE_DIR}/coll3.c - ${CMAKE_CURRENT_SOURCE_DIR}/coll4.c - ${CMAKE_CURRENT_SOURCE_DIR}/coll5.c - ${CMAKE_CURRENT_SOURCE_DIR}/coll6.c - ${CMAKE_CURRENT_SOURCE_DIR}/coll7.c - ${CMAKE_CURRENT_SOURCE_DIR}/coll8.c - ${CMAKE_CURRENT_SOURCE_DIR}/coll9.c - ${CMAKE_CURRENT_SOURCE_DIR}/exscan2.c - ${CMAKE_CURRENT_SOURCE_DIR}/exscan.c - ${CMAKE_CURRENT_SOURCE_DIR}/gather2.c - ${CMAKE_CURRENT_SOURCE_DIR}/gather_big.c - ${CMAKE_CURRENT_SOURCE_DIR}/gather.c - ${CMAKE_CURRENT_SOURCE_DIR}/iallred.c - ${CMAKE_CURRENT_SOURCE_DIR}/ibarrier.c - ${CMAKE_CURRENT_SOURCE_DIR}/icallgather.c - ${CMAKE_CURRENT_SOURCE_DIR}/icallgatherv.c - ${CMAKE_CURRENT_SOURCE_DIR}/icallreduce.c - ${CMAKE_CURRENT_SOURCE_DIR}/icalltoall.c - ${CMAKE_CURRENT_SOURCE_DIR}/icalltoallv.c - ${CMAKE_CURRENT_SOURCE_DIR}/icalltoallw.c - ${CMAKE_CURRENT_SOURCE_DIR}/icbarrier.c - ${CMAKE_CURRENT_SOURCE_DIR}/icbcast.c - ${CMAKE_CURRENT_SOURCE_DIR}/icgather.c - ${CMAKE_CURRENT_SOURCE_DIR}/icgatherv.c - ${CMAKE_CURRENT_SOURCE_DIR}/icreduce.c - ${CMAKE_CURRENT_SOURCE_DIR}/icscatter.c - ${CMAKE_CURRENT_SOURCE_DIR}/icscatterv.c - ${CMAKE_CURRENT_SOURCE_DIR}/longuser.c - ${CMAKE_CURRENT_SOURCE_DIR}/nonblocking2.c - ${CMAKE_CURRENT_SOURCE_DIR}/nonblocking3.c - ${CMAKE_CURRENT_SOURCE_DIR}/nonblocking.c - ${CMAKE_CURRENT_SOURCE_DIR}/opband.c - ${CMAKE_CURRENT_SOURCE_DIR}/opbor.c - ${CMAKE_CURRENT_SOURCE_DIR}/opbxor.c - ${CMAKE_CURRENT_SOURCE_DIR}/op_commutative.c - ${CMAKE_CURRENT_SOURCE_DIR}/opland.c - ${CMAKE_CURRENT_SOURCE_DIR}/oplor.c - ${CMAKE_CURRENT_SOURCE_DIR}/oplxor.c - ${CMAKE_CURRENT_SOURCE_DIR}/opmax.c - ${CMAKE_CURRENT_SOURCE_DIR}/opmaxloc.c - ${CMAKE_CURRENT_SOURCE_DIR}/opmin.c - ${CMAKE_CURRENT_SOURCE_DIR}/opminloc.c - ${CMAKE_CURRENT_SOURCE_DIR}/opprod.c - ${CMAKE_CURRENT_SOURCE_DIR}/opsum.c - ${CMAKE_CURRENT_SOURCE_DIR}/red3.c - ${CMAKE_CURRENT_SOURCE_DIR}/red4.c - ${CMAKE_CURRENT_SOURCE_DIR}/redscat2.c - ${CMAKE_CURRENT_SOURCE_DIR}/redscat3.c - ${CMAKE_CURRENT_SOURCE_DIR}/redscatbkinter.c - ${CMAKE_CURRENT_SOURCE_DIR}/redscatblk3.c - ${CMAKE_CURRENT_SOURCE_DIR}/red_scat_block2.c - ${CMAKE_CURRENT_SOURCE_DIR}/red_scat_block.c - ${CMAKE_CURRENT_SOURCE_DIR}/redscat.c - ${CMAKE_CURRENT_SOURCE_DIR}/redscatinter.c - ${CMAKE_CURRENT_SOURCE_DIR}/reduce.c - ${CMAKE_CURRENT_SOURCE_DIR}/reduce_local.c - ${CMAKE_CURRENT_SOURCE_DIR}/scantst.c - ${CMAKE_CURRENT_SOURCE_DIR}/scatter2.c - ${CMAKE_CURRENT_SOURCE_DIR}/scatter3.c - ${CMAKE_CURRENT_SOURCE_DIR}/scattern.c - ${CMAKE_CURRENT_SOURCE_DIR}/scatterv.c - ${CMAKE_CURRENT_SOURCE_DIR}/uoplong.c + ${CMAKE_CURRENT_SOURCE_DIR}/allgather2.c + ${CMAKE_CURRENT_SOURCE_DIR}/allgather_struct.c + ${CMAKE_CURRENT_SOURCE_DIR}/allgather3.c + ${CMAKE_CURRENT_SOURCE_DIR}/allgatherv2.c + ${CMAKE_CURRENT_SOURCE_DIR}/allgatherv3.c + ${CMAKE_CURRENT_SOURCE_DIR}/allgatherv4.c + ${CMAKE_CURRENT_SOURCE_DIR}/allred2.c + ${CMAKE_CURRENT_SOURCE_DIR}/allred3.c + ${CMAKE_CURRENT_SOURCE_DIR}/allred4.c + ${CMAKE_CURRENT_SOURCE_DIR}/allred5.c + ${CMAKE_CURRENT_SOURCE_DIR}/allred6.c + ${CMAKE_CURRENT_SOURCE_DIR}/allred.c + ${CMAKE_CURRENT_SOURCE_DIR}/allredmany.c + ${CMAKE_CURRENT_SOURCE_DIR}/alltoall1.c + ${CMAKE_CURRENT_SOURCE_DIR}/alltoallv0.c + ${CMAKE_CURRENT_SOURCE_DIR}/alltoallv.c + ${CMAKE_CURRENT_SOURCE_DIR}/alltoallw1.c + ${CMAKE_CURRENT_SOURCE_DIR}/alltoallw2.c + ${CMAKE_CURRENT_SOURCE_DIR}/alltoallw_zeros.c + ${CMAKE_CURRENT_SOURCE_DIR}/bcast.c + ${CMAKE_CURRENT_SOURCE_DIR}/bcasttest.c + ${CMAKE_CURRENT_SOURCE_DIR}/bcastzerotype.c + ${CMAKE_CURRENT_SOURCE_DIR}/coll10.c + ${CMAKE_CURRENT_SOURCE_DIR}/coll11.c + ${CMAKE_CURRENT_SOURCE_DIR}/coll12.c + ${CMAKE_CURRENT_SOURCE_DIR}/coll13.c + ${CMAKE_CURRENT_SOURCE_DIR}/coll2.c + ${CMAKE_CURRENT_SOURCE_DIR}/coll3.c + ${CMAKE_CURRENT_SOURCE_DIR}/coll4.c + ${CMAKE_CURRENT_SOURCE_DIR}/coll5.c + ${CMAKE_CURRENT_SOURCE_DIR}/coll6.c + ${CMAKE_CURRENT_SOURCE_DIR}/coll7.c + ${CMAKE_CURRENT_SOURCE_DIR}/coll8.c + ${CMAKE_CURRENT_SOURCE_DIR}/coll9.c + ${CMAKE_CURRENT_SOURCE_DIR}/exscan2.c + ${CMAKE_CURRENT_SOURCE_DIR}/exscan.c + ${CMAKE_CURRENT_SOURCE_DIR}/gather2.c + ${CMAKE_CURRENT_SOURCE_DIR}/gather_big.c + ${CMAKE_CURRENT_SOURCE_DIR}/gather.c + ${CMAKE_CURRENT_SOURCE_DIR}/iallred.c + ${CMAKE_CURRENT_SOURCE_DIR}/ibarrier.c + ${CMAKE_CURRENT_SOURCE_DIR}/icallgather.c + ${CMAKE_CURRENT_SOURCE_DIR}/icallgatherv.c + ${CMAKE_CURRENT_SOURCE_DIR}/icallreduce.c + ${CMAKE_CURRENT_SOURCE_DIR}/icalltoall.c + ${CMAKE_CURRENT_SOURCE_DIR}/icalltoallv.c + ${CMAKE_CURRENT_SOURCE_DIR}/icalltoallw.c + ${CMAKE_CURRENT_SOURCE_DIR}/icbarrier.c + ${CMAKE_CURRENT_SOURCE_DIR}/icbcast.c + ${CMAKE_CURRENT_SOURCE_DIR}/icgather.c + ${CMAKE_CURRENT_SOURCE_DIR}/icgatherv.c + ${CMAKE_CURRENT_SOURCE_DIR}/icreduce.c + ${CMAKE_CURRENT_SOURCE_DIR}/icscatter.c + ${CMAKE_CURRENT_SOURCE_DIR}/icscatterv.c + ${CMAKE_CURRENT_SOURCE_DIR}/longuser.c + ${CMAKE_CURRENT_SOURCE_DIR}/nonblocking2.c + ${CMAKE_CURRENT_SOURCE_DIR}/nonblocking3.c + ${CMAKE_CURRENT_SOURCE_DIR}/nonblocking.c + ${CMAKE_CURRENT_SOURCE_DIR}/opband.c + ${CMAKE_CURRENT_SOURCE_DIR}/opbor.c + ${CMAKE_CURRENT_SOURCE_DIR}/opbxor.c + ${CMAKE_CURRENT_SOURCE_DIR}/op_commutative.c + ${CMAKE_CURRENT_SOURCE_DIR}/opland.c + ${CMAKE_CURRENT_SOURCE_DIR}/oplor.c + ${CMAKE_CURRENT_SOURCE_DIR}/oplxor.c + ${CMAKE_CURRENT_SOURCE_DIR}/opmax.c + ${CMAKE_CURRENT_SOURCE_DIR}/opmaxloc.c + ${CMAKE_CURRENT_SOURCE_DIR}/opmin.c + ${CMAKE_CURRENT_SOURCE_DIR}/opminloc.c + ${CMAKE_CURRENT_SOURCE_DIR}/opprod.c + ${CMAKE_CURRENT_SOURCE_DIR}/opsum.c + ${CMAKE_CURRENT_SOURCE_DIR}/red3.c + ${CMAKE_CURRENT_SOURCE_DIR}/red4.c + ${CMAKE_CURRENT_SOURCE_DIR}/redscat2.c + ${CMAKE_CURRENT_SOURCE_DIR}/redscat3.c + ${CMAKE_CURRENT_SOURCE_DIR}/redscatbkinter.c + ${CMAKE_CURRENT_SOURCE_DIR}/redscatblk3.c + ${CMAKE_CURRENT_SOURCE_DIR}/red_scat_block2.c + ${CMAKE_CURRENT_SOURCE_DIR}/red_scat_block.c + ${CMAKE_CURRENT_SOURCE_DIR}/redscat.c + ${CMAKE_CURRENT_SOURCE_DIR}/redscatinter.c + ${CMAKE_CURRENT_SOURCE_DIR}/reduce.c + ${CMAKE_CURRENT_SOURCE_DIR}/reduce_local.c + ${CMAKE_CURRENT_SOURCE_DIR}/scantst.c + ${CMAKE_CURRENT_SOURCE_DIR}/scatter2.c + ${CMAKE_CURRENT_SOURCE_DIR}/scatter3.c + ${CMAKE_CURRENT_SOURCE_DIR}/scattern.c + ${CMAKE_CURRENT_SOURCE_DIR}/scatterv.c + ${CMAKE_CURRENT_SOURCE_DIR}/uoplong.c PARENT_SCOPE) set(txt_files ${txt_files} ${CMAKE_CURRENT_SOURCE_DIR}/testlist PARENT_SCOPE) diff --git a/teshsuite/smpi/mpich3-test/comm/CMakeLists.txt b/teshsuite/smpi/mpich3-test/comm/CMakeLists.txt index e075b3f288..8b8dcddcb1 100644 --- a/teshsuite/smpi/mpich3-test/comm/CMakeLists.txt +++ b/teshsuite/smpi/mpich3-test/comm/CMakeLists.txt @@ -9,10 +9,10 @@ if(enable_smpi AND enable_smpi_MPICH3_testsuite) include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi") include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../include/") - foreach(file cmfree cmsplit2 cmsplit cmsplit_type commcreate1 comm_create_group comm_group_half comm_group_rand - comm_info ctxalloc ctxsplit dup dup_with_info commname) + foreach(file cmfree cmsplit2 cmsplit cmsplit_type commcreate1 comm_create_group comm_group_half comm_group_rand + comm_info ctxalloc ctxsplit dup dup_with_info commname) # not compiled files - # comm_idup comm_idup_mul comm_idup_overlap dupic ic1 ic2 iccreate icgroup icm icsplit probe-intercomm + # comm_idup comm_idup_mul comm_idup_overlap dupic ic1 ic2 iccreate icgroup icm icsplit probe-intercomm add_executable(${file} EXCLUDE_FROM_ALL ${file}.c) add_dependencies(tests ${file}) target_link_libraries(${file} simgrid mtest_c) @@ -24,8 +24,8 @@ if (enable_smpi_MPICH3_testsuite AND HAVE_RAW_CONTEXTS) SET_TESTS_PROPERTIES(test-smpi-mpich3-comm-raw PROPERTIES PASS_REGULAR_EXPRESSION "tests passed!") endif() -foreach(file cmfree cmsplit2 cmsplit cmsplit_type commcreate1 comm_create_group comm_group_half comm_group_rand - comm_info commname ctxalloc ctxsplit dup dupic dup_with_info ic1 ic2 +foreach(file cmfree cmsplit2 cmsplit cmsplit_type commcreate1 comm_create_group comm_group_half comm_group_rand + comm_info commname ctxalloc ctxsplit dup dupic dup_with_info ic1 ic2 iccreate icgroup icm icsplit probe-intercomm comm_create_group_idup comm_idup_comm comm_idup_mul comm_idup comm_idup_iallreduce comm_idup_nb comm_idup_comm2 comm_idup_isend comm_idup_overlap ) set(examples_src ${examples_src} ${CMAKE_CURRENT_SOURCE_DIR}/${file}.c) diff --git a/teshsuite/smpi/mpich3-test/datatype/CMakeLists.txt b/teshsuite/smpi/mpich3-test/datatype/CMakeLists.txt index d929ce9a25..8dc81c246e 100644 --- a/teshsuite/smpi/mpich3-test/datatype/CMakeLists.txt +++ b/teshsuite/smpi/mpich3-test/datatype/CMakeLists.txt @@ -40,14 +40,14 @@ if (enable_smpi_MPICH3_testsuite AND HAVE_RAW_CONTEXTS) SET_TESTS_PROPERTIES(test-smpi-mpich3-datatype-raw PROPERTIES PASS_REGULAR_EXPRESSION "tests passed!") endif() -foreach(file blockindexed-misc blockindexed-zero-count contents contigstruct contig-zero-count cxx-types darray-cyclic +foreach(file blockindexed-misc blockindexed-zero-count contents contigstruct contig-zero-count cxx-types darray-cyclic darray-pack dataalign gaddress get-elements get-elements-pairtype getpartelm hindexed_block hindexed_block_contents hindexed-zeros hvecblklen indexed-misc large-count large_type large_type_sendrec lbub - localpack longdouble lots-of-types pairtype-pack pairtype-size-extent segtest sendrecvt2 sendrecvt4 - simple-commit simple-pack simple-pack-external simple-pack-external2 simple-resized simple-size-extent sizedtypes slice-pack - slice-pack-external large_vec struct-derived-zeros struct-empty-el struct-ezhov struct-no-real-types struct-pack + localpack longdouble lots-of-types pairtype-pack pairtype-size-extent segtest sendrecvt2 sendrecvt4 + simple-commit simple-pack simple-pack-external simple-pack-external2 simple-resized simple-size-extent sizedtypes slice-pack + slice-pack-external large_vec struct-derived-zeros struct-empty-el struct-ezhov struct-no-real-types struct-pack structpack2 struct-verydeep struct-zero-count subarray subarray-pack tfree tmatchsize transpose-pack tresized2 - tresized triangular-pack typecommit typefree typelb typename unpack unusual-noncontigs vecblklen + tresized triangular-pack typecommit typefree typelb typename unpack unusual-noncontigs vecblklen zero-blklen-vector zeroblks zeroparms) set(examples_src ${examples_src} ${CMAKE_CURRENT_SOURCE_DIR}/${file}.c) endforeach() diff --git a/teshsuite/smpi/mpich3-test/f77/attr/CMakeLists.txt b/teshsuite/smpi/mpich3-test/f77/attr/CMakeLists.txt index 3a927daa70..c6464fe2d2 100644 --- a/teshsuite/smpi/mpich3-test/f77/attr/CMakeLists.txt +++ b/teshsuite/smpi/mpich3-test/f77/attr/CMakeLists.txt @@ -8,7 +8,7 @@ if(enable_smpi AND enable_smpi_MPICH3_testsuite AND SMPI_FORTRAN) include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi") - foreach(test attrmpi1f + foreach(test attrmpi1f baseattrf baseattr2f commattrf commattr2f commattr3f typeattrf typeattr2f typeattr3f) diff --git a/teshsuite/smpi/mpich3-test/f77/coll/testlist b/teshsuite/smpi/mpich3-test/f77/coll/testlist index 79b6c2e880..7c07eca958 100644 --- a/teshsuite/smpi/mpich3-test/f77/coll/testlist +++ b/teshsuite/smpi/mpich3-test/f77/coll/testlist @@ -12,4 +12,4 @@ red_scat_blockf 4 mpiversion=2.2 nonblocking_inpf 4 allredint8f 4 allredopttf 4 -uallreducef 4 +uallreducef 4 diff --git a/teshsuite/smpi/mpich3-test/f77/info/CMakeLists.txt b/teshsuite/smpi/mpich3-test/f77/info/CMakeLists.txt index 286bddf701..e1b635fd98 100644 --- a/teshsuite/smpi/mpich3-test/f77/info/CMakeLists.txt +++ b/teshsuite/smpi/mpich3-test/f77/info/CMakeLists.txt @@ -18,8 +18,8 @@ endif() set(examples_src ${examples_src} - ${CMAKE_CURRENT_SOURCE_DIR}/infotest2f.f - ${CMAKE_CURRENT_SOURCE_DIR}/infotestf.f + ${CMAKE_CURRENT_SOURCE_DIR}/infotest2f.f + ${CMAKE_CURRENT_SOURCE_DIR}/infotestf.f PARENT_SCOPE) set(txt_files ${txt_files} diff --git a/teshsuite/smpi/mpich3-test/f77/rma/CMakeLists.txt b/teshsuite/smpi/mpich3-test/f77/rma/CMakeLists.txt index 7e8f5baf62..6b659ce865 100644 --- a/teshsuite/smpi/mpich3-test/f77/rma/CMakeLists.txt +++ b/teshsuite/smpi/mpich3-test/f77/rma/CMakeLists.txt @@ -18,7 +18,7 @@ if(enable_smpi AND enable_smpi_MPICH3_testsuite AND SMPI_FORTRAN) add_dependencies(tests ${test}) target_link_libraries(${test} simgrid mtest_f77) endforeach() - + add_executable(c2f2cwinf EXCLUDE_FROM_ALL c2f2cwinf.f c2f2cwin.c) set_property(TARGET c2f2cwinf PROPERTY INTERPROCEDURAL_OPTIMIZATION FALSE) add_dependencies(tests c2f2cwinf) diff --git a/teshsuite/smpi/mpich3-test/f90/coll/CMakeLists.txt b/teshsuite/smpi/mpich3-test/f90/coll/CMakeLists.txt index f302438f1b..b051d25598 100644 --- a/teshsuite/smpi/mpich3-test/f90/coll/CMakeLists.txt +++ b/teshsuite/smpi/mpich3-test/f90/coll/CMakeLists.txt @@ -9,8 +9,8 @@ if(enable_smpi AND enable_smpi_MPICH3_testsuite AND SMPI_FORTRAN) include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi") foreach(test alltoallvf90 - allredint8f90 allredopttf90 alltoallwf90 - exscanf90 inplacef90 + allredint8f90 allredopttf90 alltoallwf90 + exscanf90 inplacef90 nonblockingf90 nonblocking_inpf90 redscatf90 red_scat_blockf90 reducelocalf90 split_typef90 uallreducef90 vw_inplacef90) diff --git a/teshsuite/smpi/mpich3-test/f90/datatype/CMakeLists.txt b/teshsuite/smpi/mpich3-test/f90/datatype/CMakeLists.txt index cd4cd733f0..bd31a74664 100644 --- a/teshsuite/smpi/mpich3-test/f90/datatype/CMakeLists.txt +++ b/teshsuite/smpi/mpich3-test/f90/datatype/CMakeLists.txt @@ -8,7 +8,7 @@ if(enable_smpi AND enable_smpi_MPICH3_testsuite AND SMPI_FORTRAN) include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi") - foreach(test gaddressf90 typesnamef90 structf + foreach(test gaddressf90 typesnamef90 structf # allctypesf90 createf90 get_elem_d get_elem_u hindex1f90 indtype kinds diff --git a/teshsuite/smpi/mpich3-test/f90/info/CMakeLists.txt b/teshsuite/smpi/mpich3-test/f90/info/CMakeLists.txt index 0f3bd71c0f..00d809c13a 100644 --- a/teshsuite/smpi/mpich3-test/f90/info/CMakeLists.txt +++ b/teshsuite/smpi/mpich3-test/f90/info/CMakeLists.txt @@ -17,8 +17,8 @@ endif() set(examples_src ${examples_src} - ${CMAKE_CURRENT_SOURCE_DIR}/infotest2f90.f90 - ${CMAKE_CURRENT_SOURCE_DIR}/infotestf90.f90 + ${CMAKE_CURRENT_SOURCE_DIR}/infotest2f90.f90 + ${CMAKE_CURRENT_SOURCE_DIR}/infotestf90.f90 PARENT_SCOPE) set(txt_files ${txt_files} diff --git a/teshsuite/smpi/mpich3-test/f90/pt2pt/CMakeLists.txt b/teshsuite/smpi/mpich3-test/f90/pt2pt/CMakeLists.txt index 5aa5cf9cda..89bcd81309 100644 --- a/teshsuite/smpi/mpich3-test/f90/pt2pt/CMakeLists.txt +++ b/teshsuite/smpi/mpich3-test/f90/pt2pt/CMakeLists.txt @@ -7,13 +7,13 @@ if(enable_smpi AND enable_smpi_MPICH3_testsuite AND SMPI_FORTRAN) endif() include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi") - + foreach(test allpairf90 # mprobef90 greqf90 statusesf90) add_executable(${test} EXCLUDE_FROM_ALL ${test}.f90) add_dependencies(tests ${test}) - target_link_libraries(${test} simgrid mtest_f90) + target_link_libraries(${test} simgrid mtest_f90) endforeach() endif() diff --git a/teshsuite/smpi/mpich3-test/f90/rma/CMakeLists.txt b/teshsuite/smpi/mpich3-test/f90/rma/CMakeLists.txt index c7b90877cb..8e004aff34 100644 --- a/teshsuite/smpi/mpich3-test/f90/rma/CMakeLists.txt +++ b/teshsuite/smpi/mpich3-test/f90/rma/CMakeLists.txt @@ -7,7 +7,7 @@ if(enable_smpi AND enable_smpi_MPICH3_testsuite AND SMPI_FORTRAN) endif() include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi") - + foreach(test winaccf90 # winerrf90 winfencef90 wingroupf90 @@ -17,7 +17,7 @@ if(enable_smpi AND enable_smpi_MPICH3_testsuite AND SMPI_FORTRAN) ) add_executable(${test} EXCLUDE_FROM_ALL ${test}.f90) add_dependencies(tests ${test}) - target_link_libraries(${test} simgrid mtest_f90) + target_link_libraries(${test} simgrid mtest_f90) endforeach() add_executable(c2f2cwinf90 EXCLUDE_FROM_ALL c2f2cwinf90.f90 c2f902cwin.c) diff --git a/teshsuite/smpi/mpich3-test/generate_report b/teshsuite/smpi/mpich3-test/generate_report index ff45bf6404..9f798d543f 100755 --- a/teshsuite/smpi/mpich3-test/generate_report +++ b/teshsuite/smpi/mpich3-test/generate_report @@ -4,9 +4,9 @@ explore_files() { for cmake in $(find -name CMakeLists.txt) ; do d=$(dirname $cmake) - + echo;echo "Directory $d" - + grep add_executable $cmake |\ sed -e 's/ #/#/' -e 's/ *add_executable(//' -e 's/ .*//'|\ sed -e 's/^\([^#].*\)/\1 PASS/' -e 's/^#\(.*\)/\1 todo/' |\ diff --git a/teshsuite/smpi/mpich3-test/group/testlist b/teshsuite/smpi/mpich3-test/group/testlist index 8bca2d8872..abd2d4839d 100644 --- a/teshsuite/smpi/mpich3-test/group/testlist +++ b/teshsuite/smpi/mpich3-test/group/testlist @@ -4,6 +4,6 @@ grouptest2 4 #needs MPI_Intercomm_create #groupnullincl 4 gtranks 8 -# this may be too many processes for some systems, but the test needs a +# this may be too many processes for some systems, but the test needs a # large-ish number of processes to yield an effective performance check gtranksperf 20 diff --git a/teshsuite/smpi/mpich3-test/io/CMakeLists.txt b/teshsuite/smpi/mpich3-test/io/CMakeLists.txt index 1b83986f92..f116c6b6e3 100644 --- a/teshsuite/smpi/mpich3-test/io/CMakeLists.txt +++ b/teshsuite/smpi/mpich3-test/io/CMakeLists.txt @@ -10,7 +10,7 @@ if(enable_smpi AND enable_smpi_MPICH3_testsuite) include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../include/") foreach(file async_any async bigtype external32-derived-dtype getextent hindexed_io rdwrord rdwrzero resized2 resized setinfo setviewcur simple_collective userioerr) - #i_aggregation1 i_aggregation2 i_bigtype i_coll_test i_darray_read i_hindexed i_hindexed_io i_noncontig i_noncontig_coll2 i_noncontig_coll i_rdwrord i_setviewcur i_types_with_zeros + #i_aggregation1 i_aggregation2 i_bigtype i_coll_test i_darray_read i_hindexed i_hindexed_io i_noncontig i_noncontig_coll2 i_noncontig_coll i_rdwrord i_setviewcur i_types_with_zeros add_executable(${file} EXCLUDE_FROM_ALL ${file}.c) add_dependencies(tests ${file}) target_link_libraries(${file} simgrid mtest_c) diff --git a/teshsuite/smpi/mpich3-test/perf/CMakeLists.txt b/teshsuite/smpi/mpich3-test/perf/CMakeLists.txt index 85e5185968..bc943b3c85 100644 --- a/teshsuite/smpi/mpich3-test/perf/CMakeLists.txt +++ b/teshsuite/smpi/mpich3-test/perf/CMakeLists.txt @@ -21,11 +21,11 @@ if (enable_smpi_MPICH3_testsuite AND HAVE_RAW_CONTEXTS) ADD_TEST(test-smpi-mpich3-perf-raw ${CMAKE_COMMAND} -E chdir ${CMAKE_BINARY_DIR}/teshsuite/smpi/mpich3-test/perf ${PERL_EXECUTABLE} ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/mpich3-test/runtests "-wrapper=${TESH_WRAPPER}" -mpiexec=${CMAKE_BINARY_DIR}/smpi_script/bin/smpirun -tests=${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/mpich3-test/perf/testlist -execarg=-platform\ ${CMAKE_HOME_DIRECTORY}/examples/platforms/cluster_backbone.xml -execarg=--log=root.thr:critical -execarg=--cfg=smpi/async-small-thresh:65536 -execarg=--cfg=contexts/factory:raw -execarg=--cfg=smpi/simulate-computation:0) endif() -foreach(file allredtrace commcreatep non_zero_root sendrecvl timer transp-datatype twovec dtpack indexperf manyrma +foreach(file allredtrace commcreatep non_zero_root sendrecvl timer transp-datatype twovec dtpack indexperf manyrma nestvec2 nestvec) set(examples_src ${examples_src} ${CMAKE_CURRENT_SOURCE_DIR}/${file}.c) endforeach() set(examples_src ${examples_src} PARENT_SCOPE) -set(txt_files ${txt_files} ${CMAKE_CURRENT_SOURCE_DIR}/README +set(txt_files ${txt_files} ${CMAKE_CURRENT_SOURCE_DIR}/README ${CMAKE_CURRENT_SOURCE_DIR}/testlist PARENT_SCOPE) diff --git a/teshsuite/smpi/mpich3-test/pt2pt/testlist b/teshsuite/smpi/mpich3-test/pt2pt/testlist index 626d088b15..6af72a266b 100644 --- a/teshsuite/smpi/mpich3-test/pt2pt/testlist +++ b/teshsuite/smpi/mpich3-test/pt2pt/testlist @@ -18,7 +18,7 @@ bsendalign 2 bsendpending 2 isendself 1 #issendselfcancel 1 -isendirecv 10 +isendirecv 10 bsendfrag 2 #needs MPI_Intercomm_create #icsend 4 diff --git a/teshsuite/smpi/mpich3-test/rma/CMakeLists.txt b/teshsuite/smpi/mpich3-test/rma/CMakeLists.txt index 38f586cad8..f74c0a2928 100644 --- a/teshsuite/smpi/mpich3-test/rma/CMakeLists.txt +++ b/teshsuite/smpi/mpich3-test/rma/CMakeLists.txt @@ -15,16 +15,16 @@ if(enable_smpi AND enable_smpi_MPICH3_testsuite) transpose3 transpose4 transpose5 transpose6 transpose7 window_creation selfrma locknull win_info at_complete acc-pairtype manyget large-small-acc lock_dt win_dynamic_acc fetch_and_op flush req_example rmanull rmazero badrma lock_nested winname attrorderwin baseattrwin fkeyvalwin strided_acc_indexed strided_getacc_indexed compare_and_swap - lockall_dt lockall_dt_flushall lock_dt_flush lockall_dt_flush lockall_dt_flushlocalall lockall_dt_flushlocal lock_dt_flushlocal + lockall_dt lockall_dt_flushall lock_dt_flush lockall_dt_flush lockall_dt_flushlocalall lockall_dt_flushlocal lock_dt_flushlocal strided_acc_onelock strided_get_indexed strided_putget_indexed contention_put contention_putget lockcontention3 adlb_mimic1 lock_contention_dt acc-loc get_acc_local get_accumulate put_base put_bottom linked_list_bench_lock_all linked_list_bench_lock_excl manyrma2 pscw_ordering rma-contig get-struct rput_local_comp racc_local_comp rget-testall win_shared win_shared_put_flush_get atomic_get) - # fence_shm fetchandadd_am fetchandadd fetchandadd_tree_am fetchandadd_tree + # fence_shm fetchandadd_am fetchandadd fetchandadd_tree_am fetchandadd_tree # linked_list_bench_lock_shr linked_list linked_list_fop linked_list_lockall # mcs-mutex mixedsync mutex_bench reqops - # strided_getacc_indexed_shared rget-unlock - # win_flavors win_shared_zerobyte win_shared_noncontig win_shared_noncontig_put + # strided_getacc_indexed_shared rget-unlock + # win_flavors win_shared_zerobyte win_shared_noncontig win_shared_noncontig_put # win_large_shm win_zero wintest atomic_rmw_fop atomic_rmw_gacc atomic_rmw_cas # aint derived-acc-flush_local large-acc-flush_local # win_shared_create win_shared_put_flush_get win_shared_rma_flush_load @@ -36,7 +36,7 @@ if(enable_smpi AND enable_smpi_MPICH3_testsuite) endforeach() add_executable(transpose3_shm EXCLUDE_FROM_ALL transpose3.c) - add_dependencies(tests transpose3_shm) + add_dependencies(tests transpose3_shm) target_link_libraries(transpose3_shm simgrid mtest_c) set_target_properties(transpose3_shm PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS} -DUSE_WIN_ALLOCATE") endif() @@ -52,25 +52,25 @@ endif() foreach(file accfence1 accfence2_am accfence2 accpscw1 allocmem epochtest getfence1 getgroup manyrma3 nullpscw putfence1 putfidx putpscw1 test1_am test1 test1_dt test2_am test2 test3 test5_am test5 transpose1 transpose2 transpose3 transpose6 transpose7 window_creation - acc-loc adlb_mimic1 attrorderwin badrma baseattrwin compare_and_swap contention_put contention_putget + acc-loc adlb_mimic1 attrorderwin badrma baseattrwin compare_and_swap contention_put contention_putget contig_displ fence_shm fetchandadd_am fetchandadd fetchandadd_tree_am fetchandadd_tree fetch_and_op fkeyvalwin flush get_acc_local get_accumulate linked_list_bench_lock_all linked_list_bench_lock_excl - linked_list_bench_lock_shr linked_list linked_list_fop linked_list_lockall lockcontention2 lockcontention3 - lockcontention locknull lockopts manyrma2 mcs-mutex mixedsync mutex_bench pscw_ordering put_base put_bottom - req_example reqops rmanull rmazero rma-contig selfrma strided_acc_indexed strided_acc_onelock - strided_acc_subarray strided_getacc_indexed strided_getacc_indexed_shared strided_get_indexed - strided_putget_indexed strided_putget_indexed_shared test3_am test4_am test4 transpose4 transpose5 wincall - win_dynamic_acc win_flavors win_info winname win_shared win_shared_noncontig win_shared_noncontig_put + linked_list_bench_lock_shr linked_list linked_list_fop linked_list_lockall lockcontention2 lockcontention3 + lockcontention locknull lockopts manyrma2 mcs-mutex mixedsync mutex_bench pscw_ordering put_base put_bottom + req_example reqops rmanull rmazero rma-contig selfrma strided_acc_indexed strided_acc_onelock + strided_acc_subarray strided_getacc_indexed strided_getacc_indexed_shared strided_get_indexed + strided_putget_indexed strided_putget_indexed_shared test3_am test4_am test4 transpose4 transpose5 wincall + win_dynamic_acc win_flavors win_info winname win_shared win_shared_noncontig win_shared_noncontig_put win_large_shm win_zero wintest win_shared_zerobyte get-struct - at_complete atomic_rmw_fop atomic_rmw_cas atomic_rmw_gacc atomic_get aint acc-pairtype manyget large-small-acc + at_complete atomic_rmw_fop atomic_rmw_cas atomic_rmw_gacc atomic_get aint acc-pairtype manyget large-small-acc rget-unlock overlap_wins_rma lock_nested derived-acc-flush_local large-acc-flush_local lockall_dt lockall_dt_flushall - lockall_dt_flush nb_test lockall_dt_flushlocal lockall_dt_flushlocalall lock_contention_dt lock_dt lock_dt_flush lock_dt_flushlocal + lockall_dt_flush nb_test lockall_dt_flushlocal lockall_dt_flushlocalall lock_contention_dt lock_dt lock_dt_flush lock_dt_flushlocal racc_local_comp rput_local_comp win_shared_create win_shared_put_flush_get win_shared_rma_flush_load wrma_flush_get rget-testall) set(examples_src ${examples_src} ${CMAKE_CURRENT_SOURCE_DIR}/${file}.c) endforeach() set(examples_src ${examples_src} PARENT_SCOPE) -set(txt_files ${txt_files} ${CMAKE_CURRENT_SOURCE_DIR}/testlist +set(txt_files ${txt_files} ${CMAKE_CURRENT_SOURCE_DIR}/testlist ${CMAKE_CURRENT_SOURCE_DIR}/mcs-mutex.h ${CMAKE_CURRENT_SOURCE_DIR}/squelch.h PARENT_SCOPE) diff --git a/teshsuite/smpi/mpich3-test/runtests b/teshsuite/smpi/mpich3-test/runtests index 8397d96772..ed293d24b5 100755 --- a/teshsuite/smpi/mpich3-test/runtests +++ b/teshsuite/smpi/mpich3-test/runtests @@ -169,7 +169,7 @@ foreach $_ (@ARGV) { elsif (/--?batchdir=(.*)/) { $batrundir = $1; } elsif (/--?timeoutarg=(.*)/) { $timeoutArgPattern = $1; } elsif (/--?execarg=(.*)/) { $execarg = "$execarg $1"; } - elsif (/--?privatization=(.*)/) { + elsif (/--?privatization=(.*)/) { print STDERR "privatization called\n"; $enabled_privatization = $1; } elsif (/--?wrapper=(.*)/) { @@ -430,7 +430,7 @@ sub RunList { if ($needs_privatization == 1 && $enabled_privatization != 1) { SkippedTest($programname, $np, $workdir, "requires SMPI privatization"); - next; + next; } if ($np eq "") { $np = $np_default; } diff --git a/teshsuite/smpi/mpich3-test/testlist b/teshsuite/smpi/mpich3-test/testlist index 9904225e85..fddb8b947d 100644 --- a/teshsuite/smpi/mpich3-test/testlist +++ b/teshsuite/smpi/mpich3-test/testlist @@ -1,6 +1,6 @@ # The next item ensures that the support routines are built first !util:all -attr +attr #basic coll comm diff --git a/teshsuite/smpi/mpich3-test/topo/CMakeLists.txt b/teshsuite/smpi/mpich3-test/topo/CMakeLists.txt index f26f4e7f68..65c12a074b 100644 --- a/teshsuite/smpi/mpich3-test/topo/CMakeLists.txt +++ b/teshsuite/smpi/mpich3-test/topo/CMakeLists.txt @@ -18,7 +18,7 @@ if(enable_smpi AND enable_smpi_MPICH3_testsuite) endforeach() endif() -foreach(file cartcreates cartshift1 cartsuball cartzero cartmap1 dgraph_unwgt dims1 dims2 dims3 dims4 dims5 distgraph1 +foreach(file cartcreates cartshift1 cartsuball cartzero cartmap1 dgraph_unwgt dims1 dims2 dims3 dims4 dims5 distgraph1 graphcr2 graphcr graphmap1 neighb_coll topodup topotest) set(examples_src ${examples_src} ${CMAKE_CURRENT_SOURCE_DIR}/${file}.c) endforeach() diff --git a/tools/MSG_visualization/trace2fig.pl b/tools/MSG_visualization/trace2fig.pl index d229f64c74..e7d1c5a9eb 100755 --- a/tools/MSG_visualization/trace2fig.pl +++ b/tools/MSG_visualization/trace2fig.pl @@ -89,7 +89,7 @@ sub read_link { my($numkey)=hex "$key"; while (defined($link{$numkey}{dst})) {$numkey++;} $link{$numkey}{dst}=$dst; - $link{$numkey}{dst_date}=$date; + $link{$numkey}{dst_date}=$date; } } close INPUT; @@ -236,7 +236,7 @@ sub draw_cat { # LM: I added the next line because of "undefined values"... # normally, I think that this should not happen, but this part of code is a bit too cryptic to me - next unless (defined($state)); + next unless (defined($state)); my($line) = new XFig ('polyline'); @@ -292,7 +292,7 @@ sub draw_cat { foreach $cat (keys %$Cat) { next unless (defined($$Cat{$cat}{Y_min_host}) && defined($$Cat{$cat}{Y_max_host})); my($line) = new XFig ('polyline'); - + $line->{'depth'} = 150; $line->{'subtype'} = 1; # line $line->{'points'} = [ [$min_x_for_host, $$Cat{$cat}{Y_min_host}*$grid_Y_size], @@ -304,7 +304,7 @@ sub draw_cat { $line->{'thickness'} = 0; $index_fill++; $fig->add ($line); - + my($text) = new XFig ('text'); $text->{'text'} = "$$Cat{$cat}{name}"; $text->{'angle'} = 3.14159265/2; diff --git a/tools/cmake/DefinePackages.cmake b/tools/cmake/DefinePackages.cmake index a0c85b1dbe..8a6ad66d6c 100644 --- a/tools/cmake/DefinePackages.cmake +++ b/tools/cmake/DefinePackages.cmake @@ -638,7 +638,7 @@ set(MC_SRC src/mc/sosp/Region.hpp src/mc/sosp/Snapshot.hpp src/mc/sosp/Snapshot.cpp - + src/mc/AddressSpace.hpp src/mc/ModelChecker.hpp src/mc/ModelChecker.cpp @@ -1126,8 +1126,8 @@ set(CMAKE_SOURCE_FILES tools/stack-cleaner/clean-stack-filter tools/stack-cleaner/compiler-wrapper tools/stack-cleaner/README - - setup.py + + setup.py MANIFEST.in MANIFEST.in.in ) diff --git a/tools/cmake/Java.cmake b/tools/cmake/Java.cmake index 3ea59a8d64..536b658b19 100644 --- a/tools/cmake/Java.cmake +++ b/tools/cmake/Java.cmake @@ -115,7 +115,7 @@ if(enable_lib_in_jar) TARGET simgrid-java_jar POST_BUILD COMMENT "Add the native libs into simgrid.jar..." DEPENDS simgrid simgrid-java ${JAVALIBS} - + COMMAND ${CMAKE_COMMAND} -E make_directory ${JAVA_NATIVE_PATH} COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_BINARY_DIR}/lib/${LIBSIMGRID_SO} ${JAVA_NATIVE_PATH}/${LIBSIMGRID_SO} diff --git a/tools/cmake/Modules/FindLibunwind.cmake b/tools/cmake/Modules/FindLibunwind.cmake index 2feb903164..3b98afaaaf 100644 --- a/tools/cmake/Modules/FindLibunwind.cmake +++ b/tools/cmake/Modules/FindLibunwind.cmake @@ -78,7 +78,7 @@ foreach(component ${LIBUNWIND_COMPONENTS}) else() SET(LIBUNWIND_LIBRARIES "${LIBUNWIND_LIBRARIES} -l${component}") endif() - + else() message(" Looking for lib${component}.${LIB_EXE} - not found") SET(HAVE_LIBUNWIND 0) diff --git a/tools/cmake/Modules/pybind11Config.cmake b/tools/cmake/Modules/pybind11Config.cmake index e70847b2fd..68ad50d528 100644 --- a/tools/cmake/Modules/pybind11Config.cmake +++ b/tools/cmake/Modules/pybind11Config.cmake @@ -1,7 +1,7 @@ # pybind11Config.cmake # -------------------- # -# Edited for simgrid so that we survive when pybind11Tools is not found, +# Edited for simgrid so that we survive when pybind11Tools is not found, # concluding that pybind11 is not installed. Original version was 2.2.4-2. # # PYBIND11 cmake module. diff --git a/tools/cmake/Tests.cmake b/tools/cmake/Tests.cmake index 47e378e95c..c7857828f0 100644 --- a/tools/cmake/Tests.cmake +++ b/tools/cmake/Tests.cmake @@ -110,7 +110,7 @@ MACRO(SET_TESH_PROPERTIES NAME FACTORIES) FOREACH(FACTORY ${FACTORIES_LIST}) set_tests_properties("${NAME}-${FACTORY}" PROPERTIES ${ARGR}) ENDFOREACH() -ENDMACRO() +ENDMACRO() IF(enable_java) IF(WIN32) @@ -143,7 +143,7 @@ if (SIMGRID_HAVE_MC) set(UNIT_TESTS ${UNIT_TESTS} src/mc/sosp/Snapshot_test.cpp src/mc/sosp/PageStore_test.cpp) else() set(EXTRA_DIST ${EXTRA_DIST} src/mc/sosp/Snapshot_test.cpp src/mc/sosp/PageStore_test.cpp) -endif() +endif() set(EXTRA_DIST ${EXTRA_DIST} src/kernel/routing/NetZone_test.hpp) add_executable (unit-tests EXCLUDE_FROM_ALL ${UNIT_TESTS}) diff --git a/tools/cmake/scripts/fixup_simgrid_dtd_l.pl b/tools/cmake/scripts/fixup_simgrid_dtd_l.pl index f4c1535db9..67f66de210 100755 --- a/tools/cmake/scripts/fixup_simgrid_dtd_l.pl +++ b/tools/cmake/scripts/fixup_simgrid_dtd_l.pl @@ -17,8 +17,8 @@ while (<>) { if (/fprintf.stderr, .*? flexml_err_msg.;/) { print(' surf_parse_error(flexml_err_msg);'."\n"); next; - } - + } + # Actually outputs the resulting line print; } diff --git a/tools/cmake/scripts/update_tesh.pl b/tools/cmake/scripts/update_tesh.pl index 4e26c613f0..ed6eedd5e3 100755 --- a/tools/cmake/scripts/update_tesh.pl +++ b/tools/cmake/scripts/update_tesh.pl @@ -56,7 +56,7 @@ while(defined($line=)) { print "$line"; } - } + } } close(SH_LIGNE); diff --git a/tools/docker/Dockerfile.build-deps b/tools/docker/Dockerfile.build-deps index afbd2a6d72..53f36c031a 100644 --- a/tools/docker/Dockerfile.build-deps +++ b/tools/docker/Dockerfile.build-deps @@ -1,4 +1,4 @@ -# Base image +# Base image FROM debian:testing # Install the dependencies: diff --git a/tools/docker/Dockerfile.tuto-mc b/tools/docker/Dockerfile.tuto-mc index cc9629dc6d..55cbbf889f 100644 --- a/tools/docker/Dockerfile.tuto-mc +++ b/tools/docker/Dockerfile.tuto-mc @@ -3,12 +3,12 @@ # Launch it as follows: # docker run -it simgrid/tuto-mc bash -# Base image +# Base image FROM debian:testing -RUN apt update && apt -y upgrade +RUN apt update && apt -y upgrade -# - Install SimGrid's dependencies +# - Install SimGrid's dependencies # - Compile and install SimGrid itself. # - Get the tutorial files (with an empty makefile advising to run cmake before make, just in case) # - Remove everything that was installed, and re-install what's needed by the SimGrid libraries before the Gran Final Cleanup @@ -25,7 +25,7 @@ RUN apt install -y g++ gcc git valgrind gfortran libboost-dev libboost-stacktrac apt install -y `sed -e 's/shlibs:Depends=//' -e 's/([^)]*)//g' -e 's/,//g' /tmp/deps` && rm /tmp/deps && \ apt autoremove -y && apt autoclean && apt clean -# The build and dependencies are not cleaned in this image since it's it's experimental so far +# The build and dependencies are not cleaned in this image since it's it's experimental so far # git reset --hard master && git clean -dfx && \ diff --git a/tools/docker/Dockerfile.tuto-s4u b/tools/docker/Dockerfile.tuto-s4u index ee35b96693..7247b9746d 100644 --- a/tools/docker/Dockerfile.tuto-s4u +++ b/tools/docker/Dockerfile.tuto-s4u @@ -1,4 +1,4 @@ -# Base image +# Base image FROM simgrid/stable RUN apt update && apt -y upgrade diff --git a/tools/docker/Dockerfile.tuto-smpi b/tools/docker/Dockerfile.tuto-smpi index 989fd59d51..1d2aa8f138 100644 --- a/tools/docker/Dockerfile.tuto-smpi +++ b/tools/docker/Dockerfile.tuto-smpi @@ -1,4 +1,4 @@ -# Base image +# Base image FROM simgrid/stable # https://stackoverflow.com/questions/35134713/disable-cache-for-specific-run-commands @@ -19,7 +19,7 @@ RUN apt install -y python3 pajeng libssl-dev r-base r-cran-devtools r-cran-tidyv git clone --depth=1 https://framagit.org/simgrid/simgrid-template-smpi.git simgrid-template-smpi.git && \ chown -R user:user /source && \ apt autoremove -y && apt clean && apt autoclean - + RUN Rscript -e "library(devtools); install_github('schnorr/pajengr');" CMD ["su", "-", "user", "-c", "/bin/bash"] diff --git a/tools/docker/Dockerfile.unstable b/tools/docker/Dockerfile.unstable index 3f23afd33b..d0f23b7426 100644 --- a/tools/docker/Dockerfile.unstable +++ b/tools/docker/Dockerfile.unstable @@ -1,7 +1,7 @@ -# Base image +# Base image FROM debian:testing -# - Install SimGrid's dependencies +# - Install SimGrid's dependencies # - Compile and install SimGrid itself. Clean the tree. # - Remove everything that was installed, and re-install what's needed by the SimGrid libraries before the Gran Final Cleanup RUN apt-get --allow-releaseinfo-change update && apt -y upgrade && \ diff --git a/tools/internal/spell_comments.pl b/tools/internal/spell_comments.pl index dfb94928bd..1da30a9456 100755 --- a/tools/internal/spell_comments.pl +++ b/tools/internal/spell_comments.pl @@ -47,7 +47,7 @@ foreach my $file (@ARGV) { open(PIN, "ispell -d american -p $DICTFILE -l < $TEMPFILE | sort -uf |") || die; my @badwords; while (my $err = ) { - chomp $err; + chomp $err; push(@badwords, $err) if ($err =~ /\w/ && length($err)>0); } close(PIN) || die; diff --git a/tools/jenkins/Coverage.sh b/tools/jenkins/Coverage.sh index bf9a0d5929..4a5d0f4459 100755 --- a/tools/jenkins/Coverage.sh +++ b/tools/jenkins/Coverage.sh @@ -96,7 +96,7 @@ if [ -f Testing/TAG ] ; then ant -f "$WORKSPACE"/tools/jenkins/jacoco.xml -Dexamplesrcdir="$WORKSPACE" -Dbuilddir="$BUILDFOLDER"/"${sourcepath}" -Djarfile="$BUILDFOLDER"/simgrid.jar -Djacocodir=${JACOCO_PATH}/lib #convert jacoco xml reports in cobertura xml reports cover2cover.py "$BUILDFOLDER"/"${sourcepath}"/report.xml .. ../src/bindings/java src/bindings/java > "$BUILDFOLDER"/java_coverage_${i}.xml - #save jacoco xml report as sonar only allows it + #save jacoco xml report as sonar only allows it mv "$BUILDFOLDER"/"${sourcepath}"/report.xml "$BUILDFOLDER"/jacoco_cov_${i}.xml i=$((i + 1)) done diff --git a/tools/jenkins/build.sh b/tools/jenkins/build.sh index b642ce23c4..7cffc16dd9 100755 --- a/tools/jenkins/build.sh +++ b/tools/jenkins/build.sh @@ -187,7 +187,7 @@ if cmake --version | grep -q 3\.11 ; then # -DCMAKE_DISABLE_SOURCE_CHANGES=ON is broken with java on CMake 3.11 # https://gitlab.kitware.com/cmake/cmake/issues/17933 MAY_DISABLE_SOURCE_CHANGE="" -else +else MAY_DISABLE_SOURCE_CHANGE="-DCMAKE_DISABLE_SOURCE_CHANGES=ON" fi diff --git a/tools/jenkins/ci-batsim.sh b/tools/jenkins/ci-batsim.sh index b2af1a000f..033ed4eed5 100755 --- a/tools/jenkins/ci-batsim.sh +++ b/tools/jenkins/ci-batsim.sh @@ -26,7 +26,7 @@ $SUDO apt-get -y install meson pkg-config libpugixml-dev libgtest-dev rapidjson- echo "XXXXXXXXXXXXXXXX Install intervalset" git clone https://framagit.org/batsim/intervalset.git -cd intervalset +cd intervalset meson build --prefix=/usr cd build && ninja install cd ../.. @@ -34,7 +34,7 @@ cd ../.. echo "XXXXXXXXXXXXXXXX Install redox" $SUDO apt-get -y install libhiredis-dev libev-dev cmake #for redox git clone --depth=1 --branch=install-pkg-config-file https://github.com/mpoquet/redox.git -cd redox +cd redox cmake -DCMAKE_INSTALL_PREFIX=/usr -Dstatic_lib=OFF . && make -j$(nproc) install cp redox.pc /usr/lib/pkgconfig/ cd .. diff --git a/tools/jenkins/project_description.sh b/tools/jenkins/project_description.sh index cd019ca223..815f17b528 100755 --- a/tools/jenkins/project_description.sh +++ b/tools/jenkins/project_description.sh @@ -77,7 +77,7 @@ function sortTable(n, type) { table = document.getElementById('configuration-matrix'); switching = true; //Set the sorting direction to ascending: - dir = 'asc'; + dir = 'asc'; /*Make a loop that will continue until no switching has been done:*/ while (switching) { @@ -117,7 +117,7 @@ function sortTable(n, type) { rows[i].parentNode.insertBefore(rows[i + 1], rows[i]); switching = true; //Each time a switch is done, increase this count by 1: - switchcount ++; + switchcount ++; } else { /*If no switching has been done AND the direction is 'asc', set the direction to 'desc' and run the while loop again.*/ @@ -128,7 +128,7 @@ function sortTable(n, type) { } } } - +
" for node in "${nodes[@]}" @@ -148,7 +148,7 @@ do ns3=$(get_ns3) py=$(get_python) os=$(grep -m 1 "OS Version" ./consoleText| sed "s/OS Version : \(.*\)/\1/g") - + color1="" color2="" #in case of success, replace blue by green in status balls diff --git a/tools/simgrid.supp b/tools/simgrid.supp index f14c257cf3..5b71741baa 100644 --- a/tools/simgrid.supp +++ b/tools/simgrid.supp @@ -93,7 +93,7 @@ match-leak-kinds: all fun:MPI_Comm_dup obj:coll-allreduce-with-leaks* -} +} #Memory leaks appearing to be in libcgraph. They can be seen with the # following simple program: diff --git a/tools/simgrid_update_xml.pl b/tools/simgrid_update_xml.pl index 0ccd36e3e7..00c665876c 100755 --- a/tools/simgrid_update_xml.pl +++ b/tools/simgrid_update_xml.pl @@ -247,11 +247,11 @@ while (defined($line = )) { $output_string .= " \n"; $AS_opened=1; } - + if($line=~/)) { } $line =~ s/\bFULLDUPLEX\b/SPLITDUPLEX/g; $line =~ s/\bavailability_file\b/speed_file/g; - + $output_string .= "$line\n"; } diff --git a/tools/tesh/tesh.py b/tools/tesh/tesh.py index 2552c71b4d..0feecb9981 100755 --- a/tools/tesh/tesh.py +++ b/tools/tesh/tesh.py @@ -125,7 +125,7 @@ def kill_process_group(pid): except: # os.getpgid failed. Ok, don't cleanup. return - + try: os.killpg(pgid, signal.SIGTERM) if process_is_dead(pid):
Name of the BuilderOSCompilerBoostJavaCmakens-3PythonDebugMC