dataesr/scientific-paragraphs-categorization huggingface dataset:
Note that improving the computational efficiency and scalability of the code, in order to enable higher toroidal resolution, is a continuing effort and one of the main priorities of the JOREK developers community. Beyond the demonstration of the feasibility of advanced simulations like the one portrayed in   simulation of an ELM with n φ = (1, 2, 3,. , 8) was conducted with more challenging visco-resistive and diffusive parameters, and with a poloidal grid resolution which results in the same computational cost for both the G1 and G2 cases (approximately a factor 2. 5 in both the radial and poloidal directions). One of the most typical numerical issues encountered in practice with the JOREK code is when the ELM filament dynamics is very violent, creating areas of low plasma density and temperature.
Summary This paper presents the significant development and generalisation of the finite-element method used in the JOREK code. A generalised formulation was developed for a nodal representation of Bezier elements, which ensures that G-continuity of order (n -1)/2 is respected, where n is the order of the polynomial basis of the Bezier elements. Rigorous proof was provided to show that the definition of our nodal formulation ensures G-continuity. Some details about the key aspects of the implementation into the code were provided, followed by a series of tests and benchmark studies. Beyond the fact that the G-continuity of the method is demonstrated numerically, and that all benchmark tests provide identical results to the previous JOREK version, one of the key achievements of this study is that, at equivalent numerical precision, having higherorder finite-elements can be computationally cheaper.
Nevertheless, p-refinement is an appealing capability to consider for future developments, and one that is already used in many other state-of-the-art modelling tools like Nektar++, Firedrake and MFEM  [40, 41, 44, 47, 76, 77]. Similarly, an interesting generalisation of the finite-element formulation in the JOREK code would be to allow for unconstrained finite-elements, where the continuity is not imposed. At present, the formulation inherently includes continuity,.
Acknowledgement This work was performed with the support of the JOREK Team [See https://www. jorek. eufor the present list of team members]. This work has been carried out within the framework of the  EUROfusion  Consortium, funded by the  European Union  via the  Euratom Research and Training Programme  (Grant Agreement No. 101052200 -EUROfusion ). Views and opinions expressed are however those of the author(s) only and do not necessarily reflect those of the European Union or the  European Commission. Neither the  European Union  nor the European Commission can be held responsible for them. This work has been carried out within the framework of the  RCUK Energy Programme  [grant number  EP/I501045 ]. This work was performed using the MARCONI computer at CINECA in Italy, within the EUROfusion framework.
Code overview A summary of the high-level code architecture, is given in figure  1. The software is comprised of two main C-libraries: • The first library, called MIcrowave Data Analysis PACKage (MIDAPACK), provides low-level operations needed to perform high-level procedures in the data analysis pipelines. Such operations include, sparse linear algebraic operations for generalized pointing and template operators, customized communication schemes for distributed data reduction, operators for structured matrices, such as Toeplitz matrices, or block-diagonal templates kernels, necessary to perform some time-domain operations such as templates filtering or noise weighting. We note that these operations can be relevant for all main stages of the data analysis pipeline, but in accordance with the scope of this paper we mainly focus on mapmaking applications.
• The second library, called MidAPack PaRAllel Iterative Sky EstimatoR (MAPPRAISER), builds on the first library to provide different numerical techniques, solvers and map-making methods to compute unbiased maps, and filter time-domain systematics concurrently with the map projection. The routines conform with the MPI programming model and are therefore able to use massively parallel platforms with memory distributed between a large number of compute nodes. Some routines also make use of multithreading, but this option still needs to be optimized to be fully functional in the code. However these routines may provide the basis for a future extension of the framework to a full hybrid OpenMP/MPI model. On top of this two-level core layer of the code, there is a Python wrapper, which allows the map-making code to interface easily with simulation or real data analysis pipelines.
The microwave data analysis package (MIDAPACK) The MIDAPACK library consists of three main subpackages: • The pointing operations package MAPMAT: this package contains sparse matrix vector products operations to perform the projections from time-domain data to map-domain data and vice-versa. In their most general form, these matrices are rectangular with considerably more rows than columns, given the relative sizes of the time-domain and map-domain data and are referred to as tall-and-skinny matrices. Their most important property however is their sparsity as they feature at most few non-zero elements per row. • The Toeplitz algebra package: this package provides routines to perform the product of Toeplitz-structured matrices with an arbitrary data matrix. We refer hereafter to matrices which are symmetric, block-diagonal with banded Toeplitz blocks, or matrices with all of the above properties along some rows and corresponding columns missing as "Toeplitz-structured".
MAPMAT: pointing algebra package Pointing data distribution & pixelization schemes: The pointing data distribution follows from the distribution scheme adopted for the timestreams: each process is assigned the pixels and pointing weights corresponding to the detector timestreams it is processing. This also defines the distribution of pixel-domain objects, such as maps. As a result, given the high redundancy of the typical scanning strategy, information concerning a given pixel may be stored in the memory of multiple processes. The pixels indices are defined via two indexation schemes. A global pixel indexation, corresponding to the global pixel index on the sky, and a local pixel indexation, corresponding to a reordering of the pixels observed at least once by the local timestreams of each MPI process.
The package is independent of the particular choice made for the sky pixelization. Data structure: The pointing matrix is defined with a C-struct called Mat. Each MPI process holds an instance of this structure in memory. One integer, nnz, specifies the number of non-zero elements per row. The values and columns locations of these elements are specified with two arrays as is done in the ELL 1  storage format, for efficient memory consumption. It also contains the ordered set of locally observed pixels, and a precomputed set of arrays and parameters necessary to conduct the customized collective communication operations in an efficient way, along with a flag specifying the particular communication scheme chosen for these operations.
Projection operations & collective communication: The package features two main core operations: • The un-pointing operation: This operation generates a time-domain vector, t, from a given map-domain object, m, and a pointing matrix P: t = P m. Given the data distribution scheme, this operation can be performed locally in each MPI process, as a simple sum of the products of the pointing weights with the corresponding map entries. • The pointing operation: This is a projection operation, where given a time-domain vector, t, and a pointing matrix P, we compute a map vector m, where each pixel is the sum of the time samples observing it: m = P T t. Given that the data are distributed in time-domain, the time samples observing a given pixel, are typically distributed over many MPI processes. Hence this operation is performed in two steps: we first compute local products of the pointing weights with the local time samples, m i.
This results in submaps of the full map which contain only a subset, P i , of pixels, which is relevant to the time-domain data assigned to this process. We then compute the sum of these local submaps over all processes obtaining the global map projection, i. e. , m(p) = i: p ∈ P i m i (p), where for a pixel p of the full map, the sum goes over those processes, i, for which p belongs to the local set of pixels, P i. The second step requires a global, irregular communication operation. Given that these types of operations are not scalable, this represents a bottleneck in the map-making procedure. In addition to the standard MPI Allreduce, the MAPMAT package implements several customized communication algorithms such as Ring and Butterfly  [32].
Toeplitz algebra package Data distribution: For each detector timestream, we build a Toeplitz block that is completely defined by one array containing a number of elements equal to the half-bandwidth λ. These blocks are therefore distributed following the time-domain data layout: each MPI process holding in memory the Toeplitz blocks corresponding to the detectors and the scans it has been assigned. In case, we want to include correlations between detectors, we would need to also build cross-correlation Toeplitz blocks, and hold them in memory, and eventually need a significant amount of communication depending on the spatial scale of the cross-correlations. Data structure: The Toeplitz-structured noise covariance is defined with a C-struct called Tpltz. Each MPI process holds an instance of this structure in memory.
Toeplitz product operations & numerical algorithms: The package provides routines to perform the product of a Toeplitzstructured matrix with a general data matrix, which is stored as vectors in the column-wise order. Three product operations can be performed: • stmm routines: these concern the multiplication of a symmetric banded Toeplitz matrix by a data matrix of the same size. If the data are distributed over several MPI processes, then each process should have the same and full Toeplitz matrix stored in memory. • stbmm routines: for the multiplication of a symmetric, block-diagonal matrix, with Toeplitz banded blocks by a data matrix. As explained above, such structure is defined with a list of instances of the C-struct Block, each representing a Toeplitz block in the block-diagonal matrix.
Each block is then multiplied with the corresponding subblock of the data matrix. We also note that the blocks need not be contiguous, i. e. , we can have rows in the data matrix which correspond to no given block in the Toeplitz structure, such rows are copied unchanged implicitly assuming the corresponding entries in the Toeplitz structured matrix to be equal to 1. Given the data layout adopted in practice, each MPI process will have a number of full detector timestreams, and therefore all the corresponding Toeplitz blocks. However, in general, as was discussed before the package also handles, detector timestreams being split between multiple MPI processes, in this case each of those MPI processes should have the corresponding full Toeplitz blocks stored in memory, and communication is used to copy necessary data to enable the product operation locally.
This is sufficient to compute a part of the Toeplitz-vector product corresponding to the input data of each process locally without any need for further data exchanges. In particular we note that all the FFT calls used by the package are either sequential or threaded. The point-to-point communication pattern enabled by the package can be either non-blocking, using MPI Isend and MPI Irecv calls, or blocking with MPI Sendrecv calls. The choice is specified via a flag FLAG BLOCKINGCOMM determined when constructing the Tpltz structure, and set by default to 0 for non-blocking communication.
Templates algebra package Data distribution: As described in Sect. 3. 2 the templates considered here are specific to scans and detectors. Consequently each MPI process stores only templates relevant to the scans and detectors assigned to it as a result of the overall time-domain distribution scheme described earlier. This data distribution is both memory and computation efficient. Data structure: At the onset of the computation, each MPI process is assigned its specific set of template classes. For each template class, each process stores information only about the templates corresponding to the detector time streams it is processing. Different template classes are defined with a C-struct called TemplateClass. The structure defines the time-domain interval for which this class is relevant as well as flags defining the type of templates in the template class as well as a stationary interval to which it corresponds.
Indeed, the imposed structure of the weights is flexible enough to allow for a very good approximation to the actual inverse noise covariance as discussed in Section 2. 4. The MAPPRAISER package computes the weights using information derived directly from the collected data as in  [43, 38, 54]. To do so, we consider that over each scan, every detector timestream is dominated by stationary noise with a power spectral density (PSD) of the form: P( f ) = σ 2 0 1 + f + f 0 f k α ( 21 ) Assuming at first order that the data is only made of noise, we compute the average periodogram of each detector time stream, and fit it to the above model. The obtained PSD is then inverted and inverse Fourier transformed to obtain the inverse noise autocorrelation which is later smoothed with a gaussian window N(0, λ/2), and cut at the a priori specified half bandwidth λ.
The two-level preconditioner has been proposed and demonstrated for the map-making problem in  [47]  and extended to component separation in  [33]. It is more involved and requires a precomputation. To the best of our knowledge the MAPPRAISER implementation of this preconditioner is the very first and only existing implementation in actual mapmaking software. Compute r 0 = b -Ax 0 , z 0 = Mr 0 and p 0 = z 0 , for k = 0, 1,. , k max do α k = r k , z k / Ap k , p k x k+1 = x k + α k p k r k+1 = r k -α k Ap k if r k+1 2 < ε b 2 then stop z k+1 = Mr k+1 β k = r k+1 , z k+1 / r k , z k p k+1 = z k+1 + β k p k end Algorithm 1: The PCG algorithm for the system Ax = b with a preconditioner M  [41].
Preconditioners for PCG The objective of preconditioning is to improve the convergence and stability of the iterative solvers. The preconditioner, M, can be thought of as an approximate to the inverse of the system matrix, A. In preconditioned solvers, instead of the original problem we solve a modified system with the system matrix replaced by a product of the system matrix and the preconditioner, i. e. , M A. Unlike the actual inverse of the system matrix the preconditioner should be easy to compute, and the preconditioned system matrix, M A should be better conditioned and its eigenspectrum more clustered. Both of these properties make the system more stable and speed-up the convergence. The MAPPRAISER package offers two preconditioning options.
Strong scaling tests and collective communication performance We perform several strong scaling tests, using the S1 simulation on Cori and Joliot-Curie to demonstrate the ability of the code to run on a large number of cores and handle the data reduction of a large data set. Given that the Skylake processors (Joliot-Curie) are more powerful than the Haswells (Cori) we expect to see longer runtimes with the second machine for the same set of the sky reconstruction parameters. In the runs presented here we assume the maximum-likelihood mapmaking approach with a Toeplitz-structured noise covariance and a half-bandwith set to 2,048 samples. This corresponds to a time-domain correlation length of ∼ 15 s, given the adopted sampling rate. The solver converges in around ∼ 1, 200 iterations for the case considered.
Conclusion and future work In this paper we provide a detailed description of the MAP-PRAISER software framework, which provides tools for computing faithful estimates of sky maps from the time-domain data collected by CMB experiments, in the presence of spurious signals which contribute linearly to the data. These tools benefit from a massively parallel implementation which is also easily extensible and portable. The framework allows the user to choose between different linear solvers and preconditioning techniques to maximize the computational efficiency according to the specific cases that need to be processed. In addition, one can also choose between different map-making methods according to the case at hand. The framework is flexible and extensible and can deal with cases of generalized mapmaking problems as those arising in the presence of frequency dependent systematic effects  [53].
The architecture is modular such as to allow other solvers, preconditioners, map-making approaches, or different templates for handling time-domain systematics to be easily integrated in the framework. We demonstrate all these features on simulated data from the TOAST software framework, using ground based and satellite experiments specifications. We first test the scalability and portability of the code by running our map-making code on multiple platforms using different collective communication schemes and show that the code exhibits good scaling up to our tests limit consisting of 16,384 MPI processes demonstrating its ability to handle large data sets. We then show a proof of concept of how convergence can be improved with the ECG solver, which to our knowledge, is the first application of the method in the context of CMB analysis.
Such GPU accelerated operations will also allow efficient implementations of spherical harmonic transforms useful for Wiener filtering or beam deconvolution map-making. The present software framework can also be used as a forecasting tool to assess the impact of different systematics naturally modeled in time-domain and their mitigation using realistic simulations of actual CMB experiments such as Simons Observatory, CMB-S4 and LiteBIRD. Finally, the framework can also be incorporated within broader non-linear schemes integrating multiple steps of the CMB data analysis such as mapmaking and component separation into a single one  [33]. in  [36]  in general the scan-synchronous templates will not be also orthogonal to the sky signal, leading to near-degeneracies in the system matrix broken only by the assumed sky pixelization.
Acknowledgement The work was supported by the  French National Research Agency (Agence National de Recherche)  grant,  ANR-B3DCMB , ( ANR-17-CE23-0002 ). We salute members of the B3DCMB collaboration for their multidisciplinary support and insights throughout the implementation of the project. We thank  Julian Borill ,  Reijo Keskitalo ,  Theodore Kisner  for their relevant comments and help with running the simulation software and interfacing it with MAPPRAISER. We also thank  Sigurd Naess ,  Matthew Hasselfield , and all members of the  Simons Observatory Pipeline Working Group  for their useful comments and discussions. We acknowledge help of  Jan Papež  and  Olivier Tissot  with the integration of the ECG solver within the framework and the work of  Pierre Cargemel  and  Frédéric Dauvergne  on the development of the baseline version of MIDAPACK on which this work has built and improved upon.
Set of evaluated de novo assemblies De novo assemblies evaluated in this study have been obtained from two different sources that are part of two international consortia: HGSVC and HPRC. For HGSVC data, we evaluated a panel of 35 samples of diverse ancestry (AFR -11, AMR -5, EUR -7, EAS -7, SAS -5). Of those there are 30 and 14 samples with CLR and CSS PacBio data, respectively (9 samples -3 trios -have available both CLR and CCS data). In the HPRC assembly collection, there are 47 samples of mostly African and American ancestry (AFR -24, AMR -16, EUR -1, EAS -5, SAS -1) sequenced using CCS PacBio only.
Alignment of de novo assemblies to the reference genome Alignments used for simple contig end evaluation. All de novo assemblies have been aligned to the most complete version of the human reference genome T2T-CHM13 (version 1. 1) using minimap2 (version 2. 22. 0) with the following command: minimap2 -K 8G -t {threads} -ax asm20 \ --secondary=no --eqx -s 25000 \ {input. ref} {input. query} \ | samtools view -F 4 -b -> {output. bam} Minimap2 had a known issue where some inversions were missed if they were part of another alignment. To alleviate this issue, we realigned the assemblies with the same parameters after hard masking the reference and query to remove regions that were already aligned in the first alignment step. A complete pipeline for this reference alignment is available at: https://github.
com/mrvollger/asm-to-reference-alignment Alignments used for contig alignment ends evaluation. All de novo assemblies have been aligned to the most complete version of the human reference genome T2T-CHM13 (version 1. 1) using a newer minimap2 version (version 2. 24. 0) with the following command: minimap2 -K 8G -t {threads} -x asm20 \ --secondary=no --eqx -s 25000 \ {input. ref} {input. query} \ | samtools view -F 4 -b -> {output. bam} A complete pipeline for this reference alignment is available at: https://github. com/mrvollger/asm-to-reference-alignment Evaluation of simple contig ends Contig ends are defined at the first and last aligned base for each contig in the HPRC haplotype-phased assemblies. Alignments were performed as described above, and the terminal position of each contig was determined using rustybam liftover (https://github.
Evaluation of assembly quality using Strand-seq For a set of eight HPRC samples (HG01123, HG01258, HG01358, HG01361, HG01891, HG02257, HG02486, HG02559) for which corresponding Strand-seq data are available, we evaluated the directional and structural contiguity of such assemblies. Evaluation of misorientations or unresolved homozygous inversions. To evaluate any changes in orientation we first processed each selected Strand-seq library using breakpointR with the following parameters: windowsize = 2000000, binMethod = 'size', pairedEndReads = TRUE, min. mapq = 10, genoT = 'binom', background = 0. 1, minReads = 100. Next, we created so-called 'composite files' that concatenate directional reads across all libraries using breakpointR function 'synchronizeReadDir'. We set to detect any changes in directionality by running breakpointR on such composite files with the following parameters: windowsize = 10000, binMethod = "size", pairedEndReads = FALSE, genoT = 'binom', background = 0.
1, peakTh = 0. 25, minReads = 50. Misorientation and unresolved homozygous inversions are reported as regions that genotypes as having the majority of minus oriented reads ('ww', Watson-Watson strand state) while one would expect all Strand-seq reads to map in plus orientation ('cc', Crick-Crick strand state) if the assembly is correctly oriented throughout each contig. Evaluation of phasing accuracy for selected PGAS assemblies. We evaluated phasing accuracy for HPRC samples (HG01123, HG01258, HG01358, HG01361, HG01891, HG02257, HG02486, HG02559) for which corresponding Strand-seq data are available and thus both HPRC and PGAS assemblies could be produced. In this analysis we consider trio-based HPRC assemblies as the gold standard for phasing evaluation. We used PAV (v1. 1. 2) to call SNVs in phased HPRC assemblies as described previously  (Ebert et al.