Emmanuelle Saillard
email: emmanuelle.saillard@inria.fr

Marc Sergent
email: marc.sergent@atos.net

Célia Tassadit

Ait Kaci

Denis Barthou
email: denis.barthou@inria.fr

Static Local Concurrency Errors Detection in MPI-RMA Programs

Keywords: HPC, MPI, one-sided communication, static analysis

Communications are a critical part of HPC simulations, and one of the main focuses of application developers when scaling on supercomputers. While classical message passing (also called two-sided communications) is the dominant communication paradigm, one-sided communications are often praised to be efficient to overlap communications with computations, but challenging to program. Their usage is then generally abstracted through languages and memory abstractions to ease programming (e.g. PGAS). Therefore, little work has been done to help programmers use intermediate runtime layers, such as MPI-RMA, that is often reserved to expert programmers. Indeed, programming with MPI-RMA presents several challenges that require handling the asynchronous nature of one-sided communications to ensure the proper semantics of the program while ensuring its memory consistency. To help programmers detect memory errors such as race conditions as early as possible, this paper proposes a new static analysis of MPI-RMA codes that shows to the programmer the errors that can be detected at compile time. The detection is based on a novel local concurrency errors detection algorithm that tracks accesses through BFS searches on the Control Flow Graphs of a program. We show on several tests and an MPI-RMA variant of the GUPS benchmark that the static analysis allows to detect such errors on user codes. The error codes are integrated in the MPI Bugs Initiative opensource test suite.

I. INTRODUCTION

Communications are an essential part of HPC applications that run on supercomputers. Optimizing them and improving the overlap of communications with computations is thus of paramount importance. While two-sided communications, widely popularized by the MPI standard, is the dominant communication model, several applications use one-sided communications. Applications often use them through abstractions, such as PGAS languages, that hide the complexity of the handling of one-sided communications in terms of memory consistency and performance optimizations. However, even expert runtime programmers can face issues providing a support for such languages when using runtime systems that implement one-sided communications support. In particular, the programmer has to deal with complex synchronizations semantics that are needed to ensure the semantic and the memory consistency of the program. An example of such intermediate layer providing a support for one-sided communications is MPI Remote Memory Access (MPI-RMA), the one-sided communication interface of the MPI standard [START_REF]MPI: A Message-Passing Interface Standard Version 4[END_REF]. While MPI-RMA proposes a simple interface for one-sided communications (e.g. MPI_Put/Get and atomic operations), it also proposes several solutions to synchronize those communications through the concept of so-called MPI epochs. MPI epochs are delimited by specific synchronization calls, during when MPI-RMA operations can be submitted freely by the user and processed asynchronously by the MPI runtime. This behavior allows programmers to implement efficient communication/computation overlap strategies based on the asynchronous nature of MPI-RMA communications. At the end of an epoch, a synchronization of all pending communications occurs. An epoch is considered as finished only if all the MPI-RMA operations initiated or received during this epoch have been completed.

The synchronization semantics of MPI-RMA to begin and end MPI epochs can be divided in two categories. The first one, called Active Target, involves receiver processes in the synchronization. The synchronization models that implement it in MPI-RMA are called Fence, shown in Figure 1a, and PSCW (Post-Start-Complete-Wait), shown in Figure 1b. While some Active Target synchronization models, such as Fence, are easy to use as it is close to the well-known Barrier of MPI, which allows to easily change the communications of application codes based on Bulk Synchronous Parallel model (BSP [START_REF] Valiant | A bridging model for parallel computation[END_REF]) to MPI-RMA, it suffers the same scalability issues as BSPbased codes due to the over-synchronization of the processes. Moreover, it defeats the idea of asynchronous communications and synchronizations, which is the core idea of one-sided communications to achieve performance.

The second one, called Passive Target, does not involve receiver processes in the synchronization. The synchronization models that implement it in MPI-RMA are called Lock/Unlock, shown in Figure 1c, and Lock all/Unlock all, shown in Figure 1d. In this model, in-epoch synchronizations called Flush are also available to perform finer-grained synchronizations. This synchronization model gives more freedom to the programmer to implement its own synchronizations at receiver side, at the cost of handling the memory consistency of the program by itself. Thus, the performance improvement comes at the cost of harder programming. Especially, race conditions are harder to detect since there is no receiver side synchronizations available. In Figure 1 we can see examples of execution sequences of MPI-RMA operations in an epoch. However, as communications can happen at any time during an epoch, these operations may overlap with other memory operations, e.g. local load/store operations performed by the program. MPI-RMA asynchronous communications are characterized by three key properties, mandatory to overlap communications with computations efficiently but which requires complex handling when programming to ensure the memory consistency of the program.

The first property relates to completion of communications. The completion of MPI-RMA operations is not known during an epoch. For example, in Figure 2a, the Put from process

P0 P1 Fence Fence X 0 = 1 Load(X 1 ) X 1 = 0 Put(X 0 , X 1 ) X 1 = 1 X 1 = 0 (a) Completion P0 P1 Fence Fence X 0 = 1 Load(X 1 ) X 1 = 0 Put(X 0 , X 1 ) X 1 = 2 X 1 = 1 Y 0 = 2 Put(Y 0 , X 1 ) (b) Ordering P0 P1 Fence Fence X 0 = [1, 2]
Load(X 1 )

X 1 = [0, 0] Put(X 0 , X 1 ) X 1 = [1, 2] | [3, 4] | [1, 4] | [3, 2] X 2 = [3, 4] P2 Put(X 2 , X 1 )
(c) Atomicity Fig. [START_REF] Laurent | The MPI Bugs Initiative: a Framework for MPI Verification Tools Evaluation[END_REF]). Most of the literature study those errors through tracing and post-mortem analysis [START_REF] Chen | MC-Checker: Detecting Memory Consistency Errors in MPI One-Sided Applications[END_REF], [START_REF] Diep | MC-CChecker: A Clock-Based Approach to Detect Memory Consistency Errors in MPI One-Sided Applications[END_REF] To the best of our knowledge, only our previous work [START_REF] Aitkaci | Dynamic Data Race Detection for MPI-RMA Programs[END_REF] tackles the problem of memory consistency analysis at execution time. However, the dynamic analysis suffers from the scalability issue of such approaches. In this paper, we introduce a novel static analysis that enables programmers to detect memory consistency errors directly at compile time. While the dynamic analysis is exhaustive in terms of error detection, the static analysis will be limited to local concurrency errors. However, since the analysis is performed at compile time, it scales on large code bases and can be of use for production quality codes.

The paper is organized as follows: Section II discusses the related work. Section III introduces the problem statement and describes the static analysis algorithm. Section IV presents experimental results on micro-benchmarks and an MPI-RMA variant of the Giga Updates Per Second (GUPS) benchmark [START_REF]GUPS (Giga Updates Per Second)[END_REF]. Finally, conclusive remarks and future works are discussed in Section V.

II. RELATED WORK

There is a lack of studies to detect bugs in MPI-RMA programs [START_REF] Laurent | The MPI Bugs Initiative: a Framework for MPI Verification Tools Evaluation[END_REF]. From the well-known projects, ITAC [START_REF]Intel Trace Analyzer and Collector[END_REF] and MUST [START_REF] Hilbrich | MPI runtime error detection with MUST: advances in deadlock detection[END_REF] detect invalid parameters in MPI one-sided calls. In addition, these tools focus on revealing existing deadlocks in such programs. Model checking [START_REF] Pervez | Formal verification of programs that use MPI one-sided communication[END_REF] is another approach that also detects latent deadlocks in MPI one-sided programs. Scalasca [START_REF] Hermanns | Understanding the formation of wait states in applications with one-sided communication[END_REF] mainly identifies potential performance bottlenecks in MPI-RMA programs. It detects inefficient wait states and highlights errors root causes by providing useful information in order to diagnose the errors. Nonetheless, among the aforementioned methods and tools, none of them addresses memory consistency errors.

To the best of our knowledge, only the following tools can detect memory consistency errors (aka data races) in MPI-RMA programs. The work in [START_REF] Park | Detecting race conditions in one-sided communication of MPI programs[END_REF] resolves data races in MPI one-sided programs by leveraging mirror memory. This work misses errors as it does not consider load and store accesses. MC-CChecker [START_REF] Diep | MC-CChecker: A Clock-Based Approach to Detect Memory Consistency Errors in MPI One-Sided Applications[END_REF] and MC-Checker [START_REF] Chen | MC-Checker: Detecting Memory Consistency Errors in MPI One-Sided Applications[END_REF] both use a post-mortem analysis to detect data races. MC-Checker builds a DAG based on the happens-before relation to analyze the trace files. This analysis does not scale well. MC-CChecker improves MC-Checker analysis by taking full advantage of the encoded vector clock to replace the DAG. Both tools do not consider the MPI-3 specifications. RMA-Analyzer [START_REF] Aitkaci | Dynamic Data Race Detection for MPI-RMA Programs[END_REF] uses an on the fly dynamic analysis to detect data races between local and remote accesses which unlike our approach requires costly executions that may experience scalability issues. Nasty-MPI [START_REF] Kowalewski | Debugging latent synchronization errors in MPI-3 one-sided communication[END_REF] is another approach that relies on program profiling in order to address so-called synchronization errors in MPI-3 onesided applications. It dynamically intercepts RMA calls and reschedules them into pessimistic executions. This approach focuses on forcing synchronization errors rather than detecting them which is far different from our method.

While our work is related to the detection of race conditions in shared memory programs, its main difference resides in the handling of MPI-RMA specific synchronization semantics. Indeed, the data race condition problem in shared memory has been heavily addressed in the literature, but its handling is strongly linked to the synchronization model available to enforce the consistency between memory accesses. For pthreadbased programs, we can cite offset-span labelling of nodes [START_REF] Mellor-Crummey | On-the-fly detection of data races for programs with nested fork-join parallelism[END_REF] or lockset-based approaches [START_REF] Engler | RacerX: Effective, static detection of race conditions and deadlocks[END_REF]- [START_REF] Mellor-Crummey | Compile-time support for efficient data race detection in shared-memory parallel programs[END_REF]. Specific contributions have been made for OpenMP to take advantage of the OpenMP synchronization semantics to enhance the analysis. While most of the literature relies on dynamic analysis [START_REF] Atzeni | ARCHER: Effectively Spotting Data Races in Large OpenMP Applications[END_REF]- [START_REF] Gu | Dynamic Data Race Detection for OpenMP Programs[END_REF] due to the difficulty to assess the behavior of the OpenMP runtime statically, there are a few recent work on static analysis, such as LLOV [START_REF] Bora | Llov: A fast static data-race checker for openmp programs[END_REF] and OpenRACE [START_REF] Swain | OpenRace: An Open Source Framework for Statically Detecting Data Races[END_REF]. Since the data race detection algorithm is strongly related to the synchronization semantics that orders the memory accesses, our work differs from the state of the art by tackling the MPI-RMA specific synchronization modes to devise a detection algorithm adapted to the constraints of these semantics.

III. STATIC DETECTION OF LOCAL CONCURRENCY ERRORS A. Problem Statement

The goal of our static analysis is to detect all concurrency errors that can be detected at compile time. In this paper, we focus on all errors happening at the origin side of communications, where a program analysis coupled with an alias analysis is sufficient to find errors between overlapping accesses. Detecting errors at target side would be possible if the offset of the remote communication is completely known at compile time (in particular, if this offset is not dependent of the MPI rank), but this is out of the scope of this paper. To clearly state the errors that our static analysis can detect, we reuse the table presented in [START_REF] Aitkaci | Dynamic Data Race Detection for MPI-RMA Programs[END_REF] and keep only the accesses at origin side, which results in Table I. In this table, we suppose that memory accesses are performed on overlapping memory regions, and we show the compatibility of local load/store operations with local buffers of MPI-RMA communications. The table should be read as follows: the first access is read in row, the second in column.

Several examples of these concurrency situations are given in Figure 3. In Code 3a, the first and second accesses are both MPI-RMA Get accesses, thus write accesses in local memory, which is an error. In code 3f, the MPI-RMA Put is the first access and the store the second one, which is also an error (the PUT in the R row and the STORE in the last column in table I is not a permitted overlap). Indeed, since the completion of the Put is not known during an epoch, as shown previously on Figure 2a, the read access on the local buffer of the operation can happen at any time between the call by the user code and an MPI-RMA synchronization call that confirms completion of the operation. However, if the accesses were reversed -i.e. the store before the Put -there would be no errors, since the store would have completed before the beginning of the Put. There are several solutions to fix these errors. Figure 4 shows correct solutions of codes 3a and 3f, either by adding an in-epoch synchronization call like MPI_Win_flush in the case of 4a, or by ending the epoch and starting a new one to ensure all communications have ended in the case of 4b. On both of these codes, we note that the static analysis successfully identifies the codes as correct after such changes. Codes 3b, 3d, 3c and 3e show other incorrect scenarios of the table.

READ WRITE PUT LOAD GET STORE R PUT x x LOAD - - W GET x x x x STORE - -
Pi Win_lock_all Get(buf , target1, X) Get(buf , target2, X) Win_unlock_all (a) Code 1 Pi Win_fence Get(buf , target, X) ... = buf Win_fence (b) Code 2 Pi Win_lock_all Put(buf , target2, X) Get(buf , target1, X) Win_unlock_all (c) Code 3 Pi Win_Fence Get(buf , target1, X) Put(buf , target2 ,

B. Algorithm Description

To detect the errors presented in Table I we devised a local concurrency detection algorithm that takes place in the

Pi Win_lock_all Get(buf , target1, X) Win_flush(target1) Get(buf , target2, X) Win_unlock_all (a) Correction of code 1 Pi Win_fence Put(buf , target, X) Win_fence buf = ... Win_fence (b) Correction of code 6
Fig. 4: Correction of codes 1 (Fig. 3a) and 6 (Fig. 3f) presented in Figure 3 middle of the compilation chain. It consists in an analysis of the Control Flow Graph (CFG). The CFG is defined as a directed graph. Nodes are basic blocks that represent maximal sequence of linear code and contains a list of instructions. Edges represent the flow of control between the nodes.

Based on this structure, Algorithm 1 details the steps to detect local concurrency errors in a function. First, a breadthfirst search (BFS) is done on each loop of a function from the inner loops to the outer loops. Once a loop has been checked, the back edges are removed to avoid infinite loop during the BFS on an outer loop and the CFG. Finally a BFS is done on the entire CFG of a function. During the BFS, the memory accesses are spread between basic blocks (from a basic block to its successors). This is made by keeping a ValueMap containing (Value, Instruction) pairs where a value represents a memory access. Also, a basic block cannot be analyzed if all its predecessors have not been seen (function mustWait line 9 in Alg. 2). The BFS is described in Algorithm 2. The algorithm shows the BFS on a function but the principle is the same on loops. A coloring system is used during the graph traversal to identify unvisited nodes.

Algorithm 1 Local Concurrency Errors Detection

Require: CFG of function F 1: procedure DETECTION(Function F) 2:

for each Loop L in F from inner to outer loop do

3: BFS(L) (see Alg. 2) 4:
Remove back edges in L 5:

BFS(F) (see Alg. 2)

Algorithm 3 gives the analysis of a basic block. The algorithm iterates over the instructions of a basic block to find memory instructions (lines 2-3). A memory instruction is either a MPI_Put, MPI_Get, a LOAD or a STORE. When a memory instruction is found, we retrieve the memory location (line 4) and check if another access on this memory location has been recorded (line 5). Function find line 5 returns the previous memory access on locmem or a memory access that alias with it. If there is no previous access, we register it in MemInBB of the current basic block but only if it is a onesided operation (lines 6-7). We don't need to keep load/store instructions. If there is a previous access, two options arise. If the previous access or the new one is a write, we report an error (line 9-10). Otherwise, we update the last instruction accessing locmem if it is a Put (we don't register load instructions). for each Instruction I in BB do

C. Example

Figure 5 presents a CFG extracted from a benchmark computing a binary tree broadcast algorithm. This example contains a MPI_Get in a loop (node if.then9). Due to space limit, only relevant instructions are shown in the basic blocks. The algorithm first analyzes the loop {while.cond, while.body,if.then9, if.end11}. The BFS dates the memory accesses from the header of the loop (while.cond). MemInBB in the header is empty at the beginning of the BFS. The load instruction thus does not conflict with any other memory access. Nothing is registered when analyzing while.body. MemInBB is updated for if.then9 with the MPI_Get instruction and %9 which is the local memory location associated. When we encounter while.cond the second time, the load instruction is reported as conflicting with MPI_Get. MemInBB is updated for while.cond with the Get instruction. The algorithm then removes the back edge if.end11 → while.cond from the loop. A new BFS is performed on the entire CFG without the back edge. The loop is analyzed again to report concurrent accesses with the beginning of the graph if any. The Get function can conflict with itself at the second iteration of the loop. An error is then reported for that. No other local concurrency is detected.

D. Discussion

Algorithm 1 is correct if all local concurrency situations are captured. We consider only Put and Get operations as Accumulate operations can be considered as a Put at the origin side. The main constraint we have is that our analysis is intraprocedural and is thus limited to the scope of a function. An inter-procedural analysis is left for future work. We then assume that a function contains all memory information needed to detect a data race. As our goal is to detect local concurrency errors, we only need to record memory accesses in an epoch. The first BFS on all loops ensures the detection of concurrency errors inside them and set the memory accesses in the headers of the loops. Then, the BFS on the entire CFG takes into account another iteration in loops and finishes because back edges are removed. All basic blocks are encountered and thus we register all memory accesses in a function. The precision of the analysis is related to the alias analysis we use to detect aliasing. The alias analysis of LLVM is conservative and false positives are possible.

Algorithm 4 only detects local concurrency errors at the origin side of the communications. As a first step towards detecting errors that can occur at the target side of communications, algorithm 4 proposes a light analysis that detects concurrent accesses on a specific target. During the graph traversal (algorithms 1 and 2), we keep a list of one-sided communications per target(RemoteAccesses). Each time a communication is encountered, we retrieve the target and access type (write for a Put operation and read for a Get operation) and check if the communication will conflict with a previous operation (line 6 in alg. 4). The list of one-sided operations is reset for a specific target when a synchronization is found (i.e., MPI_Win_Flush and MPI_Win_Flush_local on target or MPI_Win_Flush_all). The algorithm enables the detection of errors presented on Figure 6. In these examples, a process Pi calls two one-sided operations on the same target. for each Instruction I in BB do To highlight the functionality of our analysis, we created a microbenchmark suite containing small programs with correct and incorrect use of MPI-RMA written in C and Fortran. The suite contains 34 codes in total. Table II shows a subset of the codes, the language in which they are written, if they contain a local concurrency error and if our analysis was able to detect the error. The names of the codes correspond to the order of the operations in the code. For example, ll_get_get is a code containing a Get operation followed by another Get operation. The first 12 codes represent all scenarios in Table I. The codes in the second part of the table are more complicated codes, such as codes with loops, and the correct codes of Figure 4. All small codes have been integrated in the MBI project [START_REF] Laurent | The MPI Bugs Initiative: a Framework for MPI Verification Tools Evaluation[END_REF], a collection of correct and incorrect MPI codes. They are available on Gitlab at https://gitlab.com/MpiBugsInitiative/MpiBugsInitiative. Our static analysis was able to detect all concurrency errors and does not report any false positives on the microbenchmark suite. An example of the feedback reported by our analysis is presented Figure 7. We used our analysis on an experimental code of around 3500 lines of codes, written in C++. The code is based on the Global Update RandomAccess benchmark (AKA GUPS) [START_REF]Randomaccess, hpc challenge benchmarks[END_REF], which updates memory at random locations according to a sequence of random numbers. The code we used is an MPI-RMA version of an existing code written in UPC++ [START_REF] Bachan | UPC++: A High-Performance Communication Framework for Asynchronous Computation[END_REF], obtained from the UPC++ website at upcxx.lbl.gov and was modified to (1) aggregate data to avoid overheads costs, (2) relax the look-ahead constraint and (3) to run deterministically.

A snippet of the code is presented in Figure 8. The code iterates over a set of batches of random numbers. Each number is routed to its corresponding target, but aggregated. Then aggregated random numbers are put to the memory of a remote rank. The code has been simplified to show only relevant instructions and the communication scheme.

Our analysis reports a local concurrency between MPI_Put line 21 and the store instructions * pa = A -1 and T[target * A + counter[targ]] = rans lines 19 and 12. This error happens because of the missing else statement in the conditional line 25. No flush is encountered if the conditional is false, which leads to a concurrency error at the second iteration of the for loop.

V. CONCLUSION

Communications are of paramount importance to achieve scalable performance on supercomputers. While two-sided communications is the dominant paradigm, one-sided communications have some traction in the community, especially through PGAS languages. However, it remains difficult for programmers to use directly runtime-level libraries that implements one-sided communications due to complex and errorprone memory semantics, that prevent them from obtaining the wanted performance gain. In this paper, we presented a novel static analysis that helps programmers debugging and understanding their MPI-RMA program. This static analysis is based on a local concurrency errors detection algorithm that performs a BFS search on the CFG of the program to tag all conflicting local memory accesses (loads, stores and local buffers of MPI-RMA operations) and reports a compiling error when an issue is identified. We implemented our method as an LLVM pass and showed on small tests and on an MPI-RMA version of the GUPS benchmark that our analysis can detect local concurrency errors on such codes.

We plan to associate the static analysis presented in this paper with our dynamic analysis presented in [START_REF] Aitkaci | Dynamic Data Race Detection for MPI-RMA Programs[END_REF]. Moreover, coupling both our static and dynamic analyses could reduce the overhead of the instrumentation of the dynamic analysis on load and store, thus making the whole error detection more scalable. Our analysis detects errors at the origin side and proposes a light detection of errors at the target side. Detecting precise errors at target side would be possible if the offset of the remote communication is completely known at compile time. This is left for future work.

There exist few applications using MPI one-sided communications today. We believe our effort will help developers in the future.

Fig. 1 :

 1 Fig. 1: Examples of use of MPI-RMA Active Target (a, b) and Passive Target (c, d) synchronization modes.

6 Fig. 3 :

 63 Fig. 3: Examples of local memory concurrency errors using passive and active target modes. Bold statements are conflicting memory accesses. X = Window location.

3 :

 3 if I is a memory instruction then 4: locmem ← getLocalMemAccess(I) 5: PrevAccess ← find(BB.MemInBB, locmem) 6: if !PrevAccess AND I is an MPI-RMA then 7: add (locmem,I) in BB.

Fig. 5 :Algorithm 4

 54 Fig.5: CFG from a benchmark computing a binary tree broadcast algorithm.

Fig. 6 :Fig. 7 :

 67 Fig. 6: Examples of local memory concurrency errors at the target side of communications

TABLE I :

 I Compatibility of RMA operations and local load/store accesses on the same address space. = overlapping is permitted, x=undefined behavior, overlapping is not permitted. R = READ, W = WRITE. The first access is read in row, the second in column.

1

  Window buffer upd 2 / * Create a 2D table T of size (nranks x A); * / 3 / * Create a table counter of size nranks; * /

	4
	5 for each batch {
	6	for each x in batch {
	7
	8	/ * ... * /
	9
	10	if (target!= myrank) {
	11	//Insert rans in T at the right target:
	12	T[target * A + counter[targ]] = rans;
	13
	14	/ * ... * /
	15
	16	if (counter[target] == A) {
	17	uint64 * pa = T + offset;
	18	/ * ... * /
	19	* pa = A -1;
	20	// Send the row in out buff table concerning
		target to target:
	21	MPI_Put(pa, A, MPI_UINT64_T, target, my_koff +
		n_buffered, A, MPI_UINT64_T, upd);
	22	// local_flush:
	23	if (isFlushMode())
	24	MPI_Win_flush(target, upd);
	25	else if (isFlushLocalMode() || isSrcComplete())
	26	MPI_Win_flush_local(target, upd);
	27
	28	}
	29	}else{
	30	/ * ... * /
	31	}
	32	}
	33	/ * Sending the remaining updates; * /
	34 }
		Fig. 8: Code snippet from an MPI-RMA version of GUPS
		Program Name	Language Local concurrency Detect?
		ll get get	C	yes	yes
		ll get store	C/Fortran	yes	yes
		ll get load	C/Fortran	yes	yes
		ll get put	C	yes	yes
		ll put get	C	yes	yes
		ll put store	C/Fortran	yes	yes
		ll put put	C	no	no
		ll put load	C/Fortran	no	no
		ll load get	C	no	no
		ll load put	C	no	no
		ll store get	C	no	no
		ll store put	C/Fortran	no	no
		ll load get loop	Fortran	yes	yes
		ll get get ok	C	no	no
		ll put store ok	C	no	no

TABLE II :

 II Results on our microbenchmark suite.

APPENDIX

A. Software availability and dependencies

The static analysis is available on Github at https://anonymous.4open.science/r/ MPILocalConcurrencyDetection-D375/README.md.

The source code of all small codes that implements the test cases of Table I is available in the repository and is integrated in the MPI Bugs Initiative. The GUPS code used in the evaluation section is available on demand. Note that the pass will be integrated in the PARCOACH 1 tool in the future. To build the static analysis, the needed pieces of software are:

• CMake ≥ 3.18;

• LLVM ≥ 9.0. To use the static analysis, the needed pieces of software are:

• LLVM ≥ 9.0; • An MPI-3 implementation that can use the Clang compiler of the LLVM software. For example, any Open MPI with the environment variable OMPI_CC=clang set will work on C codes. The static analysis can be used on C, C++ and Fortran codes. To be able to use the static analysis on Fortran codes, an LLVM-based toolchain that has a Fortran frontend compiler that can generate LLVM IR is needed, such as Classic Flang (https://github.com/flang-compiler/flang/wiki/ Building-Flang). Moreover, the MPI implementation must be built with this toolchain to have the Fortran modules of the MPI implementation built with LLVM. Exceptions in C++ are not supported by our analysis, we use the -fno-exceptions flag during compilation.

B. Building and Installing

Building the LLVM pass we made is done through a simple CMake workflow that can be launched as follows:

mkdir -p install build cd build/ cmake .. make && make install

If the build has ended successfully, the LLVM pass will be available to use as a library called analysis.so in the build/src directory.

C. Using the static analysis on code examples

To use the static analysis on an existing code, the typical user workflow is as follows:

1) Compile the MPI-RMA application with the LLVM pass that implements our static analysis, that will analyze all local and MPI-RMA memory accesses; 2) If the static analysis has not found any error, nothing is returned to the user. If there is an error, a user-friendly message is returned to the user so that it can identify the source of the memory consistency error;

1 PARCOACH is available on Github at https://github.com/parcoach/ parcoach 3) After fixing the MPI-RMA application, the cycle restarts until the static analysis returns without error. To analyze a program with the static analysis, all of its files must be passed through the LLVM pass. To do so, each source file must go through two additional steps:

1) Generate the LLVM bytecode of the file by specifying -c -emit-llvm to the compiler; 2) Apply the LLVM pass containing our static analysis with the opt -load tool to check the correctness of the code. An example of use and error message given by the static analysis is given in Figure 7.


domain: spi phys

text:
Impact of the Microwave Coupling Structure on an Electron-Cyclotron Resonance Thruster

Simon Peterschmitt * and Denis Packan † University of Paris-Saclay, F-91123 Palaiseau, France

The electron-cyclotron resonance thruster with magnetic nozzle relies on two successive energy transfer processes: first from electromagnetic energy to electron thermal energy, facilitated by a coupling structure; and second from electron thermal energy to ion directed kinetic energy, facilitated by a diverging magnetic field. The nature and geometry of the coupling structure are crucial to the first energy transfer process. This paper presents an experimental study of the performance of an electron-cyclotron resonance thruster with magnetic nozzle, equipped either with a waveguide-coupling structure or with a coaxial-coupling structure. The necessity of thrust balance measurements to perform such a comparison is demonstrated. The low coupling efficiency from microwave power to the plasma achieved by waveguide coupling is found to result in very large uncertainty with respect to the deposited power. A method to significantly reduce this uncertainty is proposed and implemented. Thrust balance measurements indicate 500 μN for the coaxial-coupled thruster and 240 μN for the waveguide-coupled thruster, both operated at 25 W of deposited microwave power and a mass flow rate of 98 μg∕s of xenon. Electrostatic probe measurements reveal that this difference can be explained by a difference in ion energy. The results emphasize the critical role of the coupling structure, which may have been previously overlooked. M ICROPROPULSION has been identified as one of the major technological challenges in the rapidly growing market for small satellites [START_REF] Wekerle | Status and Trends of Smallsats and Their Launch Vehicles-An Up-to-Date Review[END_REF]. Miniaturizations of mature technologies as well as innovative concepts have been proposed. Among those, the electroncyclotron resonance thruster (ECRT) with a magnetic nozzle appears as a potentially disruptive technology [START_REF] Packan | The MINOTOR H2020 Project for ECR Thruster Development[END_REF]. Compared to other technologies, this concept provides a simplification of the thruster system because it is neutralizerless and gridless and only requires one power supply. Therefore, it could lead to a robust, easy to operate, and lowcost propulsion system. The ECRT research is active on several fronts: thruster development [START_REF] Cannat | Optimization of a Coaxial Electron Cyclotron Resonance Plasma Thruster with an Analytical Model[END_REF][START_REF] Vialis | Direct Thrust Measurement of an Electron Cyclotron Resonance Plasma Thruster[END_REF], thruster system development [START_REF] Packan | MINOTOR: Magnetic Nozzle Electron Cyclotron Resonance Thruster[END_REF], diagnostics development [START_REF] Correyero | Characterization of Diamagnetism Inside an ECR Thruster with a Diamagnetic Loop[END_REF], and simulation [START_REF] Sanchez-Villar | PIC/Fluid/ Wave Simulation of the Plasma Discharge in an ECR Plasma Thruster[END_REF][START_REF] Porto | Full-PIC Simulation of an ECR Plasma Thruster with Magnetic Nozzle[END_REF].

Figure 1 is a schematic view of a typical implementation of the thruster described extensively elsewhere [START_REF] Vialis | Développement d'un Propulseur Plasma à Résonance Cyclotron Électronique Pour Les Satellites[END_REF]. It consists of a semiopen coaxial-coupling structure immersed in a static and divergent magnetic field, which is created by an annular permanent magnet. Xenon gas is injected at a typical flow rate of 98 μg∕s. Microwave power at 2.45 GHz is fed through a boron nitride "backplate" at the closed end of the coaxial structure. The typical power deposited in the plasma is 25 W, with a 90% coupling efficiency from the incident power to the plasma (i.e., 10% of reflected power). All the necessary power for ionization of the gas and heating of the electrons is provided by the absorption of microwave power in the interaction region. This region is characterized by the presence of an intense electromagnetic field and high neutral gas density, both strongly interacting with the plasma. Hot electrons expand in the magnetic nozzle, in particular using the well-known conversion from thermal energy to directed energy. The process creates a dc electric field in the magnetic nozzle, accelerating the ions and thus providing the thrust.

One of the challenges for the thruster development is to minimize erosion of the inner conductor of the coaxial-coupling structure and the associated material deposition, in particular, on the backplate. Awaveguide-coupling structure appears to be a possible way to circumvent this issue since no inner conductor is required in this case. Waveguide coupling for the ECRT has been studied in the past, and the measured performance was quite poor. Studies started in the 1960s with Gibbons and Miller [START_REF] Gibbons | Experiments with an Electron Cyclotron Resonance Plasma Accelerator[END_REF]. They demonstrated the thrust producing ability of their design and reported 80-90% coupling from the microwave energy to the plasma and 1% total efficiency. The argon plasma was created in a rectangular waveguide (72 × 34 mm) using 320 W input power at 2.45 GHz. Several designs were tested to explore the effect of injection, microwave frequency, input power, and geometry, but no configuration seemed to stand out [START_REF] Crimi | Investigation of a Microwave Generated Plasma in a Non-Uniform Magnetic Field[END_REF][START_REF] Crimi | Microwave Driven Magnetic Plasma Accelerator Studies (CYCLOPS)[END_REF] Later, in the 1990s, Sercel [START_REF] Sercel | An Experimental and Theoretical Study of the ECR Plasma Engine[END_REF] investigated the optimization of a plasma thruster using a circular waveguide of 128 mm in diameter, with typically 700 W input power at 2.12 GHz. Microwave coupling and total efficiency were similar to those from the 1960s work. All studies concluded that their waveguide-coupled ECRT prototype was far from achieving a total efficiency compatible with space propulsion requirements.

However, the recent expertise acquired using the coaxial ECRT casts doubts on the validity of these conclusions, for at least four reasons:

1) No direct thrust measurement was published from previous studies. Yet it is well known that the measurement procedure and data analysis used to estimate thrust from electrostatic probe measurement are specific to each thruster type [START_REF] Brown | Recommended Practice for Use of Faraday Probes in Electric Propulsion Testing[END_REF]. As illustrated in Sec. II of this work, this procedure and data analysis are still unclear for the ECRT; hence, large uncertainties exist for these indirect thrust measurements.

2) In previous waveguide-coupled ECRT studies, a critical lack of accuracy with respect to the deposited microwave power and the input gas flow rate complicates the assessment of performance.

3) It was shown repeatedly in recent work that a high facility pressure decreases the ECRT performance [START_REF] Vialis | Geometry Optimization and Effect of Gas Propellant in an Electron Cyclotron Resonance Plasma Thruster[END_REF][START_REF] Holste | Ion Thrusters and Electric Propulsion Developments-From Old Space to New Space[END_REF][START_REF] Wachs | Background Pressure Effects on Ion Dynamics in a Low-Power Magnetic Nozzle Thruster[END_REF]. Yet, the background pressure achievable in the facility used for this study is one order of magnitude below the background pressure reported by Sercel, for example [START_REF] Sercel | An Experimental and Theoretical Study of the ECR Plasma Engine[END_REF].

4) In all previous waveguide-coupled ECRT studies known to the authors, argon was used as propulsive gas, penalizing the performance in comparison with xenon. These elements justify the motivation to again investigate the waveguide-coupled ECRT and compare its performance with the coaxial-coupled ECRT.

Section II provides a brief description of the setup, including the thruster and diagnostics. Issues related to the estimate of thrust with electrostatic probe measurements of the ECRT are discussed, and the need for direct thrust measurement is emphasized. Section III focuses on microwave design and establishes that absolute measurement of microwave power in the context of ECRT testing can lead to very significant uncertainties. Solutions are proposed to reduce errors, in particular, a procedure to eliminate directivity errors in the case of low coupling. Such a procedure is necessary to estimate with reasonable uncertainty the power deposited in the waveguide-coupled thruster presented in this paper. Section IV presents the results of an experimental comparison between a waveguide-coupled thruster and a coaxial-coupled thruster. Thrust balance measurements are presented and analyzed in light of additional electrostatic probe measurements. Conclusions are presented in Sec. V.

II. Material and Methods

A. Thruster Design

The waveguide-coupled and coaxial-coupled thrusters to be compared were designed with the intention that they would differ only by the coupling, other things being equal. It should be noted that design compromises led to a coaxial thruster with nonoptimal features as far as performance is concerned, leading to suboptimal efficiencies [START_REF] Holste | Ion Thrusters and Electric Propulsion Developments-From Old Space to New Space[END_REF].

To benefit from data available in the literature for the coaxial configuration, the same outer conductor size was used; the waveguide thruster characterized in this work consists of a 27.5-mm-diameter and 20-mm-long waveguide-coupling structure. The microwave power is injected in this structure through a ceramic-filled coaxialto-waveguide coupler (Fig. 2) mounted to a permanent magnet. A material with high dielectric constant is required in order for the ∼2.45 GHz microwave to propagate in a structure of such diameter.

The inserted ceramic material (alumina) has been characterized using a dedicated test setup and has a relative permittivity ϵ 8.7-0.07j at the working temperature of the thruster, which is approximately 110°C. Given the significant absorption, and thus heat production, implied by the imaginary part of the permittivity, it is necessary to allow heat dissipation. A tight fastening of the dielectric material with the rest of the mechanical structure, ensuring appropriate thermal contact, is obtained with thermal shrink-fitting of the ceramic cylinder into the surrounding part (the thruster metallic structure), acting as a radiator. This design is chosen because it was previously observed that a loose fitting of the material results, in vacuum, in a thermally floating ceramic that rapidly increases in temperature.

The microwave power is fed through a rigid coaxial line. Careful microwave design enables transmission up to the back end of the plasma volume without wave reflection. Xenon gas is collected in a plenum supplied by the gas feed tube and injected through six injection holes distributed radially at the back end of the plasma volume. Gaskets ensure leak tightness.

B. Description of the Test Setup

The thrust balance used in this study was described extensively by Vialis et al. [START_REF] Vialis | Direct Thrust Measurement of an Electron Cyclotron Resonance Plasma Thruster[END_REF], and a schematic is reproduced in Fig. 3. The balance's vertical pendulum arm is held into position by a Proportionnal Integral Derivative (PID) controller. The sensor of the PID loop is a capacitive sensor measuring the movement of the pendulum arm, and the actuator is a fixed coil acting on magnets attached to the pendulum arm. Before each test, a calibration procedure determines the relation between the output voltage of the PID controller and the torque exerted on the arm of the balance. Known torques can be applied by laying down known masses at known positions on a horizontal calibration arm attached to the pendulum arm. A specific vacuumcompatible and nonmagnetic translation stage is used to lay five calibration masses one by one and pick them up. The use of several masses enables one to verify that the output voltage of the PID controller is proportional to the exerted torque. The relative uncertainty in the measured thrust decreases with thrust and is less than 10% for thrusts greater than 300 μN. In this range, the main contribution to the uncertainty in thrust originates from the uncertainty in the position of the calibration masses with respect to the axis of rotation of the pendulum arm [START_REF] Vialis | Développement d'un Propulseur Plasma à Résonance Cyclotron Électronique Pour Les Satellites[END_REF].

Figure 4 is a photograph of the waveguide thruster mounted on the thrust balance and equipped with a coaxial-to-waveguide transition. A pair of coaxial-to-waveguide transitions facing each other and separated by a 2 mm gap achieves excellent transmission of the microwave power without any mechanical contact. One is placed on the balance pendulum arm, and the other is stationary. Therefore, microwave power transmission and free movement of the balance arm are achieved simultaneously [START_REF] Peterschmitt | Waveguide Microwave Coupling to a Magnetic Nozzle ECR Thruster[END_REF].

The thruster is equipped with temperature probes, and its floating potential is measured. Experiments were performed in the B61 facility at ONERA. This facility is 4 m long and 1 m in diameter. It is equipped with a pumping capacity on xenon of approximately 8000 L∕s. The base pressure is approximately 8 × 10 -7 mbar, and the working pressure is approximately 9 × 10 -6 mbar.

Two electrostatic probes are mounted on a rotation stage 26.5 cm from the exit plane of the thruster (Figs. 5 and6). The gridded Faraday probe is a simplified retarding potential analyzer consisting of a collector biased at a chosen potential preceded by a grid at a floating potential. This grid screens the collector electrode, thus preventing a sheath expansion outside the probe. Otherwise, the probe would draw an increasing electron current when the collector voltage is swept to highly positive values (with respect to facility walls). Since the energy distribution of electrons is well separated from that of the ions at most angular locations in the plume, this simple device is able to provide an estimate of the ion energy distribution function around the most probable ion energy (i.e., no electron current is drawn at a collector potential close to the most probable ion energy). A commercial Hiden mass spectrometer and an ion analyzer are also used. It provides a more complete and accurate measurement of the ion energy distribution function but only for ions traveling along the axis of the thruster. The relative uncertainty in the ion energy may be 4%, and hence 2% in the ion velocity.

The gridded Faraday cup is able to measure an ion current density. However, because of uncertainties related to the grid (transparency and secondary emission), a Faraday probe with a guard ring is preferred to measure ion current density. It is designed and operated according to recommended practices in the propulsion community [START_REF] Brown | Recommended Practice for Use of Faraday Probes in Electric Propulsion Testing[END_REF]. The collected current is recorded while the molybdenum collector and guard ring are held at the same negative potential, typically -200 V, in order to repel all electrons and collect only ions. The presence of the guard ring ensures flat equipotential surfaces in front of the probe in order to avoid collection of ion current through an effective surface wider than the collector surface. The guard ring is 5 cm in diameter.

The collected current is determined by measuring the voltage across a shunt resistor. The relative uncertainty in the collected current is therefore negligible for our purposes (less than 10 -3 ). However, whether this collected current divided by the collector diameter can be interpreted as the current density that would exist in the absence of the probe is a difficult question. Uncertainties originating from the features of the probe (for example, collector surface contamination) are difficult to estimate but may be approximately 5% for this probe design [START_REF] Brown | Recommended Practice for Use of Faraday Probes in Electric Propulsion Testing[END_REF]. It should also be noted that, given the peculiar static magnetic field and (charge separation) electric field that exist in the plume, it is difficult to rule out the possibility of an unwanted interaction between the plasma and the probe that would further increase the uncertainty. The uncertainty in the angular location of the probe is considered negligible for our purposes.

C. Estimate of Thrust from Electrostatic Probe Measurement

A typical ion current density profile for coaxial coupling is shown in Fig. 7. It is measured to be axially symmetric and strongly depends on the imposed magnetic field, indicating the critical effect of the magnetic field on the plasma expanding outside the material structure of the thruster. In the case of Fig. 7, it has a half-width at half Fig. 4 Waveguide-coupled thruster on the thrust balance. The wide cylinder labeled "coaxial-to-waveguide transition" is not part of the thruster but rather is designed for testing on the thrust balance. It enables microwave feeding without mechanical coupling of the balance arm. maximum of 17 deg. The local minimum in the center is interpreted as a reduced plasma flux in the magnetic field tube intercepted by the inner conductor. It is believed that the value of the local minimum is however non-zero because of diffusion across magnetic field lines occurring between the thruster and the location of the measurement.

Assuming 1) axial symmetry of the plume, 2) purely radial ion current (i.e., reaching the probe at normal incidence at every φ angular position of the probe), 3) detachment from the magnetic field at the location of the measurement, and 4) nonperturbation of the thruster by the presence of the probe, the total ion current J tot and thrust T can be estimated from the angular profile of the ion current density and from the mean ion velocity as

J tot πL 2 Z Jφj sinφj dφ T πL 2 M e Z vφj sinφj cosφ dφ
where M is the ion mass, e is the elementary charge, L is the distance between the probe and the center of rotation of the arm that is moving the probe, φ is the angle of rotation of the probe (Fig. 6), and J and v are, respectively, the angular density of the ion current and the ion velocity.

It is found that integration over an angular range of -90; 90 deg consistently overestimates thrust with respect to what is measured by the thrust balance by a 20-80% factor, dependent on the thruster configuration. In the case of the profile presented in Fig. 7, the integration yields 820 μN, whereas 460 μN is measured with the thrust balance. Such a discrepancy is far beyond the 10-20% error reported between direct thrust measurement and estimation with electrostatic probes, for example, on miniature Hall effect thrusters [START_REF] Mazouffre | Characterization of Miniature Hall Thruster Plume in the 50-200 W Power Range[END_REF].

In Eqs. ( 1) and ( 2), integration should be performed over a closed contour around the thruster. However, this is extremely difficult for practical reasons related to the experimental setup. Therefore, we make the additional assumption that the ion momentum flowing through the dashed horizontal line in Fig. 6 is negligible, and perform the integration for φ in -90; 90 deg. The reason for the discrepancy could be that any of the aforementioned assumptions is not satisfied, except for assumption 1, which has been verified. The other assumptions are more difficult to verify. Two main issues have been identified. First, it is still unclear how the measured current density at large angles (and beyond 90 deg) should be treated. At such angles, the direction of the current is completely unknown (which challenges assumption 2). Second, the electrostatic probe is strongly suspected to perturb the plasma, challenging assumption 4. Indeed, its collector and guard ring intercept magnetic field lines that come out from the thruster. By imposing a highly negative bias voltage, the probe creates a potential barrier, confining electrons that would have otherwise escaped from the effective potential well of the thruster [START_REF] Peterschmitt | A Diffusion Model in Velocity Space to Describe the Electron Dynamics in an ECR Plasma Thruster with Magnetic Nozzle[END_REF]. This increased confinement results in a change of the electron energy distribution in the magnetic field tube intercepted by the probe.

Therefore, as long as a proper test approach and data analysis do not exist for magnetic nozzle thrusters, a thrust balance measurement is necessary to perform a true measurement of thrust as well as to conduct a relevant comparison between thruster configurations. It is all the more necessary if the thrusters produce distinct ion current density angular profiles, which is the case for the thrusters studied in this work.

III. Measurement of the Deposited Microwave Power A. Problem Statement

The power efficiency of the propulsive system as a whole is the product of three factors that should be evaluated separately: the efficiency of the microwave generator, the coupling efficiency, and the power efficiency of the plasma system. The first is clearly outside the scope of this paper and will not be measured; it is the subject of dedicated studies [START_REF] Packan | The MINOTOR H2020 Project for ECR Thruster Development[END_REF].

The second will be measured, but it does not appear to be a critical issue because microwave engineering techniques exist for impedance matching (the use of "stubs," for example) that can result in a high coupling efficiency; these techniques were not implemented in this work for simplicity. Moreover, the coupling efficiency obtained for the specific waveguide-coupled thruster tested in this work is probably in large part due to the small size of the coupling structure, which makes the use of the dielectric (with losses) mandatory. This small size was only chosen so that it would be the same as that of the existing coaxial-coupled thruster recently described in the literature, as mentioned in Sec. II.A. Using a larger coupling structure tailored to the vacuum wavelength would have avoided the use of a dielectric altogether, and the coupling would have been higher (as reported in the literature).

We therefore focus on the third factor: the power efficiency of the plasma system, which is the fraction of the power deposited in the plasma that is converted into kinetic power. To this end, accurate measurement of the microwave power deposited in the thruster is critical. Yet it is a challenging issue at the power level used in this experiment. Although accurate microwave measurement devices are available at low power, the measurement of powers of a few tens of watts to a few hundreds of watts is impaired by the strong nonideality of microwave components in this range of power. In the studies from the 1960s and 1990s, no reliable microwave measurement was performed. Crimi [START_REF] Crimi | Investigation of a Microwave Generated Plasma in a Non-Uniform Magnetic Field[END_REF] is critical about the microwave components used in his experiments, in particular, the polarizer, and Sercel [START_REF] Sercel | An Experimental and Theoretical Study of the ECR Plasma Engine[END_REF] acknowledges that the microwave diagnostics were not adequate to measure the thruster coupling, which is defined as the ratio of the power deposited in the plasma to the incident power. Later studies [START_REF] Vialis | Développement d'un Propulseur Plasma à Résonance Cyclotron Électronique Pour Les Satellites[END_REF][START_REF] Cannat | Caractérisation et Modélisation d'un Propulseur Plasma à Résonance Cyclotronique des Electrons[END_REF] measured the deposited power more accurately using a welldescribed setup but overlooked the strong nonideality of bidirectional couplers and the perturbation to the measurement by unwanted discharges occurring in the vacuum part of the circuit. The goal of this section is to provide an assessment of the uncertainty about the power deposited in the plasma and to describe the solutions implemented to tackle the issues posed by this measurement.

A schematic view of the microwave circuit used in this study can be found in Fig. 8. It can be broken down into three stages: power generation, power measurement, and the in-vacuum transmission stage. It is mainly composed of coaxial components with N-type connectors. It includes, from left to right, a Vaunix Lab Brick LMS-402D signal generator, a Microwave Amps AM3-1-4-50-50R amplifier, a custom-made filter to eliminate harmonics, a pair of ATM CHP274-30F-30R dual-directional couplers mounted with LadyBug LB478A power sensors, an Inmet TN020F-100W 50 Ω load, an RFCR6801 circulator, a Vacom N-to-N feedthrough, a low-loss coaxial line made with a Cables & Connectiques CFP15 cable, and a pair of custom-made waveguides, one of them connected to the thruster by a rigid custom-made coaxial line.

B. Directivity Error

A bidirectional coupler is a four-port passive microwave component diverting a small, known fraction of the incident and reflected power from the main line to the respective coupled ports [START_REF] Pozar | Microwave Engineering[END_REF]. The ratio of the sampled power to the power flowing in the main line is called the coupling and is typically -30 dB. With this quantity known, the power flowing through the main line can be calculated from measurement of the sampled power. However, a fraction of the incident power (typically -50 dB) is coupled to the reflected sampling port and vice versa, creating interferences between microwaves that result in erroneous measurement. This phenomenon is known as directivity error. If the ports are numbered as in Fig. 9, directivity in decibels (dB) is defined as D I 20 log jS13∕S14j for the measurement of a wave propagating to the right (incident) and D R 20 log jS24∕S23j for the measurement of a wave propagating to the left (reflected) [START_REF] Pozar | Microwave Engineering[END_REF]. In the following, D I D R D.

The interaction of signals due to the directivity defect results in a perturbed reflected power measurement:

P measured R P true R DP true I 2 P true R q DP true I q cosϕ ( 1
)
with P measured R the measured reflected power, P true R and P true I the true incident and reflected powers, and ϕ the phase shift between the coupled incident and reflected wave, which depends on the location of the reflection on the microwave line and the phase difference introduced by the reflection. Here, we assumed that the different signals are coherent and thus result in constructive or destructive interferences (which was verified experimentally by observing the effect of the changing phase shift when the coaxial cable length is modified). The absolute error on the reflected power is P measured R -P true R . Let us define ΔP R as this difference in the worst case, which is when the two interfering coupled waves have a phase shift ϕ of 0 or 180 deg:

ΔP R P true R q DP true I q 2 -P true R (2)
Hence,

ΔP R P true R 0 @ D P true I P true R 2 D P true I P true R s 1 A ( 3
)
Figure 10 is a plot of ∂P R ∕P true R as a function of P true R ∕P true I . For a given true reflected power fraction, it represents the range (relative to) P true R in which measurements can be found. For example, for a reflected fraction of 10% (a typical order of magnitude in our experiments), the measured reflected power can be anywhere between -40 and 50% of the actual reflected power, depending on the phase of the interacting waves. Such a large effect is counterintuitive, as it stands in contrast with the 23 dB (∼0.5%) directivity defect causing it, and thus can be erroneously overlooked. To decrease directivity errors, the power measurement stage includes two couplers and a circulator (Fig. 8) instead of a single bidirectional coupler as in previous studies [START_REF] Vialis | Développement d'un Propulseur Plasma à Résonance Cyclotron Électronique Pour Les Satellites[END_REF]. The circulator provides an additional isolation of 23 dB of the sampled incident power from erroneously coupled reflected power, effectively increasing the directivity to 46 dB. However, no improvement is expected from this setup for reflected power measurement.

C. Uncertainty in the Power Deposited in the Thruster

The power deposited in the thruster is defined as

P D ≔ γP I - P R γ (4)
with γ the transmission coefficient of the microwave line, from the output of the measurement device to the thruster; and P I and P R the incident and reflected power measured at the measurement device, respectively. Error on P D can stem from each of the three variables of the expression. In the next paragraph, we will quantify Δγ, ΔP I , and ΔP R , which are the positive worst case absolute error on γ, P I , and P R .

The transmission coefficient γ can be subject to random fluctuations due to unwanted discharges appearing in the vacuum stage, in particular, in the N-type connectors. This uncertainty was eliminated by the implementation of a custom microwave line with no connectors, except at the feedthrough. Therefore, this phenomenon no longer contributes to Δγ. However, the measurement of γ is subject to uncertainties related on one hand to possible movement of the microwave cables and components occurring between the measurement of γ (calibration) and the operation of the thruster, and on the other hand to the uncertainty of the vector network analyzer used to make the measurement. Overall, the relative uncertainty on γ is estimated to be Δγ∕γ 5%. The dominant source of error on P R is the directivity error, depending on the fraction of reflected power as exposed in Sec. III.B:

ΔP R DP true I 2 DP true I P true R q (5)
For P I in contrast, because of the use of a circulator (see Sec. III.B), the directivity error is negligible. There are two major sources of error on P I which are the uncertainty over the coupling factor of the coupler and the uncertainty of the microwave power meter (in the range of power of interest). They are estimated to be 2.3% and 1.95% respectively. Thus ΔP I ∕P I 4.25%.

Since the remaining errors on γ; P I , and P R are systematic errors (i.e., if the measurement is repeated, the same result is obtained), error on P D may be written with the following "pessimistic form" [START_REF] Baird | Experimentation: An Introduction to Measurement Theory and Experiment Design[END_REF]:

ΔP D ∂P D ∂γ Δγ ∂P D ∂P I ΔP I ∂P D ∂P R ΔP R (6)
Hence, It is apparent that a small fraction of reflected power is advantageous if one is to make accurate measurement of the power deposited in the plasma; the relative error in the deposited power increases as the reflected power fraction increases and is about 100 for 50% reflected power in this case. This is a serious issue, particularly for the waveguide-coupled thruster, which exhibits large reflected power fractions. For the coaxial thruster, with a typical measured reflected power of 10%, the uncertainty on P D is 20%.

ΔP D P I 1 1 γ 2 P R P I Δγ γ ΔP I 1 γ ΔP R (7)
D. Solution to Directivity Errors for Fractions of Reflected Power Above 0.1

Since no significant reflection is observed when calibrating the microwave line, the fraction of reflected power at the thruster is

R ≔ 1 γ 2 P R P I ( 8
)
where P I and P R are measured at the coupler. With the waveguidecoupled thruster, R 0.4 is observed at typical set points. It is likely that the relatively poor thruster-coupling results from the dimension of the waveguide-coupling structure imposed by this comparison work (see Sec. II.A) and is not a general feature of waveguide coupling. Indeed, at the frequency of operation (2.45 GHz), an empty 27.5-mm-diameter circular waveguide does not have propagating modes, contrary to the waveguide used in the experiment of Gibbons and Miller [START_REF] Gibbons | Experiments with an Electron Cyclotron Resonance Plasma Accelerator[END_REF], for example. A coupling of 80-90% was reported in this case, at the same frequency. R 0.4 results in an unacceptably high uncertainty on the power deposited in the plasma. However, a large fraction of this uncertainty originates from a systematic directivity error in P R that can be eliminated, provided that the phase shift ϕ from Eq. ( 1) is known. Yet, since the microwave line has been shown to produce negligible reflection without plasma, it may be assumed that the reflection while the thruster is operating takes place at the interface between the backplate and the plasma. It is possible to impose R 1 at this precise location by short-circuiting the microwave circuit with a metallic plate. The reflected power is then measured both at operating power with the coupler setup and at low power with a vector network analyzer (VNA), a device with a directivity sufficient to allow one to neglect directivity errors (Fig. 12). Neglecting also the directivity error on the incident power (see Sec. III.B) and under the usual assumption that the behavior of the microwave line is unaffected by the level of power, cosϕ is retrieved using the following relation derived from Eq. (1):

P measured R P true I P true R P true I D 2
D P true R P true I s cosϕ (9)
The power fractions are provided by the coupler setup for the lefthand side and by the VNA for the right-hand side. The knowledge of cosϕ enables one to debias the reflection measurements with plasma, thus making more accurate measurements.

IV. Comparison of Experimental Results

The two thrusters compared in this section are identical except for the use of circular-waveguide or coaxial-coupling structures, excited with the Transverse Electric 11 (TE11) mode or Transverse Electro Magnetic (TEM) mode, respectively. Consequently, the backplate material is alumina (imposed by the coupling structure) in the case of waveguide coupling and boron nitride in the case of coaxial coupling. All other features are identical, in particular, the magnetic field, the gas injection, and the geometry and material of the coupling structure in contact with the plasma. Xenon gas is used in all tests.

Both thrusters ignite easily as long as a puff of gas is provided at startup. For the waveguide-coupled thruster, thermal equilibrium is reached when the temperature reaches approximately 110°C after approximately 90 min of operation at 98 μg∕s and 52 W of power deposited in the plasma. The frequency of the microwave power is experimentally tuned to 2.25 GHz in order to minimize reflected power. During operation of the thruster, the pressure in the vacuum tank is approximately 6 × 10 -6 mbar. For the coaxial-coupled thruster, the fraction of reflected power at the thruster is less than R 0.1, whereas for the waveguide-coupled thruster it can be up to 0.4. Therefore, for the latter, the procedure described in Sec. III.D was used to calculate the power deposited in the plasma and the error bars.

A. Comparison of the Performance Using Thrust Balance Measurement

The thrust obtained by thrust balance measurement is shown in Fig. 13. The two types of coupling are associated with distinct slopes in this graph. At 25 W and 98 μg∕s of xenon, the coaxial-coupled system provides 500 μN of thrust, whereas the waveguide-coupled system provides 240 μN of thrust, corresponding to total efficiencies of 5 and 1% and specific impulses of 520 and 250 s, respectively. Since thrust is expected to scale as the square root of mean ion energy, this difference is almost fully explained by the difference in mean ion energy: 190 and 65 eV, respectively, as can be interpolated from the data presented in Fig. 14 (this corresponds to ion velocities of 17 and 10 km∕s, respectively). Although no previous direct thrust measurement data are available, several experiments previously measured mean ion energies. Figure 15 displays data from the literature as well as measurements from this study. The set of data taken from coaxial thrusters exhibits a linear increase in energy with a slope that is higher than that obtained from the waveguide thrusters. This plot suggests an intrinsic difference between waveguide-coupled and coaxial-coupled thrusters, regardless of the details of the design. The measurement of mean ion energy is a basic measurement that appears quite insensitive to experimental perturbation. However, interpretation of these data should be tempered by the fact that the background pressure has certainly lowered the ion energies measured by Sercel [START_REF] Sercel | An Experimental and Theoretical Study of the ECR Plasma Engine[END_REF], who reports a background pressure of 6 × 10 -5 mbar. The experiment of Crimi [START_REF] Crimi | Investigation of a Microwave Generated Plasma in a Non-Uniform Magnetic Field[END_REF], on the other hand, was reportedly run at a background pressure of 5 × 10 -6 mbar, the same as for coaxial-coupling experiments presented in Fig. 15.

B. Compared Characteristics of the Plume Using Circular Faraday Probe Scans

To further the analysis beyond the integrated thrust, the distribution of ion current density in the plume is analyzed. Figure 16 is a plot of ion current density measured on the waveguide-coupled thruster, with the setup described in Sec. II.B. The total integrated current is monotonically increasing with flow rate. Nevertheless, the ion current density on the axis is not. It is quite remarkable that a variety of profiles are observed depending on the flow rate. In contrast, for the coaxial-coupled thruster, the profiles at different set points are proportional (i.e., can be superposed by applying a multiplying factor on the y axis), as is apparent in Fig. 17 for a number of set points. The change in the angular position of the central depression of the profiles may simply be a consequence of small movement of the inner conductor. The variety of profiles observed for the waveguide coupling may be correlated to the variety of electromagnetic modes that can be accommodated by waveguides, whereas the coaxial structure, which imposes more constraining boundary conditions, only has propagating solutions for the TEM mode, unless excited at very high frequencies [START_REF] Pozar | Microwave Engineering[END_REF].

The measured angular profiles are significantly broader for the waveguide-coupled system. The calculation of integrated quantities such as the divergence efficiency or the mass efficiency would be interesting to quantify the consequences of increased spread of the current on performance. Yet it would probably be inaccurate because of the ion current measurement issues pointed out in Sec. II.C. In particular, faulty ion current measurement at a large angle could induce a large error on these integrated quantities. Thus, the analysis is restricted to the thrust angular density, defined as the contribution to thrust from the ion momentum in φ; φ dφ. This interval in φ represents an axisymmetric ring on a sphere centered on the thruster. The thrust angular density in μN∕rad is proportional to vφJφj sinφj cosφ. In the case of the waveguide-coupled thruster, thrust receives a greater contribution from large angles. For both thrusters, the maximum thrust density lies between 10 and 15 deg (Fig. 18).

For the coaxial-coupled thruster, when the bias voltage of the probe is increased, local minima appear in the angular current density scan about φ 5 deg (Fig. 19). This is interpreted as a highenergy conical electron beam partially canceling out the ion current. Under the assumption that diffusion across magnetic field lines is sufficiently low, this population originates from the periphery of the inner conductor and appears because of locally intense heating, as indicated by self-consistent electromagnetic simulation of this system [START_REF] Sanchez-Villar | PIC/Fluid/ Wave Simulation of the Plasma Discharge in an ECR Plasma Thruster[END_REF]. The electrostatic sheath potential in the vicinity of the (floating) inner conductor and secondary electron emission at the surface may also play a role in this phenomenon. This high-energy electron beam is specific to the coaxial coupling, and no local minimum is observed for the waveguide-coupled thruster when increasing bias voltage of the probe up to -25 V. This phenomenon may be part of the explanation for the aforementioned discrepancy in mean ion energy and also thruster floating potential: 15 and 130 V for the waveguide and coaxial coupling, respectively, at 98 μg∕s and 25 W. It is hypothesized that these high-energy electrons are responsible for building up the plasma potential in the coupling structure (and consequently thruster potential) in a similar way as high-energy electrons would build up a high sheath potential drop. Ions therefore have higher energy because they are created in a higher plasma potential. Unfortunately, no self-consistent heating simulation is known to the authors in the case of waveguide coupling. However, such simulation for the coaxial system has shown that the electromagnetic profile shares common features with that which exists in the absence of plasma [START_REF] Sanchez-Villar | PIC/Fluid/ Wave Simulation of the Plasma Discharge in an ECR Plasma Thruster[END_REF]. For the sake of argument, we may therefore assume the same for the waveguide system. Vacuum circular waveguide modes are proportional to Bessel functions of the first kind instead of multiplicative inverse functions for coaxial geometry [START_REF] Pozar | Microwave Engineering[END_REF]. Waveguide modes are therefore more spatially homogeneous, without strong local maxima. This may result in an electron energy distribution function having the same mean energy as that created by coaxial coupling (since the same power is deposited) but deprived of the high-energy component only created in the presence of an intense electric field. This distribution therefore only builds up a significantly smaller accelerating potential. Electron energy distributions for both systems could still achieve similar ion flow, since ionization cross section varies only moderately between 30 and 120 eV.

These results call into question the global understanding of the thruster, which until now may have overlooked the role of the coupling structure. For example, in the only comprehensive analytical model of the thruster known to the authors [START_REF] Cannat | Optimization of a Coaxial Electron Cyclotron Resonance Plasma Thruster with an Analytical Model[END_REF] (derived from Lafleur [START_REF] Lafleur | Helicon Plasma Thruster Discharge Model[END_REF]), the coupling structure is not considered. A Maxwellian electron distribution is assumed, and the power transfer is entirely described by the amount of deposited power, prescribing the electron temperature. From such a perspective, the two thrusters described in this paper are described by exactly the same model, whereas experimental measurements reveal considerable differences. These measurements therefore point out microwave coupling as an area for improvement for future ECRT models.

V. Conclusions

In this paper, the first thrust balance measurement of an ECRT using a waveguide-coupling structure has been presented and compared with measurement of an identical thruster, except for the use of a coaxial-coupling structure and, consequently, a boron nitride backplate instead of alumina. It was observed that the thrust estimate from electrostatic probe measurements yields thrust values up to 80% above thrust balance measurements. It was suggested that perturbation by the Faraday probe of the magnetic field tube it intercepts as well as unexpected ion trajectories far from the thrust axis may be responsible for the discrepancy. Until this issue is resolved, thrust balance measurements are necessary. It was shown that large uncertainties impair the measurement of the deposited microwave power, which is critical to assess the performance of an ECRT, in particular, the total efficiency. A specifically designed in-vacuum microwave circuit is presented to reduce random errors due to the possibility of unwanted discharges in the vacuum tank. In addition, it was shown that high-efficiency microwave coupling is necessary to reduce uncertainty on the deposited power. In the case of low-efficiency microwave coupling, a procedure to eliminate systematic directivity errors is proposed and used in the analysis of the waveguide-coupled thruster.

Several distinct ion current density angular profiles were observed for the waveguide-coupled thruster, whereas for the coaxial thruster, they are proportional for all the tested set points. At 25 Wand 98 μg∕s of xenon, the coaxial-coupled system provides 500 μN of thrust, whereas the waveguide-coupled system provides 240 μN of thrust. It is shown that this discrepancy can be explained by a discrepancy in ion energy and that lower ion energy seems to be an intrinsic feature of the waveguide-coupled thruster. In addition, for the coaxialcoupled thruster, a population of high-energy electrons is observed in the plume. It appears to originate from the periphery of the inner conductor. It is hypothesized that this population, unobserved in the case of the waveguide-coupled thruster, plays a key role in establishing a high accelerating potential. In this case, the electromagnetic field excited by the waveguide-coupling structure would intrinsically imply low thruster efficiency. From the results presented in this paper, waveguide coupling does not appear as a promising option for future development of the ECRT, at least in the way it is usually implemented. Concerning the understanding of the thruster, these results suggest the need to closely consider the role of the coupling structure, a feature until now overlooked in the general understanding of the thruster and analytical modeling.

Future experimental work could include space-resolved spectroscopy measurements in both thrusters to further investigate the link between the electron energy distribution function at several locations in the coupling structure and the establishment of the accelerating potential. Besides, directional ion current density measurements in the plume would provide valuable information about the dynamics of the nozzle and bring in new elements regarding the interpretation of the measured ion current density angular profile.

  Nomenclature D = directivity of microwave power couplers, dimensionless e = elementary charge, C J = angular density of ion current, A∕cm 2 L = distance between the thruster and the probe, cm M = ion mass, kg P D = power deposited in the thruster, W P I = power incident to the thruster, W P R = power reflected by the thruster, W R = reflected power fraction "at the thruster," dimensionless v = ion velocity, m/s γ = transmission coefficient of the microwave line, dimensionless φ = angular location in the jet, deg ϕ = phase shift between incident and reflected microwaves, rad I. Introduction

Fig. 2 Fig. 3

 23 Fig. 2 Sectional schematic view of a) the coaxial-coupling structure and b) the waveguide-coupling structure. Black lines are metallic surfaces, and gray areas are ceramic volumes. The black arrows indicate the direction of incident microwave propagation. The blue arrows indicate gas injection. It involves six injection ports azimuthally distributed every 60 deg.

Fig. 1

 1 Fig. 1 Sectional schematic view of a typical implementation of the coaxial ECRT (ECR: Electron Cyclotron Resonance; Xe: xenon).

Fig. 5

 5 Fig. 5 Probes mounted on a rotation stage: (left) guard ring Faraday cup for the measurement of ion current and (right) gridded Faraday cup for the measurement of most probable ion energy.

Fig. 6

 6 Fig. 6 Circular scan with electrostatic probes [4].

Fig. 7

 7 Fig.7Typical ion current density. The variable φ is defined in Fig.6.

Fig. 9

 9 Fig.9Schematic view of a dual-directional coupler. A known fraction of the wave propagating from left to right (the segment from port 1 to port 2) is measurable at port 3. Ideally, it is isolated from the wave propagating from right to left.

Fig. 10

 10 Fig. 10 Interval (relative to) P true R in which P R measurements with a bidirectional coupler can be found. The true value of the fraction of reflected power is represented on the horizontal axis.

Fig. 8

 8 Fig. 8 Schematic view of the microwave circuit. The square indicates the only in-vacuum connector.

Figure 11

 11 Figure 11 is a plot of ΔP D ∕P true D and of the contributions to ΔP D ∕P true D from errors on γ, P I , and P R . Asymptotic behavior is observed simply because lim P true R ∕P true I →γ 2 P true D 0

Fig. 11

 11 Fig. 11 Contributions and total error on P D for γ 0.81 and D 25 dB.

Fig. 12

 12 Fig.12Schematic of the test setup. A metallic plate (in red) is placed at the interface between the microwave circuit and the plasma. Reflection measurements made with the power generation and power measurement stages from Fig.8are compared with measurements made with a vector network analyzer.

Fig. 13

 13 Fig.[START_REF] Sercel | An Experimental and Theoretical Study of the ECR Plasma Engine[END_REF] Thrust balance measurements as a function of deposited power for 98 μg∕s of xenon. For both series of data, the last point is the mean of three or more measurements.

Fig. 14

 14 Fig. 14 Mean ion energy measured with a Hiden ion analyzer as a function of deposited energy in electron-volt per xenon atom injected. The flow rate is 98 μg∕s.

Fig. 15

 15 Fig.[START_REF] Vialis | Geometry Optimization and Effect of Gas Propellant in an Electron Cyclotron Resonance Plasma Thruster[END_REF] Mean ion energy as a function of deposited energy in electronvolt per atom of injected neutral gas. The legend specifies the type of coupling, coaxial (COAX) or waveguide (WG); and the propulsive gas, xenon (Xe) or argon (Ar). Vialis[START_REF] Vialis | Développement d'un Propulseur Plasma à Résonance Cyclotron Électronique Pour Les Satellites[END_REF] published data from two distinct magnetic field topologies (mag. topo. 1 and mag. topo. 2).

Fig. 17

 17 Fig.17Normalized angular profiles of ion current density for the coaxial-coupled thruster measured with a guard ring Faraday probe 26.5 cm from the thruster exit plane. The legend specifies the set point, with sccm representing standard cm3 . The uncertainty on the ion current density is estimated to be 5%.

Fig. 18

 18 Fig.18Thrust density normalized by total thrust, with a flow rate of 98 μg∕s. The uncertainty on the thrust density is estimated to be 7%.

Fig. 19

 19 Fig.[START_REF] Mazouffre | Characterization of Miniature Hall Thruster Plume in the 50-200 W Power Range[END_REF] Guard ring Faraday probe current density angular profile for the coaxial-coupled thruster 26.5 cm from the thruster exit plane. The legend specifies the bias voltage of the probe. The uncertainty on the current density is estimated to be 5%.

Fig. 16

 16 Fig.[START_REF] Holste | Ion Thrusters and Electric Propulsion Developments-From Old Space to New Space[END_REF] Angular profiles of ion current density for the waveguidecoupled thruster measured with a guard ring Faraday probe 26.5 cm from the thruster exit plane. The legend specifies the set point, with sccm representing standard cm 3 . The uncertainty on the ion current density is estimated to be 5%.

Acknowledgments

This work was partially performed in the framework of the H2020 "MINOTOR" project. This project has received funding from the European Union's Horizon 2020 research and innovation program under grant agreement no. 730028.