# A Survey on Malleability Solutions for High-Performance Distributed Computing
## 6 Other Malleability Solutions
### COMPSs-Based Solution  
In [66], the authors develop an ad hoc malleable solution for Alya [67], a CFD software. The work leverages the COMPSs (COMP Superscalar) runtime [68; 69] along with the TALP library [70] to enable performance-aware malleability. The solution is based on the Alya native support of C/R to dynamically resize the number of resources.  
COMPSs is a programming model and runtime system that allows users to write applications in a sequential paradigm, which is later used in runtime to exploit parallelism inherent to the sequential code. Its objective is to avoid users from addressing concurrency, so they are not expected to deal with threading, messaging, or data redistributions. Users are still required to annotate which functions should be executed as asynchronous parallel tasks.  
The runtime was developed initially for grid computing [69] and later on for cloud computing [71]. Nevertheless, the malleable solution in [66] only uses a portion of its features, as only are needed those to communicate with the RMS to allocate or free resources for the user application Alya. The version of COMPSs used is PyCOMPSs [72].  
The application Alya has been parallelized with MPI and has an internal feature to create a checkpoint to the filesystem by using MPI-IO functions. Later on, it can be restarted with any amount of processes and data will be redistributed accordingly.  
Alya is also compiled along with a library called TALP, which monitors the application parallel efficiency in runtime, and if it does not reach a user-defined communication efficiency threshold, Alya will ask COMPSs for more or fewer resources, depending on the performance results.  
The communication between Alya and COMPSs is established via a file. COMPSs periodically reads if Alya has written the possibility for a resize, indicating that it, with the  
Figure 10: EasyGrid AMS—framework [64]. Based on: [[https://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.536.1496&rep=rep1&type=pdf](https://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.536.1496&rep=rep1&type=pdf)]([https://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.536.1496&rep=rep1&type=pdf](https://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.536.1496&rep=rep1&type=pdf)) (accessed on 13 April 2022). Adapted with permission from [64]. Copyright 2004, [PERSON].  
help of TALP, has detected an efficiency improvement. When a resize is scheduled, it is checked whether the job will be expanded or shrunk. If it is expanded:  
* COMPSs communicates with the RMS to obtain new resources.
* Meanwhile, the application continues its execution.
* When the resources are available, COMPSs sends the signal _SIGTERM_ to Alya, which indicates the application to create a checkpoint and stop its execution.
* COMPSs launches again the application with the new resources layout and the created checkpoint. If the job is shrunk:
* COMPSs sends the signal _SIGTERM_ to Alya, which indicates the application to create a checkpoint and stop its execution.
* COMPSs launches again the application without the unneeded resources and the created checkpoint.
* The application continues its execution while COMPSs frees the unneeded resources.  
This solution has only been tested with the CFD application Alya, which has been parallelized purely with MPI.