How do you use a supercomputer?

How do you use a supercomputer?

To be honest, this post should have been written before the previous one. But as they say, better late than never.

If the previous post consisted of describing the theoretical principles behind an aerodynamics simulation, this one is going to deal with the actual user-level experience of doing it in a supercomputer. Again, the aim is that absolutely anyone that ends up in this post is able to understand what I am writing about. Feel free to drop a comment if something is not clear enough.

From now on, let’s assume that, by whatever reason, you have been given the opportunity to use a supercomputer. The post is going to be about how the experience would be, and what you would have to do in order to be able to use it, as opposed to a regular computer.

How do I turn it on?

That is indeed a logic question. When you want to use your personal computer, the first thing that you have to do is to push the on/off button. However, things work completely differently in that respect in a supercomputer. A supercomputer is always on.

As I said in the previous article, one can think of a supercomputer as a regular computer that features many more processors, much more RAM and, eventually, a much bigger size. But there are many other differences that I purposely omitted last time.

To begin with, a supercomputer is so large that it is rarely used just by one user at a time. Typically, many different users are connected to it, performing completely independent tasks. And the word connected is highlighted because it is very relevant: you do not physically use the supercomputer, bur rather you remotely connect your computer to it: you gain access to it by typing an address (a username) and its associated password, and then you can use it from your computer as if you were using your own computer. For you, the supercomputer will be just one more window in your computer. With the key difference that the simulations that you will run will not be physically run by your computer (i.e. you will not hear the sound of the fans revving up). They will be integrally run in the supercomputer, which may be on the other side of the wall, or thousands of kilometres away from. For those of you who have already connected to another computer via Team Viewer, this concept will be more familiar.

The as if you were using your own computer sentence is also a little optimistic and, essentially, inaccurate. There will indeed be some major differences, especially from a Windows-user perspective.

The most intuitive difference will be that, in the first instance, you will not be able to access the files and the programs that are installed in your personal computer when you are in the supercomputer window. So if you want to make use of some of your PC/laptop files in the supercomputer, you will have to find a way to transfer them. Of course, there are easy solutions to accomplish that task. But is something that must be kept in mind: even if you see the supercomputer just as a window opened in your computer, it is not possible to do things like dragging and dropping files into it. It is still a different computer.

Windows? What is that?

The other key difference (and this is why I mentioned the Windows-user perspective aspect above) is that the vast majority of supercomputers run Linux instead of Windows or any other operating system, for a variety of reasons (customizability, licensing or potential users knowledge). So if your PC runs Windows and you have never used Linux, this also constitutes a great difference.

Screenshot of my login running session in the Salomon supercomputer, taken at the very moment I was writing this post. Own elaboration.

Of course, Linux is far from being something exclusive of supercomputers, and this post is not intended to describe the differences between Windows and Linux. But still, I think that a general view of how to deal with a supercomputer cannot be provided without saying something about Linux.

When working with Linux, the most efficient way of navigating through the computer and to perform tasks is not by making use of a mouse and double-clicking in icons, which is the conventional way of working in Windows. In Linux, once you are connected to the supercomputer, you enter into the folders or into the files by writing commands in the terminal, something that is represented in the image above. For example, if we are on the desktop, we can type ls and hit enter, and we will get a list of folders and files out there, even if we cannot see them directly. And if we want to enter a folder, we will write cd + name of the folder and hit again enter, instead of double-clicking on the folder. ls and cd are just two of the many commands that make that, once dominated bash and the shell (which can be said to be the language and the internal program on which all this is based), working in Linux is very efficient.

Another different question is how one can connect to a Linux-based supercomputer from a Windows-based personal computer, which is often the case. However, this is something more difficult to explain than to actually do and does not add much value to the post, so it will be set aside on this occasion.

I want to use a supercomputer. Is this possible?

Yes, you can use a supercomputer if you want. But you have to truly want it, which means that you have to present a project that is deemed to be worthy of those resources. If you are successful, you will be provided with a given amount of core hours, which basically represent the amount of time that you can make use of the supercomputer. The actual time will depend on how many of its processors you use (that is the reason why the time is distributed in core hours and not simply in hours of usage).

For example, the European computers that belong to the PRACE network periodically hold a contest in which the available core hours of the supercomputer for a period of time are assigned to the best projects. In particular, the rules applying to the current contest for the supercomputers’ resources here in Ostrava can be found here.

What happens if the supercomputer is overcrowded?

Since the core hours are distributed among the users only once every several months, the users have a fair amount of freedom to choose when to make use of the supercomputer. It may happen that, suddenly, many users want to work with the supercomputer at the same time. This is something that happens from time to time, and in fact, it was happening at the moment in which I took the image above (the capital Q’s that mean that the simulations that I want to run are in the queue, waiting for others to finish).

This issue is so important, that there is a whole world of investigation around it. Because, how do we decide which user should hold preference when using the supercomputer? In order to make it as fair as possible, complex algorithms (called job scheduling algorithms) are implemented to distribute the time among the users in an appropriate way, taking into account factors such as how much time has that user already consumed, how long will their simulations take, etc. A very nice introduction to this topic was provided by one of last year’s Summer of HPC participants in its final presentation.

Conclusions

The objective of this post was to make you imagine how it would be to use a supercomputer, specially in the case that it is a situation you will never face in your life. I do not know what level of immersion I have reached, but at least I hope this will be useful for you to have a rough idea of what this world is about. Next time, when people tell you about supercomputing, you can answer: “Hey, you are not going to impress me with that. I know what you are talking about!”.

——————————————————————————————————–

Ahora, ¡en español!

¿Cómo se usa un superordenador?

Siendo honesto, este post debería haber sido escrito antes que el anterior. Pero más vale tarde que nunca.

Si el post anterior consistía en describir los principios teóricos de una simulación aerodinámica, este va a tratar sobre la experiencia real de hacerlo en un superordenador a nivel de usuario. Una vez más, el objetivo es que cualquier persona que acabe en este post sea capaz de entender de lo que estoy escribiendo. Siéntete libre de escribir un comentario si algo no está lo suficientemente claro.

De ahora en adelante, supongamos que, por cualquier razón, te han dado la oportunidad de usar un superordenador. El post va a ir sobre cómo sería la experiencia, y qué tendrías que hacer para poder usarlo diferente de lo que harías en un ordenador normal.

¿Cómo lo enciendo?

Esta es una pregunta bastante lógica. Cuando uno quiere utilizar su ordenador personal, lo primero que tiene que hacer es pulsar el botón de encendido/apagado. Sin embargo, las cosas funcionan de forma completamente diferente en un superordenador. Un superordenador siempre está encendido.

Como dije en el artículo anterior, uno puede pensar en un superordenador como un ordenador normal que cuenta con muchos más procesadores, mucha más RAM y, en definitiva, un tamaño mucho mayor. Pero hay muchas otras diferencias que omití a propósito en el último post.

Para empezar, un superordenador es tan grande que rara vez es utilizado por un solo usuario a la vez. Lo normal es que muchos usuarios diferentes estén conectados al mismo tiempo, realizando tareas completamente independientes. Y la palabra conectados está resaltada porque es muy importante: el superordenador no se utiliza físicamente, sino que el usuario se conecta a él de forma remota: se accede a él escribiendo una dirección (un nombre de usuario) y su contraseña asociada, y se utiliza desde el ordenador personal. Para ti, el superordenador será sólo una ventana más en tu ordenador, con la diferencia clave de que las simulaciones que se ejecutarán no serán ejecutadas físicamente por el ordenador (es decir, no se oirá el sonido de los ventiladores de tu ordenador acelerando). Se ejecutarán integralmente en el superordenador, que puede estar al otro lado de la pared, o a miles de kilómetros de distancia. Para aquellos que ya se han conectado a otro ordenador a través de Team Viewer, este concepto será más familiar.

La frase como si estuvieras usando tu propio ordenador es un poco optimista y, esencialmente, inexacta. Realmente, habrá algunas diferencias importantes, especialmente desde la perspectiva del un usuario acostumbrado a Windows.

La diferencia más intuitiva será que, al principio, no podrás acceder a los archivos y programas que están instalados en su ordenador personal cuando estés en la ventana del superordenador. Por lo tanto, si quieres utilizar algunos de los archivos de tu PC/laptop en el superordenador, tendrás que encontrar una forma de transferirlos. Por supuesto, hay soluciones fáciles para llevar a cabo esa tarea. Pero es un ejemplo de algo que hay que tener en cuenta: incluso si se ve el superordenador como una ventana abierta en el ordenador, no es posible hacer cosas como arrastrar y soltar archivos en él, o copiar y pegar sin más. Sigue siendo un ordenador diferente.

¿Windows? ¿Qué es eso?

La otra diferencia clave (y es por esto que mencioné el aspecto de la perspectiva del usuario de Windows arriba) es que la gran mayoría de los superordenadores están bassados en Linux en en vez de en Windows o cualquier otro sistema operativo, debido a diferentes motivos (capacidad de personalización, licencias o conocimiento de los usuarios potenciales). Por lo tanto, si tu PC está basado en Windows y nunca has utilizado Linux, esto también constituirá una gran diferencia entre usar tu ordenador habitual y usar un superordenador.

Captura de pantalla de mi sesión conectado al superordenador Salomon, tomada mientras escribía este post. Elaboración propia.

Por supuesto, Linux está lejos de ser algo exclusivo de los superordenadores, y este artículo no pretende describir las diferencias entre Windows y Linux. Pero aun así, creo que no se puede dar una visión general de cómo tratar con un superordenador sin hablar un poco sobre Linux.

Cuando se trabaja con Linux, la forma más eficaz de navegar por el ordenador y realizar tareas no es utilizando el ratón y haciendo doble clic en los iconos, que es la forma convencional de trabajar en Windows. En Linux, una vez conectado al superordenador, se entra en las carpetas o en los archivos escribiendo comandos (líneas de texto) en la terminal, algo que está representado en la imagen de arriba. Por ejemplo, si estamos en el escritorio, podemos escribir ls y darle al enter, y nos aparecerá una lista de las carpetas y archivos que hay, aunque no los podamos ver directamente. Y si queremos entrar en una carpeta, escribiremos cd + nombre de la carpeta y le daremos al enter, en vez de hacer doble click encima de la carpeta. ls y cd son solo dos de los muchos comandos que hacen que, una vez dominado bash y la shell (que digamos que son el lenguaje y el programa interno en el que todo esto está basado), trabajar en Linux sea muy eficiente.

Otro tema diferente es cómo es posible conectarse a un superordenador basado en Linux desde un ordenador personal basado en Windows, que suele ser el caso. Sin embargo, eso es más difícil de explicar que de hacer y no añade mucho valor al post, por lo que se esta vez no voy a hablar de ello.

Quiero usar un superordenador. ¿Es posible?

Sí, puedes usar un superordenador si quieres. Pero hay que querer de verdad, lo que significa que hay que presentar un proyecto que se considere digno de esos recursos. Si tienes éxito, se te proporcionará una cantidad determinada de horas de procesador, que básicamente representan la cantidad de tiempo que podrás hacer uso del superordenador. El tiempo real que puedas usarlo dependerá de cuántos de los procesadores del superordenador utilices (esa es la razón por la que el tiempo se distribuye en horas de procesador, y no simplemente en horas de uso).

Por ejemplo, los ordenadores europeos que pertenecen a la red PRACE celebran periódicamente un concurso en el que las horas de procesador disponibles en el superordenador durante un período de tiempo se asignan a los mejores proyectos. En concreto, las reglas que se aplican al concurso para los recursos de los superordenadores aquí en Ostrava se pueden encontrar en este enlace.

¿Qué ocurre si demasiada gente quiere usar el superordenador a la vez?

Dado que las horas de procesador se distribuyen entre los usuarios solo una vez cada varios meses, los usuarios tienen una gran libertad para elegir cuándo hacer uso del superordenador. Puede ocurrir que, de repente, muchos usuarios quieran trabajar con el superordenador al mismo tiempo. Esto es algo que sucede de vez en cuando, y de hecho, estaba sucediendo en el momento en que tomé la imagen de arriba. Las cus mayúsculas (Q) significan que las simulaciones que quiero ejecutar están en la cola, esperando a que otras terminen.

Este tema es tan importante que hay todo un mundo de investigación a su alrededor. Porque, ¿cómo decidimos qué usuario debe tener preferencia a la hora de utilizar el superordenador? Para que sea lo más justo posible, se implementan unos algoritmos complejos (llamados algoritmos de planificación de tareas) para distribuir el tiempo entre los usuarios de forma adecuada, teniendo en cuenta factores como el tiempo que el usuario ya ha consumido, el tiempo que tardarán sus simulaciones, etc. Una introducción muy interesante a este tema fue dada por uno de los participantes del Summer of HPC del año pasado en su presentación final.

Conclusiones

El objetivo de este post era hacerte imaginar cómo sería usar un superordenador, especialmente en el caso de que sea una situación que no ocurrirá en tu vida. No sé si he conseguido un gran nivel de inmersión, pero al menos espero que te sirva para tener una idea aproximada de lo que es este mundo. La próxima vez, cuando la gente te hable de supercomputación, puedes responder: “Oye, no te creas que me vas a impresionar con eso. ¡Sé de lo que hablas!”.

Hi! I am an Aerospace Engineering student passionate about Motorsports and Aerodynamics. Scientific outreach is one of my main goals.

Tagged with: , , , , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.