Package: jumonc
Installation|Execution|Security|Plugins|Further documentation|Getting help|Acknowledgments|JuMonCJuMonC stands for "Jülich monitoring and control" and allows easier access to monitor running simulations and provides data using a REST-API.InstallationJuMonC can be installed usingpip:pip install JuMonCThis also creates an entry point, allowing to start JuMonC with just the commandJuMonCRuntime dependenciespython3minimum version 3.6mpi4pyflaskflask-loginFlask-SQLAlchemypluggytyping-extensionin case you are using python version <=3.9Optional runtime dependenciespython-papipynvmlpsutilpyopensslExtrasJuMonC allows installation with extras for the optional dependencies. Some of them need installed software on the system, that is not part of the PyPi installation, so that still has to be provided. It still makes the setup easier. Currently the following options for the extras are avaiable:PAPI: For use of PAPINVLM: For use of NVMLGPU: For use of GPU functionality, for now only adds the use of NVMLpsutil: For use of psutilSSL: Only needed when using adhoc certificatesFull: All of the above dependencies provided at onceDevel: Includes the ful ldependencies and installs all tools neeeded for CI as well, to allow local testsThese extras can be used like this:pip install JuMonC[psutil,SSL]ExecutionJuMonC needs to be started parallel to your running simulation and needs one mpi process on each node your simulation is using. The actual REST-API will only be avaiable on node 0 and then communicate internaly using mpi.It can be started by runningsrun -n <#nodes> --ntasks-per-node=1 JuMonC &Because we want to run JuMonC in parallel with other srun jobs, it is important to reduce the allocated resources (especially the implicit), so other jobs can start as well.--mem-per-cpu 1000M: reduce memeory for JuMonC-G0: do not allocate GPUs for JuMonC--exact: do not over allocateDepending on your usecase--oversubscribeor--overlapmay be usefull as well.By default, this will start the REST-API on port 12121 on rank 0 of this allocation. The port can be changed by providing-p=<port>. Depending on the firewall rules of the system you are using, it might be necessary to use a ssh-tunnel to forward this endpoint of the API to somewhere else where you can access it.SecurityAuthorizationSecurity is always a concern, and to block unauthorized access of this API there is a scope based token authorization included. This means each action requires authorization, with different tokens having a different scope of allowed actions. The tokens included by default and printed tostdouton startup are hierarchical, therefore every token includes the authorized functions of all lower tokens:see_linksretrieve_datacompute_dataretrieve_simulation_datacompute_simulation_datafullThere are two options to prove your authorization, either cookie based by providing the token once in the login function (e.g./login?token=12345678) or providing it by every API call as an additional parameter (e.g./v1/network?token=12345678).EncryptionJuMonC offers two different modes to use encryption for accessing the REST-API. One uses adhoc generated certificates, the other one allows you to supply your own certificates.adhoc certificates:depending on the used software to acces JuMonC you will get a warning or by default (e.g. Mozilla firefox) a complete blocking of the connection (e.g. curl) that you need to accept or override. This is due to the certificates not having any chain of trust to already trusted certificates.you need to havepyopensslavaiable to use adhoc certificatesused with--SSL_ENABLEDProviding certificatesYou can generate your own self-singed certificates using for exampleopenssl req -x509 -newkey rsa:4096 -nodes -out cert.pem -keyout key.pem -days 365This leads to the same warings as the adhoc certificates, but allows a manual control of the signed certificateusing this methods needs three arguments, one for enabeling SSL--SSL_ENABLEDand one each for the certificate and the key--SSL_CERT=/path/to/cert.pem --SSL_KEY=/path/to/key.pem. The paths can either be absolute paths or relatic paths from the current working directory.PluginsJuMonC's functionality can be extended by plugins. To see about the development of your own plugins visit theLogParserplugin as an example, or see theplugin developmentdocumentation.Currently avaiable plugins for JuMonC:LogParserFurther documentationREST-APIPossible cmd argumentsor using the-hflagJuMonC_overviewPlugin developmentExample usesGetting helpOpen anissueAcknowledgmentsJuMonC has been developed as part of theCoECproject, the CoEC project has received funding from the European Union’s Horizon 2020 research and innovation programm under grant agreement No 952181.