Stations de modélisation : Différence entre versions

Un article de Informaticiens département des sciences de la Terre et l'atmosphère
Aller à: navigation, charcher
m (DNS)
m (PBS(batch) (devrait maintenant marcher avec 18.04))
 
(22 révisions intermédiaires par 2 utilisateurs non affichées)
Ligne 1: Ligne 1:
 
{{TOC right}}
 
{{TOC right}}
{{Bilangbox
+
 
|
 
 
en construction(cette page s'adresse aux installateurs)<br>  
 
en construction(cette page s'adresse aux installateurs)<br>  
|
+
 
 
under construction(this page is for installers)<br>  
 
under construction(this page is for installers)<br>  
}}
 
  
 +
 +
 
== installation type des postes de modélisation  ==
 
== installation type des postes de modélisation  ==
  
Ligne 31: Ligne 31:
  
 
[[liste des packages|'''Recettes d'installation des packages''']]
 
[[liste des packages|'''Recettes d'installation des packages''']]
 +
 +
==Création volumes logiques ==
 +
 +
lsscsi                                        # list scsi disks (maybe after iscsi login to initialize a device)
 +
dd if=/dev/zero of=/dev/sdxxx bs=1M count=1  # blank the label and the first sectors
 +
pvcreate /dev/sdxxx                          # create phycical volume
 +
vgcreate name_of_vg /dev/sdxxx                # create volume group
 +
lvcreate -L size_of_volume -n name_of_lv name_of_vg  # create logical volume (look at 'vgdisplay name_of_vg' to compute size)
 +
mkfs -t ext4 /dev/name_of_vg/name_of_lv      # format the logical volume
 +
mount /dev/name_of_vg/name_of_lv /path_of_lv  # mount logical volume
 +
 +
== Augmentation de taille d'un volume logique==
 +
 +
  lvextend -LXXG /dev/name_of_vg/name_of_lv
 +
  resize2fs /dev/name_of_vg/name_of_lv
 +
 +
== Effacer volumes logique ==
 +
  lvremove /dev/name_of_vg/name_of_lv
 +
 +
== Réduire volume logique==
 +
  lvreduce -l -XXXX /dev/name_of_vg/name_of_lv
 +
 +
== volumes ISCSI (exemple) ==
 +
 +
# acquisition
 +
iscsiadm -m discovery -t st -p 192.168.10.xxx
 +
iscsiadm -m node  -p 192.168.10.xxx --targetname iqn.2004-04.com.yyy:ts-2483xu-rp:iscsi.zzzzzz.397bdf --login
 +
lsscsi  # list scsi disks
 +
vgscan  # scan volume groups
 +
lvscan  # scan logical volumes
 +
vgchange -ay the_volume_group
 +
mount .....
 +
 +
# disposition
 +
umount ...
 +
vgchange -an the_volume_group    # deactivate the volume group
 +
iscsiadm -m node  -p 192.168.10.xxx --targetname iqn.2004-04.com.yyy:ts-2483xu-rp:iscsi.zzzzzz.397bdf --logout
  
 
== a rajouter dans /etc/hosts (serveurs de licence) ==
 
== a rajouter dans /etc/hosts (serveurs de licence) ==
Ligne 62: Ligne 99:
 
   
 
   
 
  apt install autoconf cmake tcl tk libxml2-dev libboost-all-dev libpam0g-dev tcl8.6-dev tk8.6-dev libssl-dev libtool-bin
 
  apt install autoconf cmake tcl tk libxml2-dev libboost-all-dev libpam0g-dev tcl8.6-dev tk8.6-dev libssl-dev libtool-bin
 +
 +
apt install ksh environment-modules
  
 
== Acrobat Reader (optionel) ==
 
== Acrobat Reader (optionel) ==
Ligne 70: Ligne 109:
 
  gdebi AdbeRdr9.5.5-1_i386linux_enu.deb
 
  gdebi AdbeRdr9.5.5-1_i386linux_enu.deb
  
== ENVIRONNEMENT ==
+
== ENVIRONNEMENT (normalement déjà fait) ==
 
   mkdir /unique /sca
 
   mkdir /unique /sca
 
   # nécessaire pour trouver certains fichiers de configuration  
 
   # nécessaire pour trouver certains fichiers de configuration  
Ligne 82: Ligne 121:
 
  Ubuntu 18.04
 
  Ubuntu 18.04
 
  nmcli c show  # s'assurer que c'est bien "Wired connection 1"  
 
  nmcli c show  # s'assurer que c'est bien "Wired connection 1"  
  nmcli c modify "Wired connection 1" +ipv4.dns-search sca.uqam.ca
+
  nmcli c modify "Wired connection 1" ipv4.dns-search,sca.uqam.ca
 
  nmcli c down "Wired connection 1" && nmcli c up "Wired connection 1"  # ou reboot
 
  nmcli c down "Wired connection 1" && nmcli c up "Wired connection 1"  # ou reboot
 +
 +
# on pourrait selon le cas devoir utiliser "Unifi" au lieu de "Wired connection 1"
  
 
  vieille recette:
 
  vieille recette:
Ligne 95: Ligne 136:
 
  resolvconf -u
 
  resolvconf -u
  
== PBS(batch) (pas testé 16.04, ne marche pas 18.04) ==
+
== PBS(batch) (devrait maintenant marcher avec Ubuntu 18.04 et Centos 7 et 8) ==
  la recette d'installation se trouve dans le fichier
+
 
 +
  la recette d'installation pour Ubuntu 14.04 se trouve dans le fichier
 
  /unique/armnssm/sw/INSTALL/pbs-torque
 
  /unique/armnssm/sw/INSTALL/pbs-torque
 
  (depuis l'installation des packages jusqu'a la configuration)
 
  (depuis l'installation des packages jusqu'a la configuration)
 +
 +
pour Ubuntu 18.04 :
 +
nouveaux installeurs dans:  /sca/Ubuntu-18.04/PBS/
 +
 +
cp /sca/Ubuntu-18.04/PBS/* .
 +
rm -f torque-package-devel-linux-x86_64.sh
 +
 +
./torque-package-pam-linux-x86_64.sh --install
 +
./torque-package-server-linux-x86_64.sh --install
 +
./torque-package-mom-linux-x86_64.sh --install
 +
./torque-package-doc-linux-x86_64.sh --install
 +
./torque-package-clients-linux-x86_64.sh --install
 
   
 
   
  nouveaux installeurs dans:
+
  cp pbs_* /etc/init.d/.
  /sca/Ubuntu-18.04/PBS/
+
  torque-package-clients-linux-x86_64.sh
+
  hostname > /var/spool/torque/server_name
  torque-package-devel-linux-x86_64.sh
+
  torque-package-doc-linux-x86_64.sh
+
  ./torque.setup administrateur $(hostname)
  torque-package-mom-linux-x86_64.sh
+
  torque-package-pam-linux-x86_64.sh
+
  ./qmgr_setup.sh
  torque-package-server-linux-x86_64.sh
+
   
 +
/etc/init.d/pbs_mom start
 +
pbsnodes
 +
  /etc/init.d/pbs_sched start
 +
 
 +
  pour Centos 7 et 8 :
 +
  voir https://wikiscta.scta.uqam.ca/wikiscta/index.php/Logiciels_sur_les_serveurs#PBS
  
 
== divers ==
 
== divers ==
Ligne 116: Ligne 176:
 
  cd /usr/lib/x86_64-linux-gnu ; ln -s libnuma.so.1 libnuma.so
 
  cd /usr/lib/x86_64-linux-gnu ; ln -s libnuma.so.1 libnuma.so
 
  (pour les compilateurs)
 
  (pour les compilateurs)
 
dpkg --add-architecture i386  # to install 32 bit libraries needed by some packages
 
  
 
== recettes d'installation (..../configure) pour serveurs / postes de modélisation  ( Installation binaire )==  
 
== recettes d'installation (..../configure) pour serveurs / postes de modélisation  ( Installation binaire )==  
Ligne 228: Ligne 286:
 
  #chown armnssm /local/data/unique
 
  #chown armnssm /local/data/unique
 
  #(ou tout autre nom approprié et ajuster /etc/rc.local
 
  #(ou tout autre nom approprié et ajuster /etc/rc.local
 +
 +
== miniconda/pyngl ==
 +
aller chercher l'installeur pour Linux (Python 3) dans
 +
https://conda.io/miniconda.html
 +
 +
cd /sca/compilers_and_tools/python
 +
wget .......
 +
chmod 755 ./Miniconda3-latest-Linux-x86_64.sh
 +
 +
installer miniconda
 +
./Miniconda3-latest-Linux-x86_64.sh -b -f -p /sca/compilers_and_tools/python/miniconda3
 +
 +
preparer le module miniconda3 (/sca/modulefiles/python/miniconda3)
 +
 +
#%Module1.0
 +
prepend-path    PATH            /sca/compilers_and_tools/python/miniconda3/bin
 +
prepend-path    LD_LIBRARY_PATH /sca/compilers_and_tools/python/miniconda3/lib
 +
prepend-path    MANPATH        /sca/compilers_and_tools/python/miniconda3/share/man
 +
 +
module load python/miniconda3
 +
 +
conda create --name pynngl3 --channel conda-forge pynio pyngl
 +
 +
pour utiliser pyngl/pynio :
 +
 +
module load python/miniconda3
 +
source activate pynngl3
 +
 +
examples found in :
 +
/sca/compilers_and_tools/python/miniconda3/pkgs/pyngl-1.6.0-py36h4217dbb_0/info/test/examples/

Version actuelle datée du 13 d'avril 2020 à 09:31

en construction(cette page s'adresse aux installateurs)

under construction(this page is for installers)


installation type des postes de modélisation

  • Système d'exploitation
    Linux, distribution Kubuntu 18.04 LTS
  • partitions
    • disque no 1
      • partitions primaires
        • (1) swap (taille de la mémoire vive
        • (2)/  50GB
        • (3) /tmp 50GB (peut servir pour installation d'une autre distro)
      • partitions logiques
        • (4) /home_backup  20GB (sauvegarde des home)
        • (5) /opt 20GB
        • (6)  /usr/local 20GB
        • (7) /local (le reste du disque)
    • disque no 2
      • partitions primaires
        • (1) /home  20GB
        • (2) /data/local (le reste du disque)
  • logiciel local (copié/importé à partir des serveurs)
    • environnement "rmnlib/ssm" (Environnement Canada)
    • compilateurs Fortran (gfortran, Portland Group, Intel)
    • matlab

Recettes d'installation des packages

Création volumes logiques

lsscsi                                        # list scsi disks (maybe after iscsi login to initialize a device)
dd if=/dev/zero of=/dev/sdxxx bs=1M count=1   # blank the label and the first sectors
pvcreate /dev/sdxxx                           # create phycical volume
vgcreate name_of_vg /dev/sdxxx                # create volume group
lvcreate -L size_of_volume -n name_of_lv name_of_vg  # create logical volume (look at 'vgdisplay name_of_vg' to compute size)
mkfs -t ext4 /dev/name_of_vg/name_of_lv       # format the logical volume
mount /dev/name_of_vg/name_of_lv /path_of_lv  # mount logical volume

Augmentation de taille d'un volume logique

 lvextend -LXXG /dev/name_of_vg/name_of_lv
 resize2fs /dev/name_of_vg/name_of_lv

Effacer volumes logique

 lvremove /dev/name_of_vg/name_of_lv

Réduire volume logique

 lvreduce -l -XXXX /dev/name_of_vg/name_of_lv 

volumes ISCSI (exemple)

# acquisition
iscsiadm -m discovery -t st -p 192.168.10.xxx
iscsiadm -m node  -p 192.168.10.xxx --targetname iqn.2004-04.com.yyy:ts-2483xu-rp:iscsi.zzzzzz.397bdf --login
lsscsi   # list scsi disks
vgscan  # scan volume groups
lvscan  # scan logical volumes
vgchange -ay the_volume_group
mount .....

# disposition
umount ...
vgchange -an the_volume_group    # deactivate the volume group
iscsiadm -m node  -p 192.168.10.xxx --targetname iqn.2004-04.com.yyy:ts-2483xu-rp:iscsi.zzzzzz.397bdf --logout

a rajouter dans /etc/hosts (serveurs de licence)

132.208.132.18 st1 st1.cluster10.local
132.208.132.28 st2 st2.cluster10.local
132.208.148.10 skynet1 skynet1.cluster10.local  hn.cluster10.local
132.208.132.184 skynet3 skynet3.cluster10.local skynet3.sca.uqam.ca

a rajouter dans /etc/fstab (environnement logiciel)

132.208.132.84:/home /unique nfs ro,noatime
132.208.132.84:/home/sca /sca nfs ro,noatime

apt install --dry-run nfs-client
apt install nfs-client
mkdir -p /unique /sca
mount /unique
mount /sca

EXTRA PACKAGES

cd /root
cp /unique/armnssm/sw/INSTALL/packages.18.04_NOXFCE  .
ulimit -m unlimited
ulimit -s unlimited
ulimit -d unlimited
dpkg --add-architecture i386   # to install 32 bit libraries needed by some packages
apt update
apt dist-upgrade
apt install --dry-run $( xargs <packages.18.04_NOXFCE)    # s'assurer que tout va bien
apt install           $( xargs <packages.18.04_NOXFCE)    # si tout va bien

apt install autoconf cmake tcl tk libxml2-dev libboost-all-dev libpam0g-dev tcl8.6-dev tk8.6-dev libssl-dev libtool-bin

apt install ksh environment-modules

Acrobat Reader (optionel)

cd /root
wget ftp://ftp.adobe.com/pub/adobe/reader/unix/9.x/9.5.5/enu/AdbeRdr9.5.5-1_i386linux_enu.deb
apt install libxml2:i386 gdebi-core
gdebi --apt-line AdbeRdr9.5.5-1_i386linux_enu.deb   # s'assurer que tout va bien
gdebi AdbeRdr9.5.5-1_i386linux_enu.deb

ENVIRONNEMENT (normalement déjà fait)

 mkdir /unique /sca
 # nécessaire pour trouver certains fichiers de configuration 
 # (changer 132.208.132.84 pour le nom du nouveau serveur le cas échéant)
 mount -o ro 132.208.132.84:/home /unique    # ancien environnement (copie secondaire)
 mount -o ro 132.208.132.84:/home/sca /sca   # nouvel environnement (copie secondaire)

DNS

pour ajouter sca.uqam.ca a la liste de domaines a fouiller

Ubuntu 18.04
nmcli c show  # s'assurer que c'est bien "Wired connection 1" 
nmcli c modify "Wired connection 1" ipv4.dns-search,sca.uqam.ca
nmcli c down "Wired connection 1" && nmcli c up "Wired connection 1"   # ou reboot
  1. on pourrait selon le cas devoir utiliser "Unifi" au lieu de "Wired connection 1"
vieille recette:

vi /etc/resolvconf/resolv.conf.d/tail
rajouter:
search sca.uqam.ca
dans le fichier

executer:
resolvconf -u

PBS(batch) (devrait maintenant marcher avec Ubuntu 18.04 et Centos 7 et 8)

la recette d'installation pour Ubuntu 14.04 se trouve dans le fichier
/unique/armnssm/sw/INSTALL/pbs-torque
(depuis l'installation des packages jusqu'a la configuration)
pour Ubuntu 18.04 :
nouveaux installeurs dans:  /sca/Ubuntu-18.04/PBS/

cp /sca/Ubuntu-18.04/PBS/* .
rm -f torque-package-devel-linux-x86_64.sh

./torque-package-pam-linux-x86_64.sh --install
./torque-package-server-linux-x86_64.sh --install
./torque-package-mom-linux-x86_64.sh --install
./torque-package-doc-linux-x86_64.sh --install
./torque-package-clients-linux-x86_64.sh --install

cp pbs_* /etc/init.d/.

hostname > /var/spool/torque/server_name

./torque.setup administrateur $(hostname)

./qmgr_setup.sh

/etc/init.d/pbs_mom start
pbsnodes
/etc/init.d/pbs_sched start
pour Centos 7 et 8 :
voir https://wikiscta.scta.uqam.ca/wikiscta/index.php/Logiciels_sur_les_serveurs#PBS

divers

cd /lib64 ; ln -s /lib/x86_64-linux-gnu/libc.so.6
(pour éviter des protestations au lancement de matlab)

Ubuntu 16.04/18.04
cd /usr/lib/x86_64-linux-gnu ; ln -s libnuma.so.1 libnuma.so
(pour les compilateurs)

recettes d'installation (..../configure) pour serveurs / postes de modélisation ( Installation binaire )

comment rebâtir gfortran

comment rebâtir mpi(openmpi)

comment rebâtir boost

pour bâtir Maestro (ordonnanceur de travaux)

 les dépôts git:
   https://github.com/racetted/maestro.git
   https://github.com/racetted/maestro-manager.git
   https://github.com/racetted/maestro-tcl.git
   https://github.com/racetted/maestro-utils.git
   https://github.com/racetted/xflow.git
 
 cd /HOME/armnssm/MAESTRO  (comme armnssm sur beluga)
 cloner les 5 dépôts (une fois)
 s'assurer que les depots sont à la bonne version (tag 1.5.0)
 git checkout -b branch_1.5.0 1.5.0  (au besoin)
 
 (cd maestro ; make clean ; make CC='cc -march=core2 -mno-sse3' )
 (cd maestro-manager ; make clean ; make )
 (cd maestro-utils ; make clean ; make )
 (cd xflow/ssm ; make clean ; make )
 (cd maestro-tcl/tcl-tk_8.5.11_multi/ssm ; make clean ; make )
 (cd maestro-tcl/tcl-tk_8.5.11_linux26-x86-64/ssm ; make clean ; make )
 find . -name *.ssm -exec scp {} web:dist/repository/. \;
 
 domaines pour maestro:
 /unique/armnssm/ECssm/ssm-domains-base/tools/[maestro-ES6|maestro-UBUNTU_12.04] (UQAM)
 /unique/armnssm/ECssm/ssm-domains-base/tools/[maestro-ES7|maestro-UBUNTU_14.04] (UQAM, liens symboliques)
 /sb/software/areas/armnssm/ssm-domains-base/tools/Maestro (guillimin)
 
 installation dans un des domaines:
 
 installer les 6 packages (s.ssm-install )
 maestro_1.5.0_linux26-x86-64 maestro-manager_1.5.0_all maestro-utils_1.5.0_all tcl-tk_8.5.11_linux26-x86-64 tcl-tk_8.5.11_multi xflow_1.5.0_all
 publier les 6 packages (s.ssm-publish )
 
 cd tcl-tk_8.5.11_linux26-x86-64/src
 ./INSTALL.sh 2>&1 | tee ./INSTALL.sh.LOG    (environnement aussi vanille que possible)
 cd ../..
 republier tcl-tk_8.5.11_linux26-x86-64
 
 cd maestro_1.5.0_linux26-x86-64/src
 rm -f nodelogger maestro nodeinfo tictac expcatchup getdef logreader mserver madmin
 make SWDEST=$(pwd -P)/.. CC='cc -march=core2 -mno-sse3' nodelogger maestro nodeinfo tictac expcatchup getdef logreader mserver madmin
 cd ../..


pour rebâtir openblas

. s.ssmuse.dot gcc-4.6|gcc-4.8|gcc-4.9|......
make CC=gcc FC=gfortran USE_OPENMP=0 NO_AFFINITY=1 USE_THREAD=0 TARGET=CORE2 \
CFLAGS=" -march=core2 -mfpmath=sse -m64 -msse2 -mno-sse3 -mno-ssse3 " \
FFLAGS=" -march=core2 -mfpmath=sse -m64 -msse2 -mno-sse3 -mno-ssse3

création des comptes armnssm et valin

adduser armnssm
cd ~armnssm
cat /unique/armnssm/sw/INSTALL/armnssm.tgz | tar zxf -
chown -R -h armnssm .

adduser valin
cd ~valin
cat /unique/armnssm/sw/INSTALL/valin.tgz | tar zxf -
chown -R -h valin .

après création des comptes armnssm et valin

règles de base pour le pare-feu
à mettre dans /etc/default
cp /unique/armnssm/sw/INSTALL/iptables /etc/default/iptables
arranger /etc/rc.local:
avec le contenu de
/unique/armnssm/sw/INSTALL/rc.local
cp /unique/armnssm/sw/INSTALL/rc.local /etc/rc.local
chmod 755 /etc/rc.local

cat <<EOF >/etc/systemd/system/rc-local.service
[Unit]
Description=/etc/rc.local Compatibility
ConditionPathExists=/etc/rc.local

[Service]
Type=forking
ExecStart=/etc/rc.local start
TimeoutSec=0
StandardOutput=tty
RemainAfterExit=yes
SysVStartPriority=99

[Install]
WantedBy=multi-user.target
EOF

systemctl enable rc-local  # Ubuntu 16.04/18.04, sous systemd
systemctl start rc-local.service
systemctl status rc-local.service


creer et donner au compte armnssm (plus nécessaire maintenant)
#/local/data/unique
#chown armnssm /local/data/unique
#(ou tout autre nom approprié et ajuster /etc/rc.local

miniconda/pyngl

aller chercher l'installeur pour Linux (Python 3) dans
https://conda.io/miniconda.html

cd /sca/compilers_and_tools/python
wget .......
chmod 755 ./Miniconda3-latest-Linux-x86_64.sh

installer miniconda
./Miniconda3-latest-Linux-x86_64.sh -b -f -p /sca/compilers_and_tools/python/miniconda3

preparer le module miniconda3 (/sca/modulefiles/python/miniconda3)

#%Module1.0
prepend-path    PATH            /sca/compilers_and_tools/python/miniconda3/bin
prepend-path    LD_LIBRARY_PATH /sca/compilers_and_tools/python/miniconda3/lib
prepend-path    MANPATH         /sca/compilers_and_tools/python/miniconda3/share/man

module load python/miniconda3

conda create --name pynngl3 --channel conda-forge pynio pyngl

pour utiliser pyngl/pynio :

module load python/miniconda3
source activate pynngl3

examples found in :
/sca/compilers_and_tools/python/miniconda3/pkgs/pyngl-1.6.0-py36h4217dbb_0/info/test/examples/