diff --git a/benchmark/Makefile b/benchmark/Makefile index 7a27cfcc4927f5f368c1fcf49edb74ef4a34957b..f0b7c1072d163f5705067b031deeac2bfee2dbd9 100644 --- a/benchmark/Makefile +++ b/benchmark/Makefile @@ -115,6 +115,7 @@ endif linktest-obj = linktest.o \ system.o \ benchmark.o \ + vector_bool.o \ cmdline.o \ environ.o \ error.o \ diff --git a/benchmark/benchmark.cc b/benchmark/benchmark.cc index 88ae35fb437819041d3f0c472c6be7bec53a68b2..ddb78ec98fca4a2ba0a8b190636554f52b7ea027 100644 --- a/benchmark/benchmark.cc +++ b/benchmark/benchmark.cc @@ -11,6 +11,7 @@ #include "compiler.h" #include "error.h" #include "cmdline.h" +#include "memory.h" #include "system.h" #include "vcluster.h" #include "memusage.h" @@ -771,6 +772,12 @@ int Benchmark::main_cmdline(){ /* Broadcast Command-Line Arguments */ args = bcast_cmdline_args(cl.get(),0,args); + /* Set values that depend on the cluster rank */ + localize_cmdline_args(cl->rank(), const_cast<linktest_args*>(args)); + + auto allocTypeName = Alloc::getName(args->alloc_typ); + info("[%d]AllocType=%s", rank(), allocTypeName.c_str()); + return(0); } @@ -784,25 +791,25 @@ int Benchmark::init() { // Set Allocator switch(args->alloc_typ){ - case(AllocatorInvalid): - case(AllocatorDefault): + case(Alloc::Type::Invalid): + case(Alloc::Type::Default): fatal("Encountered invalid memory-buffer allocator!"); std::abort(); return ERROR; break; - case(AllocatorAlignedMalloc): + case(Alloc::Type::AlignedMalloc): if(cl->rank()==0){info("Using memory-aligned--malloc allocator");std::fflush(stdout);} alloc.reset(new MallocAllocator()); break; - case(AllocatorPinnedMmap): + case(Alloc::Type::PinnedMmap): if(cl->rank()==0){info("Using pinned--memory-map allocator");std::fflush(stdout);} alloc.reset(new PinnedMmapAllocator()); break; - case(AllocatorPOSIXAlignedMalloc): + case(Alloc::Type::POSIXAlignedMalloc): if(cl->rank()==0){info("Using POSIX memory-aligned--malloc allocator");std::fflush(stdout);} alloc.reset(new PosixMemAlignedAllocator()); break; - case(AllocatorCUDA): + case(Alloc::Type::CUDA): #if HAVE_VCLUSTER_CUDA == 1 if(cl->rank()==0){info("Using CUDA memory allocator"); std::fflush(stdout);} gpudev.reset(new cuda::GpuDevice(System::singleton()->closest_gpu_device())); diff --git a/benchmark/cmdline.cc b/benchmark/cmdline.cc index 6c3ec9b801f637539ac10729ca82b52d161c1771..53c182b9274a6c27fd5b84e8e321ca5b4742d705 100644 --- a/benchmark/cmdline.cc +++ b/benchmark/cmdline.cc @@ -22,6 +22,7 @@ #include <cinttypes> #include <map> +#include "vector_bool.h" static void print_cmdline_usage(const std::string& prog); @@ -260,6 +261,16 @@ auto linktest_all_cmdline_argdefs = { .help = "Use GPU memory to store message buffers", .p = &cmdline_args.do_use_gpus }, + Argument{ + .type = Argument::kCustom, + .nargs = 1, + .optshort = "", + .optlong = "use-gpu-memory-on-task", + .defaultval = "[]", + .required = false, + .help = "Use GPU memory only on task ids marked with 1", + .p = &cmdline_args.use_gpus_on_task + }, Argument{ .type = Argument::kBoolean, .nargs = 0, @@ -550,7 +561,7 @@ static int handle_cmdline_arg_match(const std::string* val, const Argument& argd #endif break; default: - throw std::logic_error("Not implemented"); + throw std::logic_error("Unsupported comand line argument: " + argdef.optlong + " " + *val); } break; case 1: @@ -579,8 +590,16 @@ static int handle_cmdline_arg_match(const std::string* val, const Argument& argd printf("DEBUG: %s->%f\n",argdef.optlong.c_str(),*(double*)argdef.p); #endif break; + case Argument::kCustom: + if (argdef.optlong == "use-gpu-memory-on-task") { + *reinterpret_cast<std::vector<bool>*>(argdef.p) = VectorBool::fromString(*val); + #ifdef DEBUG_CMDLINE + printf("DEBUG: %s->%f\n",argdef.optlong.c_str(),*(double*)argdef.p); + #endif + break; + } default: - throw std::logic_error("Not implemented"); + throw std::logic_error("Unsupported comand line argument: " + argdef.optlong + " " + *val); } break; default: @@ -646,41 +665,13 @@ const struct linktest_args* parse_cmdline_args(int argc, char **argv){ } } - report_unknown_cmdline_args(args); - - std::map<std::string,AllocatorType> alloc_map={{"DEFAULT" ,AllocatorDefault }, - {"aligned-memory_allocator" ,AllocatorAlignedMalloc }, - {"pinned-memory-map_allocator" ,AllocatorPinnedMmap }, - {"POSIX_aligned-memory_allocator",AllocatorPOSIXAlignedMalloc}, - {"CUDA_memory_allocator" ,AllocatorCUDA } - }; - try{ - cmdline_args.alloc_typ=alloc_map.at(cmdline_args.memory_buffer_allocator); - }catch(const std::out_of_range& oor) { - fatal("Unknown memory-allocator type: %s.",cmdline_args.memory_buffer_allocator); + #if HAVE_VCLUSTER_CUDA != 1 + if(cmdline_args.do_use_gpus || cmdline_args.virtual_cluster_implementation=="cuda"){ + fatal("Requested using GPUs, but compiled without CUDA support."); } + #endif - if(cmdline_args.alloc_typ==AllocatorCUDA){ - #if HAVE_VCLUSTER_CUDA == 1 - #else - fatal("Requested CUDA memory-allocator type, but compiled without CUDA support."); - #endif - }else{ - if(cmdline_args.do_use_gpus||cmdline_args.virtual_cluster_implementation=="cuda"){ - #if HAVE_VCLUSTER_CUDA == 1 - if(cmdline_args.alloc_typ==AllocatorDefault){ - cmdline_args.alloc_typ=AllocatorCUDA; - } else { - fatal("Requested using GPUs, but not using the CUDA memory buffer allocator."); - } - #else - fatal("Requested using GPUs, but compiled without CUDA support."); - #endif - } - } - if(cmdline_args.alloc_typ==AllocatorDefault){ - cmdline_args.alloc_typ=AllocatorPOSIXAlignedMalloc; - } + report_unknown_cmdline_args(args); if(cmdline_args.do_bidir&&cmdline_args.do_unidir){ fatal("Cannot perform a bidirectional test at the same time as a uni-directional test."); @@ -752,6 +743,35 @@ const struct linktest_args *bcast_cmdline_args(VirtualCluster* cl, return(tmp); } +struct linktest_args *localize_cmdline_args(int rank, struct linktest_args* args) { + + std::map<std::string,Alloc::Type> alloc_map={{"DEFAULT" ,Alloc::Type::Default }, + {"aligned-memory_allocator" ,Alloc::Type::AlignedMalloc }, + {"pinned-memory-map_allocator" ,Alloc::Type::PinnedMmap }, + {"POSIX_aligned-memory_allocator",Alloc::Type::POSIXAlignedMalloc}, + {"CUDA_memory_allocator" ,Alloc::Type::CUDA }}; + try{ + cmdline_args.alloc_typ=alloc_map.at(cmdline_args.memory_buffer_allocator); + }catch(const std::out_of_range& oor) { + fatal("Unknown memory-allocator type: %s.",cmdline_args.memory_buffer_allocator); + } + + if(cmdline_args.virtual_cluster_implementation=="cuda"){ + args->alloc_typ = Alloc::Type::CUDA; + } + + if(args->do_use_gpus) { + bool isGpuRank = (std::size_t)rank >= args->use_gpus_on_task.size() || args->use_gpus_on_task.at(rank); + args->alloc_typ = isGpuRank ? Alloc::Type::CUDA : Alloc::Type::Default; + } + + if(cmdline_args.alloc_typ==Alloc::Type::Default){ + cmdline_args.alloc_typ=Alloc::Type::POSIXAlignedMalloc; + } + + return args; +} + void print_cmdline_usage(const std::string& prog) { std::fprintf(stderr, @@ -811,16 +831,16 @@ void print_cmdline_args(const struct linktest_args* args){ auto getMemoryBufferType = [args](){ switch(args->alloc_typ){ - case(AllocatorInvalid): - case(AllocatorDefault): + case(Alloc::Type::Invalid): + case(Alloc::Type::Default): return "Invalid"; - case(AllocatorAlignedMalloc): + case(Alloc::Type::AlignedMalloc): return "aligned_alloc"; - case(AllocatorPinnedMmap): + case(Alloc::Type::PinnedMmap): return "mmap"; - case(AllocatorPOSIXAlignedMalloc): + case(Alloc::Type::POSIXAlignedMalloc): return "posix_memalign"; - case(AllocatorCUDA): + case(Alloc::Type::CUDA): #if HAVE_VCLUSTER_CUDA == 1 return "CUDA"; #else @@ -853,6 +873,7 @@ void print_cmdline_args(const struct linktest_args* args){ std::printf("Combine tasks on nodes? %-s\n" ,getYesNo(args->do_group_processes_by_hostname)); std::printf("Additionally test all-to-all? %-s\n" ,getYesNo(args->do_alltoall)); std::printf("Use GPU memory? %-s\n" ,getYesNo(args->do_use_gpus)); + std::printf("Use GPU memory on tasks %-s\n" ,VectorBool::toString(args->use_gpus_on_task).c_str()); std::printf("Randomize test order? %-s\n" ,getYesNo(args->do_mix)); std::printf("Perform serial tests? %-s\n" ,getYesNo(args->do_serial)); std::printf("Maximum number of serial retests? %-" PRIu64 "\n" ,args->max_stest); diff --git a/benchmark/cmdline.h b/benchmark/cmdline.h index 1facf65035fd1c104b6560f3c952a70a176697cb..960360b0551c0610537f97ec8f8dfd653e89f4f1 100644 --- a/benchmark/cmdline.h +++ b/benchmark/cmdline.h @@ -11,7 +11,7 @@ #include <string> #include "vcluster.h" - +#include "memory.h" /* Command line arguments. Default values are specified * in the .c file. @@ -20,36 +20,37 @@ * get a pointer to the one instance of linktest_args. */ struct linktest_args { - bool special_args; - std::int8_t randomize_buffers; - std::int8_t check_buffers; - std::int8_t do_alltoall; - std::int8_t do_bidir; - std::int8_t do_unidir; - std::int8_t do_mix; - std::int8_t do_serial; - std::int8_t do_nosion; - std::int8_t do_sion_par; - std::int8_t do_use_gpus; - std::int8_t do_bisection; - std::int8_t use_multi_buf; - std::int8_t do_group_processes_by_hostname; - std::uint64_t num_msg; - std::uint64_t num_warmup_msg; - std::uint64_t len_msg; - std::uint64_t buf_mt_seed; - std::uint64_t num_multi_buf; - std::uint64_t num_randomize_tasks; - std::uint64_t seed_randomize_tasks; - std::uint64_t seed_randomize_steps; - std::uint64_t max_stest; - std::uint64_t min_iterations; - double min_walltime; + bool special_args; + std::int8_t randomize_buffers; + std::int8_t check_buffers; + std::int8_t do_alltoall; + std::int8_t do_bidir; + std::int8_t do_unidir; + std::int8_t do_mix; + std::int8_t do_serial; + std::int8_t do_nosion; + std::int8_t do_sion_par; + std::int8_t do_use_gpus; + std::int8_t do_bisection; + std::int8_t use_multi_buf; + std::int8_t do_group_processes_by_hostname; + std::uint64_t num_msg; + std::uint64_t num_warmup_msg; + std::uint64_t len_msg; + std::uint64_t buf_mt_seed; + std::uint64_t num_multi_buf; + std::uint64_t num_randomize_tasks; + std::uint64_t seed_randomize_tasks; + std::uint64_t seed_randomize_steps; + std::uint64_t max_stest; + std::uint64_t min_iterations; + double min_walltime; static const std::size_t VClusterImplmaxCharacters=16; - AllocatorType alloc_typ; - std::string virtual_cluster_implementation; - std::string memory_buffer_allocator; - std::string output; + Alloc::Type alloc_typ; + std::string virtual_cluster_implementation; + std::string memory_buffer_allocator; + std::vector<bool> use_gpus_on_task; + std::string output; }; /* Parse the command line arguments. This is usually only done by @@ -75,6 +76,9 @@ const struct linktest_args *bcast_cmdline_args(VirtualCluster* cl, int root, const struct linktest_args* args); +/* Set values that depend on the cluster rank */ +struct linktest_args *localize_cmdline_args(int rank, struct linktest_args* args); + /* Print the command line arguments. The function takes into account the * standard/global arguments (see struct linktest_args) as well as the * vcluster implementation specific arguments. diff --git a/benchmark/memory.cc b/benchmark/memory.cc index a9245b5ff0f1a533a5d10a1b175a212f0cc56450..8881eb4c5d6f5c2862b18bef105e8f6fc6d232b8 100644 --- a/benchmark/memory.cc +++ b/benchmark/memory.cc @@ -161,6 +161,18 @@ int MemoryBuffer::check(){ return SUCCESS; } +std::string Alloc::getName(Type alloc_t) { + switch(alloc_t) { + case(Type::Invalid): return "Alloc::Type::Invalid"; + case(Type::Default): return "Alloc::Type::Default"; + case(Type::AlignedMalloc): return "Alloc::Type::AlignedMalloc"; + case(Type::PinnedMmap): return "Alloc::Type::PinnedMmap"; + case(Type::POSIXAlignedMalloc): return "Alloc::Type::POSIXAlignedMalloc"; + case(Type::CUDA): return "Alloc::Type::CUDA"; + default: return "Unknown"; + } +} + AddressSpace::ID MallocAllocator::address_space_id() const{ return AddressSpace::ID::Local; } diff --git a/benchmark/memory.h b/benchmark/memory.h index 1e15a67bb1c5c11db4885a61079654abbfec0651..97ac96a0aeedaba01424f1923ed38b0b97fa33a5 100644 --- a/benchmark/memory.h +++ b/benchmark/memory.h @@ -13,6 +13,7 @@ #include "config.h" #include <cstdint> #include <unistd.h> +#include <string> #if HAVE_VCLUSTER_CUDA == 1 namespace linktest{ @@ -22,16 +23,18 @@ } } #endif - -enum AllocatorType : std::uint8_t{ - AllocatorInvalid =0, //Invalid Allocator - AllocatorDefault =1, //Default Allocator (determined from situation) - AllocatorAlignedMalloc =2, //Memory-aligned malloc Allocator - AllocatorPinnedMmap =3, //Pinned--memory-map Allocator - AllocatorPOSIXAlignedMalloc=4, //POSIX Memory-aligned malloc Allocator - AllocatorCUDA =5 //CUDA malloc Allocator -}; - +namespace Alloc{ + enum Type { + Invalid =0, + Default =1, + AlignedMalloc =2, + PinnedMmap =3, + POSIXAlignedMalloc=4, + CUDA =5 + }; + + std::string getName(Type alloc_t); +} namespace AddressSpace{ enum class ID{ Invalid = 0, diff --git a/benchmark/vcluster_ibverbs.cc b/benchmark/vcluster_ibverbs.cc index 5544cc16ee0217fe9ee17f4afed66da4d98d2310..b9711d90dfab4ad9aaceb45748c6fc41bbc0432a 100644 --- a/benchmark/vcluster_ibverbs.cc +++ b/benchmark/vcluster_ibverbs.cc @@ -495,7 +495,7 @@ constexpr int maybe_send_inline(const linktest::ibverbs::MemoryRegion* buf) return (AddressSpace::ID::Local == buf->address_space_id()) and (buf->len() <= LINKTEST_IBVERBS_MAX_INLINE_SZ_) ? IBV_SEND_INLINE : 0; #else - return SUCCESS; //TODO Check if return 0 or return SUCCESS is meant here + return 0; #endif } diff --git a/benchmark/vector_bool.cc b/benchmark/vector_bool.cc new file mode 100644 index 0000000000000000000000000000000000000000..5d0a4c500b0aa920d170c1d5d78d589672141aa5 --- /dev/null +++ b/benchmark/vector_bool.cc @@ -0,0 +1,41 @@ +/**************************************************************************** +** LinkTest ** +***************************************************************************** +** Copyright (c) 2008-2022 ** +** Forschungszentrum Juelich, Juelich Supercomputing Centre ** +** ** +** See the file COPYRIGHT in the package base directory for details ** +****************************************************************************/ +#include "vector_bool.h" +#include <sstream> +#include <ios> +#include<algorithm> + +std::string VectorBool::toString(const std::vector<bool> boolVec) { + std::stringstream ss; + ss << "["; + ss << std::boolalpha; + for(bool b: boolVec) { + ss << b << ","; + } + ss << "]"; + return ss.str(); +} + +std::vector<bool> VectorBool::fromString (const std::string str){ + if(str.front() != '[' || str.back() != ']') { + throw std::invalid_argument(str + " needs to be a list such as [] and [1,0,1,1]"); + } + std::stringstream values(str.substr(1, str.size() -1)); + std::string value; + std::vector<bool> res; + while(std::getline(values, value, ',')) + { + std::stringstream boolStr; + bool b; + boolStr << value; + boolStr >> b; + res.push_back(b); + } + return res; +} \ No newline at end of file diff --git a/benchmark/vector_bool.h b/benchmark/vector_bool.h new file mode 100644 index 0000000000000000000000000000000000000000..8354aed0fc2005af01870f18c1f2f3cc29b7d4e0 --- /dev/null +++ b/benchmark/vector_bool.h @@ -0,0 +1,20 @@ +/**************************************************************************** +** LinkTest ** +***************************************************************************** +** Copyright (c) 2008-2022 ** +** Forschungszentrum Juelich, Juelich Supercomputing Centre ** +** ** +** See the file COPYRIGHT in the package base directory for details ** +****************************************************************************/ +#ifndef LINKTEST_VECTOR_BOOL +#define LINKTEST_VECTOR_BOOL + +#include <vector> +#include <string> + +namespace VectorBool { +std::string toString(const std::vector<bool> boolVec); +std::vector<bool> fromString(const std::string str); +} + +#endif \ No newline at end of file diff --git a/test/CompileRunTest.xml b/test/CompileRunTest.xml index b34d5ff3a8fb376065e842076cfc45aee0be9fd2..c7379a19c340e8c8dc0615ec8ace3a213491a69c 100644 --- a/test/CompileRunTest.xml +++ b/test/CompileRunTest.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <jube> <parameterset name="Linktest_Args" init_with="Default.xml"> - <parameter name="Use_Gpu_Memory">0,1</parameter> + <parameter name="Additional_Arguments">--no-sion-file,--no-sion-file --use-gpu-memory</parameter> </parameterset> </jube> \ No newline at end of file diff --git a/test/Default.xml b/test/Default.xml index 670e41e2d1ea78fe50916d28c36fbca14dc1ddff..41a601730faa6fc1a9cdfbf3cf8e34521b75df6f 100644 --- a/test/Default.xml +++ b/test/Default.xml @@ -17,20 +17,8 @@ <parameter name="Message_Size">1024</parameter> <!-- 2^10 --> <parameter name="Number_Of_Slowest">2</parameter> <!-- -1 (default)--> <parameter name="Collect_P_Num">1</parameter> <!-- -1 (default)--> - <parameter name="All_To_All">0</parameter> <!--0 (default),1--> - <parameter name="Bidirectional">0</parameter> <!--0 (default),1--> - <parameter name="Unidirectional">0</parameter> <!--0 (default),1--> - <parameter name="Bisection">0</parameter> <!--0 (default),1--> - <parameter name="Serial">0</parameter> <!--0 (default),1--> - <parameter name="Mix">0</parameter> <!--0 (default),1--> - <parameter name="Serial_Tests">0</parameter> <!--0 (default),1--> - <parameter name="No_Sion_File">1</parameter> <!--0,1 (default)--> - <parameter name="Parallel_IO">0</parameter> <!--0 (default),1--> - <parameter name="Use_Gpu_Memory">0</parameter> <!--0 (default),1--> - <parameter name="Number_Of_Randomized_Tasks_Iterations">0</parameter> <!--0 (default),1--> - <parameter name="Group_Hostname">0</parameter> <!--0 (default),1--> - <parameter name="Additional_Arguments"></parameter> - <parameter name="WithGPUs">("${Messaging_Layer}" == "cuda" or ${Use_Gpu_Memory} == 1)</parameter> + <parameter name="Additional_Arguments">--no-sion-file</parameter> + <parameter name="WithGPUs" separator=";">("${Messaging_Layer}" == "cuda" or ("--use-gpu-memory" in "${Additional_Arguments}"))</parameter> </parameterset> <parameterset name="Environment"> <parameter name="DefaultCompiler">GCC</parameter> diff --git a/test/LinktestMain.xml b/test/LinktestMain.xml index 96bf4c2bcbc33008669ed2c87591d91dd6a33efa..c2817623ff020aeeec1ac0d492451639bfe3ce92 100644 --- a/test/LinktestMain.xml +++ b/test/LinktestMain.xml @@ -41,16 +41,6 @@ <sub source="§NUM_RANDOMIZE_TASKS§" dest="${Number_Of_Randomized_Tasks_Iterations}" /> <sub source="§NUM_SLOWEST§" dest="${Number_Of_Slowest}" /> <sub source="§COLLECTPNUM§" dest="${Collect_P_Num}" /> - <sub source="§ALL_TO_ALL§" dest="${All_To_All}" /> - <sub source="§BIDIR§" dest="${Bidirectional}" /> - <sub source="§UNIDIR§" dest="${Unidirectional}" /> - <sub source="§BISECT§" dest="${Bisection}" /> - <sub source="§MIX§" dest="${Mix}" /> - <sub source="§SERIAL_TESTS§" dest="${Serial_Tests}" /> - <sub source="§NO_SION_FILE§" dest="${No_Sion_File}" /> - <sub source="§PARALLEL_IO§" dest="${Parallel_IO}" /> - <sub source="§USE_GPU_MEMORY§" dest="${Use_Gpu_Memory}" /> - <sub source="§HOSTNAME_GROUPING§" dest="${Hostname_Grouping}" /> <sub source="§ADDITIONAL_ARGUMENTS§" dest="${Additional_Arguments}" /> <sub source="§REPORT_NAME§" dest="${Report_Name}" /> <sub source="§EXEC_BIN§" dest="${Linktest_Bin}" /> @@ -116,7 +106,7 @@ <do done_file="ready" error_file="error" tag="!dryRun">sbatch execute.sbatch</do> </step> - <step name="LinktestReportTest" procs="7" depend="ModeTest,CompileLinktestReport" active="$No_Sion_File == 0" suffix="${Mode}" tag="!(noLinktestReportTest|noModeTest)"> + <step name="LinktestReportTest" procs="7" depend="ModeTest,CompileLinktestReport" active="'--no-sion-file' in '$Additional_Arguments'" suffix="${Mode}" tag="!(noLinktestReportTest|noModeTest)"> <use>JUBE_Extra</use> <do done_file="ready" error_file="error" tag="!dryRun"> set -x diff --git a/test/ModeTest.xml b/test/ModeTest.xml index 98f2f509b79ae4bf994803041f1d20e36fbfd436..cd586e240c719fc31c8592b12e59c3c380c8d35a 100644 --- a/test/ModeTest.xml +++ b/test/ModeTest.xml @@ -1,15 +1,23 @@ <?xml version="1.0" encoding="UTF-8"?> <jube> <parameterset name="Linktest_Args" init_with="Default.xml"> - <parameter name="i" type="int">0,1,2,3,4,5,6,7,8,9,10</parameter> - <parameter name="All_To_All" mode="python" type="int">[0,1,0,0,0,0,0,0,0,0,0][$i]</parameter> - <parameter name="Bidirectional" mode="python" type="int">[0,0,1,0,0,0,0,0,0,0,0][$i]</parameter> - <parameter name="Bisection" mode="python" type="int">[0,0,0,1,0,0,0,0,1,0,0][$i]</parameter> - <parameter name="Number_Of_Randomized_Tasks_Iterations" mode="python" type="int">[0,0,0,0,4,0,0,0,0,1,0][$i]</parameter> - <parameter name="Unidirectional" mode="python" type="int">[0,0,0,0,0,1,0,0,0,0,0][$i]</parameter> - <parameter name="Use_Gpu_Memory" mode="python" type="int">[0,0,0,0,0,0,1,0,0,0,0][$i]</parameter> - <parameter name="Hostname_Grouping" mode="python" type="int">[0,0,0,0,0,0,0,1,1,1,0][$i]</parameter> - <parameter name="No_Sion_File" mode="python" type="int">[0,0,0,0,0,0,0,0,0,0,1][$i]</parameter> - <parameter name="Mode" mode="python">["Semidirektional","All to all","Bidirectional","Bisection","Randomized Semidirektional","Unidirectional","Use GPU Memory","Hostname Grouping","Hostname Bisection","Hostname Proc. Rand.","No SION"][$i]</parameter> + <parameter name="Additional_Arguments" separator=";">--all-to-all;--bidirectional;--unidirectional;--bisection;--group-processes-by-hostname;--bisection --group-processes-by-hostname;--randomize;--serial-tests;--no-sion-file;--parallel-sion-file;--use-gpu-memory;--use-gpu-memory --use-gpu-memory-on-task [1,1,0,0,1,1,0,0];--num-randomize-tasks 4</parameter> + <parameter name="Mode" mode="python"> + { + "--all-to-all": "All_to_All", + "--bidirectional": "Bidirectional", + "--unidirectional": "Unidirectional", + "--bisection": "Bisection", + "--group-processes-by-hostname": "Group_by_Hostname", + "--bisection --group-processes-by-hostname": "Bisection_by_Hostname", + "--randomize": "Randomize_Step_Order", + "--serial-tests": "Serial", + "--no-sion-file": "No_SION_File", + "--parallel-sion-file": "Parallel_SION_FIle", + "--use-gpu-memory": "Use_GPU_all", + "--use-gpu-memory --use-gpu-memory-on-task [1,1,0,0,1,1,0,0]": "Use_GPU_CPU_Mixed", + "--num-randomize-tasks 4": "Randomize_Task_Order_4_times", + }[ "${Additional_Arguments}" ] + </parameter> </parameterset> </jube> diff --git a/test/execute_base.sbatch b/test/execute_base.sbatch index c385780ae939202628531962d6d8464523d04c3c..b6b0261393667d5e27ff0577a271776c2074c234 100644 --- a/test/execute_base.sbatch +++ b/test/execute_base.sbatch @@ -11,53 +11,16 @@ §LOAD_MODULES§ -args="\ ---mode §MESSAGING_LAYER§ \ ---num-warmup-messages §NUM_WARM-UP_MESSAGES§ \ ---num-messages §NUM_MESSAGES§ \ ---size-messages §MESSAGE_SIZE§ \ ---num-slowest §NUM_SLOWEST§ \ ---output §REPORT_NAME§.sion \ -§ADDITIONAL_ARGUMENTS§" - -if [ §ALL_TO_ALL§ -ne 0 ]; then - args+=" --all-to-all" -fi -if [ §BIDIR§ -ne 0 ]; then - args+=" --bidirectional" -fi -if [ §UNIDIR§ -ne 0 ]; then - args+=" --unidirectional" -fi -if [ §BISECT§ -ne 0 ]; then - args+=" --bisection" -fi -if [ §MIX§ -ne 0 ]; then - args+=" --randomize" -fi -if [ §SERIAL_TESTS§ -ne 0 ]; then - args+=" --serial-tests" -fi -if [ §NO_SION_FILE§ -ne 0 ]; then - args+=" --no-sion-file" -fi -if [ §PARALLEL_IO§ -ne 0 ]; then - args+=" --parallel-sion-file" -fi -if [ §USE_GPU_MEMORY§ -ne 0 ]; then - args+=" --use-gpu-memory" -fi -if [ §NUM_RANDOMIZE_TASKS§ -ne 0 ]; then - args+=" --num-randomize-tasks §NUM_RANDOMIZE_TASKS§" -fi -if [ §HOSTNAME_GROUPING§ -ne 0 ]; then - args+=" --group-processes-by-hostname" -fi set -x # echos commands before executing -srun --ntasks=${SLURM_NTASKS} \ - §SRUN_ARGS§ \ +srun --ntasks=${SLURM_NTASKS} §SRUN_ARGS§ \ §EXEC_BIN§ \ - ${args}; + --mode §MESSAGING_LAYER§ \ + --num-warmup-messages §NUM_WARM-UP_MESSAGES§ \ + --num-messages §NUM_MESSAGES§ \ + --size-messages §MESSAGE_SIZE§ \ + --num-slowest §NUM_SLOWEST§ \ + --output §REPORT_NAME§.sion \ + §ADDITIONAL_ARGUMENTS§ # Indicate Success to jube if [ $? -ne 0 ]; then