From 68502f4ab8136a8cb4c4a9968064ee113d5f2636 Mon Sep 17 00:00:00 2001 From: crouzet Date: Mon, 4 Dec 2017 15:42:26 +0100 Subject: [PATCH] add doc for launcher & application, correct bug on CentOS version --- doc/src/commands/application.rst | 50 ++++++++++++++++++++++++++++++ doc/src/commands/launcher.rst | 42 +++++++++++++++++++++++++ doc/src/index.rst | 2 ++ src/architecture.py | 4 ++- src/internal_config/distrib.pyconf | 2 +- 5 files changed, 98 insertions(+), 2 deletions(-) create mode 100644 doc/src/commands/application.rst create mode 100644 doc/src/commands/launcher.rst diff --git a/doc/src/commands/application.rst b/doc/src/commands/application.rst new file mode 100644 index 0000000..5e414c2 --- /dev/null +++ b/doc/src/commands/application.rst @@ -0,0 +1,50 @@ +*********** +application +*********** + +Description +=========== +The **application** command creates a virtual SALOME application. +Virtual SALOME applications are used to start SALOME when distribution is needed. + +Usage +===== +* Create an application: :: + + sat application + + Create the virtual application directory in the salomeTool application directory, i.e. ``$APPLICATION.workdir`` + +* Give a name to the application: :: + + sat application --name MYAPP + + *Remark*: this option overrides the name given in the virtual_app section of the configuration file (``$APPLICATION.virtual_app.name``). + +* Change the directory where the application is created: :: + + sat application --target + +* Set a specific SALOME resources catalog (it will be used for the distribution of components on distant machines): :: + + sat application --catalog + + Note that the catalog specified will be copied to the application directory. + +* Generate the catalog for a list of machines: :: + + sat application --gencat machine,machine2,machine3 + + This will create a catalog by querying each machine through ssh protocol (memory, number of processor) with ssh. + + +Configuration +============= +The virtual application can be configured with the virtual_app section of the configutation file. +* APPLICATION.virtual_app + + * **name**: name of the launcher (to replace the default runAppli). + * **application_name**: (optional) the name of the virtual application directory. + + * if missing the default value is '$name + _appli'. + diff --git a/doc/src/commands/launcher.rst b/doc/src/commands/launcher.rst new file mode 100644 index 0000000..a4912a9 --- /dev/null +++ b/doc/src/commands/launcher.rst @@ -0,0 +1,42 @@ +******** +launcher +******** + +Description +=========== +The **launcher** command creates a SALOME launcher (a python command to start SALOME). + + +Usage +===== +* Create a launcher: :: + + sat launcher + + Generate a launcher in the application directory, i.e ``$APPLICATION.workdir``. + +* Create a launcher with a given name :: + + sat launcher + + The launcher will called ZeLauncher. + +* Set a specific resources catalog: :: + + sat launcher + + Note that the catalog specified will be copied to the profile directory. + +* Generate the catalog for a list of machines: :: + + sat launcher + + This will create a catalog by querying each machine (memory, number of processor) with ssh. + +Configuration +============= +* APPLICATION.profile + + * **product**: the name of the profile product (the product in charge of holding the application stuff, like logos, splashscreen) + * **launcher_name**: the name of the launcher. + diff --git a/doc/src/index.rst b/doc/src/index.rst index 9ac0362..9ce9148 100644 --- a/doc/src/index.rst +++ b/doc/src/index.rst @@ -29,6 +29,8 @@ List of Commands config prepare compile + launcher + application log Code documentation diff --git a/src/architecture.py b/src/architecture.py index 8e16c22..c2cd5ba 100644 --- a/src/architecture.py +++ b/src/architecture.py @@ -114,6 +114,8 @@ def get_distrib_version(distrib, codes): if version in codes[distrib]: version = codes[distrib][version] + if distrib == "CO": + version=version[0] #for centos, we only care for major version return version def get_python_version(): @@ -139,4 +141,4 @@ def get_nb_proc(): nb_proc=multiprocessing.cpu_count() except : nb_proc=int(os.sysconf('SC_NPROCESSORS_ONLN')) - return nb_proc \ No newline at end of file + return nb_proc diff --git a/src/internal_config/distrib.pyconf b/src/internal_config/distrib.pyconf index 77cefc2..1d15c71 100644 --- a/src/internal_config/distrib.pyconf +++ b/src/internal_config/distrib.pyconf @@ -67,7 +67,7 @@ VERSIONS : } "CO": { - "7.1.1503": "7.1" + "7.1.1503": "7" "7.2.1511": "7" "7.3.1611": "7" "6.1" : "6" -- 2.39.2