text stringlengths 128 2.05k |
|---|
Respiratory system simulation In Figure 10 we can see the execution time of the matrix assembly in the Respiratory system simulation. The X axis represents the different chunk sizes used. Figures 10(a) 10(b) and |
10(c) correspond to executions on 16, 32 and 64 nodes of MareNostrum 3, respectively. In the case of the execution without DLB, the No Coloring and Coloring versions are not affected by the chunk size, until reaching very small values, chunk sizes of 10 or 20. On the other hand, the Multidependencies version starts to ... |
The impact of the chunk size when using DLB comes from the fact that bigger chunks imply less malleability because threads can not leave a chunk until it is finished. The Coloring version with DLB is the most affected one by big chunks, after chunks of size 200 the performance slowly degrades until it reaches the same ... |
Figure 11 shows the execution time of the subgrid scale computation for the Respiratory system simulation, when varying the chunk size. |
The conclusions for this experiments are very similar to the previous ones. The limit in the chunk size is around 20, from this size the performance of the Coloring and No coloring versions degrade. For very small chunks sizes the overhead of creating the tasks and scheduling them is too high. In this case, the limit c... |
Big chunk sizes, like before, affect only when running with DLB. And the worst performance with big chunks is obtained by the Coloring parallelization. We consider that a chunk size of 200 is the optimum value for all the versions and configurations. This will be the chunk size used in the experiments executed in the f... |
Iter simulation Figure 12 shows the execution time of the matrix assembly for the Iter simulation. In these charts, we have adjusted the scale of the Y axis to see some differences between the different series. Each chart corresponds to a number of nodes (16, 32 and 64), while the X axis represents the different chunk ... |
On the other hand, the Multidependencies version is still limited by small chunk sizes, because its limitation does not only come from the duration of the chunks but also from the amount of chunks in the queue and with a commutative relationship. |
When using DLB the use of big chunk sizes implies a loss of performance. The Coloring version is the most affected one, because of the synchronizations between the loops computing the different colors. The no coloring and Multidependencies are affected in a similar way. |
For this simulation the optimal chunk size in all the series is around 100. This the chunk size that we will use for this simulation in the following experiments. |
5.3 Execution Time In this section we will compare the execution times of the matrix assembly and subgrid scale computations for the Respiratory system and matrix assembly for the Iter simulations, with and without DLB, for each parallelization technique listed in Table |
Respiratory system simulation Figure 13 shows the execution time of the matrix assembly of the Respiratory system simulation. Figures 13(a) 13(b) and 13(c) correspond to executions on 16, 32 and 64 nodes respectively. The X axis represents the different configurations of MPI processes and threads used in each case, whi... |
When comparing the three different implementations of the parallelization without DLB, we can see the difference in performance that they obtain. Being the No Coloring version the worst one, performing worse than the pure MPI version in all the configurations. As we already mentioned in previous sections, the problem o... |
The Coloring parallelization yields a better execution time than the No coloring one, but still far from using the pure MPI version, due to the worst data locality. Finally, the Multidependencies implementation achieves the best performance. When using a configuration filling the nodes with MPI processes and only one t... |
All the versions present a worse imbalance when increasing the number of MPI processes per node (and decreasing the number of threads), because the load imbalance increases with the number of MPI processes, see Figure (Left). Except in the case of just one MPI process per node and 16 threads, where the threads may acce... |
When looking at the executions with DLB we observe that in all the cases DLB improves the performance of the analogous execution without DLB. The only situation where DB can not be applied is when running one MPI process per node and 16 threads per MPI process because DLB needs more than one MPI process in each node to... |
Although the performance of the parallelization affects DLB, in some cases, the load balance can overcome the overheads of the parallelization and obtain a better performance than the pure MPI version. For example, in Figure 13(b) , when running in 64 nodes (512 cores) and 512 MPI processes with one thread per process,... |
It is interesting to see how the performance of DLB improves with the number of MPI processes on the node, being the best configuration to fill the nodes with MPI processes and only one thread for OpenMP. This can be explained because having more MPI processes gives DLB more flexibility to load balance. i.e. if we use ... |
In all the cases the best situation is to use the commutative Multidependencies with DLB, which can represent a 37% faster execution than the pure MPI version. |
Figure 14 shows the execution time of the subgrid scale calculation, for the same experiments. In this case the No Coloring version obtains a performance close to the pure MPI execution when using 1 thread per MPI process. In the subgrid scale computation, the ATOMIC clause is not necessary, as it is obtained element-w... |
The coloring version performs worse than the no coloring because it still presents the bad locality issue. The Multidependencies parallelization has a performance close the that of the No coloring one for a low number of threads. When increasing the number of threads to 16, the execution time is higher because all the ... |
When using DLB, the performance is improved in all the cases. The best configuration with DLB is to use 16 MPI processes per node and one thread per process independently of the parallelization strategy used. When using the no coloring or Multidependencies version the performance with DLB is almost constant independent... |
Iter simulation Figure 15 shows the execution time of the matrix assembly phase for the Iter simulation. The different charts correspond to executions on 16, 32 and 64 nodes. The X axis, we can see the different configurations of MPI processes and OpenMP threads. As already noticed in Figure (Right), the imbalance exhi... |
When comparing the performance of the different parallelizations, we can see that the No Coloring version is slower than Coloring and Multidependencies because of the ATOMIC overhead. In this case, the difference between the Coloring and Multidependencies is not very significant because in this simulation the amount of... |
The simulations executed with DLB are always faster than their analogous ones without DLB. As in the case of the fluid, the best performance is obtained when using 16 MPI processes per node and one thread per MPI process. When using DLB with Multidependencies and 16 MPI processes per node, the performance is better tha... |
5.4 Hardware Counters Study In this subsection, we are going to evaluate the different parallelizations (No Coloring, Coloring, and Multidependencies) based in different performance counters in order to support some of the performance explanations we have used in the previous sections. The data shown in the following c... |
We are going to see the results for both simulations the respiratory system and the iter simulation. In all the cases we have launched 256 MPI processes with one OpenMP thread per MPI process (16 MPI processes per node). This configuration is used to see the impact of the parallelization in the performance of the code ... |
Respiratory system simulation Figure 16 is a normalized histogram of the IPC obtained during the matrix assembly. The X axis represents the different intervals of IPC measurements, while the Y axis gives the percentage of time of each IPC range, with respect to the total CPU time spent in the matrix assembly. We observ... |
The IPC of the Coloring version is between 1.5 and 1.7, better than the No Coloring but still far from the IPC obtained by the pure MPI version. When using the Multidependencies parallelization, the IPC is between 2 and 2.2 almost the same as the one achieved by the pure MPI version. |
Figure 17 gives the IPC for the subgrid scale computation phase. The IPC for the pure MPI and the Multidependencies versions are the same as in the matrix assembly. The No Coloring version in this phase presents a much higher IPC because it does not need the ATOMIC clause. An IPC equivalent to the one achieved with Mul... |
To back up our conclusions on the previous charts, we have measured the total number of instructions executed during a matrix assembly and subgrid scale computation. The results obtained are shown in Figure 18(a) |
In these charts we can see that the number of instructions executed in the subgrid Scale computation is much lower than the ones necessary to compute the matrix assembly. When comparing the different parallelizations we can observe that the number of executed instructions in the different parallelizations is the same, ... |
Figure 18(b) shows the cache misses in L3 during the execution of the matrix assembly and the subgrid scale computation. As we already said, the pressure on the memory is much higher in the matrix assembly than in the subgrid scale computation. When comparing the different parallelizations, we observe that the No color... |
Iter simulation Figure 19 shows the IPC obtained in the matrix assembly for the Iter simulation. As we said before, the matrix assembly of this problem has a higher computational load per element than that of the fluid problem, and this can be seen in the higher IPC in all the cases. The pure MPI version has an IPC aro... |
The Coloring parallelization presents an IPC of 2.7 because of the worst data locality, and the Multidependencies version obtains an IPC of 2.9 achieving almost the same performance as the pure MPI version. |
Figure 20(a) shows that the number of instructions necessary to compute the matrix assembly is the same for all the parallelizations. |
By looking at the L3 cache misses for the different parallelizations (Figure 20(b) , we observe the same conclusions as in the Respiratory system simulation: the No coloring version has the same cache misses as the pure MPI; the Coloring parallelization presents a higher number of misses and the Multidependencies versi... |
We define the miss ratio as the number of cache misses issued for each 1000 instructions executed, computed as follows: [MATH] . In Figure 21 we can see the L3 miss ratio for the different simulations and computation phases. Based in this chart we can asses that the pressure in the data access is much higher in the mat... |
5.5 Scalability During this evaluation, we had the opportunity to run some strong scalability tests on MareNostrum 3 with up to 16384 cores (1024 nodes). For this, we have used the mesh multiplication strategy described in |
to obtain a mesh of 141 million elements from the original mesh shown in Figure In these experiments, we wanted to demonstrate that DLB can scale up to using thousands of cores and also that even working at the node level the use of DLB can help improving the performance significantly in this kind of executions. |
In these executions we have simulated the Respiratory system using the best configurations observed in the previous experiments, 16 MPI processes per node with 1 thread per process and chunks of 200 elements. The values presented are the average execution time of 10 time steps for each phase of the computation. |
Figure 22 shows the execution time of the matrix assembly and the subgrid scale. In the X axis, we can see the number of cores used to run and in the Y axis the elapsed time in seconds in a logarithmic scale. As we have seen before, the performance of the coloring version is worse than the pure MPI. On the other hand, ... |
If we look at the results obtained using DLB, we can see that the execution time is reduced significantly when running with the Coloring or the Multidependencies parallelizations, but specially with the last one. The most interesting thing is to see how the gain when using DLB is maintained independently of the number ... |
Figure 23 shows the scalability as it is usually presented by application developers, using as base case the smallest number of resources used of the same version: |
{EQ} Scalability_x,y=time 1024,y time x,y We want to show how misleading this metric can be. In this chart, the best scalability is obtained by the Coloring version without DLB. But this version is the one that obtains the worst execution time. On the other hand, the executions with DLB (both with Coloring and Multidep... |
Figure 24 shows the speed up with respect to the pure MPI version on 1024 cores. In this case, all the versions are computed versus the same baseline scenario and are thus directly comparable: |
{EQ} Speedup_x,y=time 1024,Pure MPI time x,y In this chart, we can observe how the performance of the DLB versions is significantly better even when running on a large number of cores, being able to obtain a speed up of 23 when using 16 times more resources. |
Conclusions In this paper we have presented two runtime mechanisms to improve the performance of a computational dynamics code. Both approaches can be used without important modifications in the source code and are applied at runtime. We have tested both mechanisms in the solutions of two production computational mecha... |
On one hand, we have presented the use of multidependences to avoid a race condition in the matrix assembly, for which we have demonstrated that the performance can be improved up to a 60% when using the multidependences approach with respect to the use of ATOMICS. We have explained using a hardware counters analysis t... |
On the other hand, we have used a dynamic load balancing library (DLB) to improve the load balance in some phases. DLB can be used without modifying the source code and we have shown an improvement in performance of up to 50%. Moreover, we have seen that the use of DLB releases the user from choosing the better configu... |
DLB can be used also in MPI pure applications, just by adding OpenMP pragmas where necessary, in this case the second level of parallelism is only used for load balancing purposes. |
Finally we have shown that both mechanisms can scale up to 16384 cores obtaining the best results with the multidependences and DLB versions. |
# Source: arxiv 1805.04126 # Title: Idempotent completion of cubes in posets # Sections: all # Downloaded: 2026-03-03T01:43:35.161711+00:00 |
Idempotent completion of cubes in posets (Date: December 23, 2018) Abstract. This note concerns the category [MATH] of cartesian cubes with connections, equivalently the full subcategory of posets on objects [MATH] with [MATH] We show that the idempotent completion of [MATH] consists of finite complete posets. It follo... |
1. Preliminaries 1.1. Idempotents We briefly recall some of the basic theory of idempotents and their splittings. A classical reference is BD86 |
The following notions are relative to a category [MATH] An idempotent [MATH] consists of an endomorphism [MATH] satisfying [MATH] |
[EQUATION] retract [MATH] consists of a pair of morphisms [MATH] (the retraction) and [MATH] (the section) such that [MATH] [EQUATION] |
Any retract [MATH] induces an idempotent [MATH] An idempotent is said to split if it is induced by a retract diagram in this fashion. The splitting of [MATH] is also characterized as an equalizer or a coequalizer of [MATH] and [MATH] Retract diagrams are preserved by any functor, so these are absolute (co)limits. The c... |
Definition 1.1 A functor [MATH] exhibits [MATH] as an idempotent completion of [MATH] if [MATH] is fully faithful, [MATH] is idempotent complete, and every object [MATH] arises as a retract of an object [MATH] with [MATH] |
The idempotent completion is also known as the Cauchy completion or Karoubi envelope. It can be characterized using a universal property, but we will not need this here. |
We write [MATH] for the category of presheaves over a category [MATH] The main property of the idempotent completion relevant to our intended application is the following. |
Proposition 1.2 (essentially BD86 , Theorem 1] Let [MATH] be an idempotent completion. Then the induced pullback functor [MATH] is an equivalence. |
1.2. Cube category We write [MATH] for the category of small posets. Following KV , we define [MATH] as the full subcategory of [MATH] on powers [MATH] of the walking arrow [MATH] with [MATH] Equivalently, in the style of CCHM18 , we may view [MATH] as the opposite of the category of bounded distributive lattices free ... |
2. Idempotent completion of [MATH] Let [MATH] denote the full subcategory of complete finite posets; note that it has a small (countable) skeleton. Recall that every complete finite poset is also cocomplete. Thus, we may also describe [MATH] as the full subcategory of posets on finite bounded lattices. |
The walking arrow [MATH] is a finite bounded lattice, hence are its finite powers [MATH] with [MATH] We thus obtain a fully faithful inclusion [MATH] |
Theorem 2.1 The inclusion [MATH] is an idempotent completion. Proof. The category of finite posets is finitely complete, hence in particular idempotent complete. To transfer this property to [MATH] , it suffices to check given a retraction [MATH] of (finite) posets that [MATH] is complete as soon as [MATH] is. This is ... |
2.3 below. It remains to check that every complete finite poset arises as a retract of [MATH] with [MATH] This is Lemma 2.4 below. |
Lemma 2.2 Retracts in [MATH] preserve the existence of terminal objects. Proof. Let [EQUATION] be a retract of posets. Given a terminal object [MATH] in [MATH] , we will verify that [MATH] is terminal in [MATH] Given [MATH] , a map [MATH] is obtained by taking the map [MATH] (using terminality of [MATH] ) and applying ... |
Note the Lemma 2.2 really only works for posets, not categories in general. For a counterexample, note that the terminal category is a retract of the walking pair of arrows. |
Lemma 2.3 Retracts in [MATH] preserve completeness. Proof. Let [EQUATION] be a retract of posets. We assume [MATH] complete and will show [MATH] complete. |
Given a diagram [MATH] , we need to show that [MATH] has a terminal object. By functoriality of comma category formation, the above retract diagram lifts to a retract diagram |
[EQUATION] of comma categories, which are again posets. By completeness of [MATH] , we have a terminal object in [MATH] The conclusion then follows from Lemma |
2.2 Lemma 2.4 Let [MATH] have set of objects [MATH] and decidable hom-sets. Then [MATH] is a retract of [MATH] Proof. We use the posetal Yoneda embedding [MATH] As for categories, it is the universal map from [MATH] to a cocomplete poset. Since [MATH] is already cocomplete, there exists a unique cocontinuous functor [M... |
[EQUATION] This exhibits [MATH] as a retract of [MATH] In a second step, we show that [MATH] is a retract of [MATH] Seeing [MATH] as a discrete poset, we have an inclusion [MATH] that is bijective on objects. Thus, the restriction functor [MATH] is fully faithful. Together with its left adjoint [MATH] , it thus forms a... |
[EQUATION] The goal follows by composition of retracts. 3. Application to comparing cubical and simplicial sets 3.1. The essential geometric embedding |
Let [MATH] denote the simplex category. We may use Theorem 2.1 to give a different exposition of the proof by Kapulkin and Voevodsky of the following theorem: |
Theorem 3.1 KV , Section 1] There is an essential geometric embedding [MATH] Note that essentiality of the geometric embedding, meaning a further left adjoint to the inverse image functor, was not observed in the cited reference. |
Proof. Observe first that every object [MATH] of [MATH] is a complete finite poset. We have fully faithful embeddings of index categories as follows: |
[EQUATION] using Theorem 2.1 for the annotation of the right arrow. Upon taking presheaves, we therefore obtain essential geometric embeddings (with direct images given by right Kan extension, inverse images given by precomposition, and further left adjoints given by left Kan extension) as follows: |
[EQUATION] Here, we used Proposition 1.2 to derive the equivalence on the right. Thus, we obtain an essential geometric embedding [MATH] as desired. |
Evaluating the resulting inverse image functor [MATH] , a representable [MATH] is first mapped to the representable [MATH] in [MATH] and then restricted to [MATH] The resulting presheaf sends [MATH] to [MATH] , i.e. coincides with the standard triangulation of the [MATH] -cube. By naturality and cocontinuity, the inver... |
The left adjoint [MATH] to the inverse image functor sends a representable [MATH] first to the representable [MATH] in [MATH] and then restricts it to [MATH] The resulting presheaf sends [MATH] to [MATH] Following the below remark, this may also be seen as the quotient of [MATH] by the endomorphism of [MATH] reordering... |
Remark 3.2 Write the poset [MATH] as [MATH] We can exhibit an object [MATH] explicitly as a retract in [MATH] of [MATH] by sending [MATH] to |
[EQUATION] and [MATH] to [MATH] This observation suffices to recognize [MATH] as a full subcategory of the idempotent completion of [MATH] , using only the fact that [MATH] is idempotent complete and hence contains the idempotent completion of [MATH] as a full subcategory. In turn, this is enough to carry out the proof... |
3.1 , not requiring full use Theorem 2.1 or its ingredients Lemmata 2.3 2.2 and 2.4 We believe this mirrors best the original proof in KV |
3.2. Preservation of monomorphisms Let us discuss some properties of the essential geometric embedding of Theorem 3.1 Proposition 3.3 |
In the essential geometric embedding [MATH] , the left adjoint to the inverse image functor preserves monomorphisms. Before we can show this statement, we will need to collect a few observations. Recall from BR13 the notion of elegant Reedy category. |
Lemma 3.4 Let [MATH] be an elegant Reedy category. Assume that [MATH] has pullbacks along face faces, and that these pullbacks preserve face and degeneracy maps. Then the functor [MATH] preserves monomorphisms. |
Proof. Consider a monomorphism [EQUATION] of discrete Grothendieck fibrations over [MATH] We have to show that [MATH] induces a monomorphism on connected components. |
Note that [MATH] is a discrete fibration by standard closure properties; since it is mono, it is thus a sieve. Note that [MATH] inherits the elegant Reedy structure from [MATH] and that the assumptions on pullbacks in [MATH] descend to [MATH] Since [MATH] is elegant and [MATH] is mono, [MATH] has opcartesian lifts of d... |
Let [MATH] and [MATH] be objects of [MATH] such that [MATH] and [MATH] lie in the same connected component of [MATH] , i.e. are connected by a zig-zag of morphisms. Using the Reedy factorization and pullbacks along face maps in [MATH] , we may “normalize” this zig-zag to find face maps [MATH] and [MATH] such that [MATH... |
Since [MATH] is a discrete Grothendieck fibration, we have lifts [MATH] and [MATH] of [MATH] and [MATH] , respectively. Since [MATH] restricted to degeneracy maps in the base is a discrete Grothendieck bifibration as well as injective on objects, we may lift the zig-zag of degeneracy maps between [MATH] and [MATH] to a... |
Lemma 3.5 Let [MATH] be an elegant Reedy category and [MATH] a functor. Assume that [MATH] has pullbacks along face maps whenever the cospan under consideration lies in the image of the projection [MATH] for some [MATH] , that these pullbacks preserve face and degeneracy maps, and that [MATH] preserves these pullbacks.... |
Proof. It will suffice to show that left Kan extension along [MATH] followed by evaluation at [MATH] preserves monomorphisms. By the standard formula for left Kan extensions, this is given by the composite functor |
[EQUATION] where [MATH] is the evident projection. The first arrow clearly preserves monomorphisms. For the second arrow, it will suffice to verify the assumptions of Lemma |
3.4 For this, we note that [MATH] creates an elegant Reedy structure on [MATH] from [MATH] Pullbacks along face maps in [MATH] exist and preserve face and degeneracy maps by the corresponding assumptions on [MATH] , using that [MATH] preserves the relevant pullbacks. |
Proof of Proposition 3.3 As per the diagram ( 3.1 ), the left adjoint in question is equivalent to the functor [EQUATION] given by left Kan extension along the full inclusion [MATH] It will thus suffice to verify that [MATH] satisfies the assumptions of Lemma |
3.5 We write [MATH] for the augmented simplex category. Recall the elegant Reedy structures on [MATH] and [MATH] , created by the full inclusion [MATH] Note that [MATH] has pullbacks along face maps that preserve face and degeneracy maps and that [MATH] preserves these pullbacks. Since [MATH] and [MATH] are fully faith... |
3.3. Quillen adjunctions of model structures Recall the Kan model structure [MATH] Qui67 , characterized by the following data: the cofibrations are the monomorphisms, |
the fibrations are those maps with the right lifting property against horn inclusions [MATH] where [MATH] and [MATH] Alternatively, the fibrations can also be characterized via the right lifting property against pushout products of [MATH] with monomorphisms for [MATH] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.