From 7ddaf9f715dde71d7dce5c5a0a5dcfe7161ec596 Mon Sep 17 00:00:00 2001 From: Romain Boman <romain.boman@gmail.com> Date: Fri, 18 May 2018 13:45:53 +0200 Subject: [PATCH] cleaning all files --- cfg/CentOs6/cmake.profile | 2 +- cfg/CentOs6/compilers.bashrc | 15 +---- cfg/CentOs6/compilers.profile | 15 +---- cfg/CentOs6/matlab.profile | 3 +- cfg/CentOs6/mumps.profile | 12 +--- cfg/CentOs6/parasolid.profile | 31 +---------- cfg/CentOs6/python.profile | 4 +- cfg/CentOs6/qt.profile | 4 +- cfg/CentOs6/samcef.profile | 8 --- cfg/CentOs6/subversion.profile | 2 +- cfg/CentOs6/vtk.profile | 7 +-- cfg/blueberry/intelCommunity.bashrc | 17 +++++- cfg/blueberry/intelCommunity.profile | 24 +++++--- cfg/blueberry/mumps.profile | 3 - cfg/blueberry/parasolid.profile | 3 - cfg/clifton/intelCommunity.bashrc | 18 ++++-- cfg/clifton/intelCommunity.profile | 26 +++++---- cfg/clifton/matlab.profile | 3 +- cfg/clifton/mumps.profile | 13 +---- cfg/clifton/parasolid.profile | 23 +------- cfg/clifton/samcef.profile | 7 +-- cfg/default/aliases.bashrc | 2 - cfg/default/editor.bashrc | 1 - cfg/default/functions.bashrc | 2 - cfg/default/omp.profile | 2 - cfg/fabulous/lammps.profile | 6 +- cfg/fabulous/ls_colors.bashrc | 2 - cfg/fabulous/modules.profile | 2 - cfg/fabulous/progs_bin.profile | 2 - cfg/garfield/compilers.bashrc | 18 ++++-- cfg/garfield/compilers.profile | 23 +++++--- cfg/garfield/metafor.bashrc | 2 - cfg/garfield/metafor.profile | 6 -- cfg/garfield/misc.bashrc | 8 --- cfg/garfield/mumps.profile | 3 - cfg/garfield/parasolid.profile | 3 - cfg/garfield/paraview.bashrc | 2 +- cfg/garfield/progs_bin.profile | 2 - cfg/garfield/python.profile | 2 +- cfg/garfield/samcef.profile | 2 +- cfg/garfield/trilinos.bashrc | 5 +- cfg/garfield/vtk.profile | 2 +- cfg/gaston/intelCommunity.bashrc | 18 ++++-- cfg/gaston/intelCommunity.profile | 20 +++++-- cfg/gaston/mumps.profile | 3 - cfg/gaston/parasolid.profile | 3 - cfg/hmem00/git.profile | 5 -- cfg/hmem00/modules.profile | 3 - cfg/loop.sh | 82 +++++++++++++++++++--------- cfg/master2/git.profile | 2 - cfg/master2/gmm.profile | 2 - cfg/master2/gmsh.profile | 2 - cfg/master2/lammps.profile | 6 +- cfg/master2/pcre.profile | 2 - cfg/master2/python.profile | 2 - cfg/master2/swig.profile | 3 - cfg/spirou/cmake.profile | 2 - cfg/spirou/gmsh.profile | 1 - cfg/spirou/intel.profile | 1 - cfg/spirou/matlab.bashrc | 2 +- cfg/spirou/mumps.profile | 2 - cfg/spirou/parasolid.profile | 3 - cfg/spirou/prompt.bashrc | 2 - cfg/spirou/qt.profile | 2 - cfg/spirou/vtk.profile | 1 - cfg/spring/compilers.bashrc | 20 +++++-- cfg/spring/compilers.profile | 32 +++++------ cfg/spring/mumps.profile | 3 - cfg/spring/parasolid.profile | 3 - cfg/thorgal/intelCommunity.bashrc | 17 +++++- cfg/thorgal/intelCommunity.profile | 20 +++++-- cfg/thorgal/mumps.profile | 3 - cfg/thorgal/parasolid.profile | 3 - cfg/zen/eclipse.profile | 6 +- cfg/zen/lammps.profile | 6 +- externalProgramPath.py | 0 externalProgramPathGui.pyw | 0 postProLoop.py | 0 postProLoopGui.pyw | 0 79 files changed, 266 insertions(+), 353 deletions(-) delete mode 100644 cfg/CentOs6/samcef.profile delete mode 100644 cfg/fabulous/progs_bin.profile delete mode 100644 cfg/garfield/metafor.profile delete mode 100644 cfg/garfield/progs_bin.profile mode change 100644 => 100755 externalProgramPath.py mode change 100644 => 100755 externalProgramPathGui.pyw mode change 100644 => 100755 postProLoop.py mode change 100644 => 100755 postProLoopGui.pyw diff --git a/cfg/CentOs6/cmake.profile b/cfg/CentOs6/cmake.profile index e28887b..c7b8d1f 100644 --- a/cfg/CentOs6/cmake.profile +++ b/cfg/CentOs6/cmake.profile @@ -1 +1 @@ -export PATH=/opt/cmake/bin:$PATH +add2env PATH "/opt/cmake/bin" diff --git a/cfg/CentOs6/compilers.bashrc b/cfg/CentOs6/compilers.bashrc index 14a7a3f..4667b38 100644 --- a/cfg/CentOs6/compilers.bashrc +++ b/cfg/CentOs6/compilers.bashrc @@ -1,13 +1,2 @@ -# this should be done in the .profile but if the shell is dash -# it does not work. -# => we call intel cf file in both places (bashrc & profile) - -# recompiled gcc -export PATH=/opt/gcc/bin:$PATH -export LD_LIBRARY_PATH=/opt/gcc/lib64:$LD_LIBRARY_PATH - -# icc -#if [ -z "$MKLROOT" ]; then -# . /opt/intel/bin/compilervars.sh intel64 -#fi - +add2env PATH "/opt/gcc/bin" front +add2env LD_LIBRARY_PATH "/opt/gcc/lib64" front \ No newline at end of file diff --git a/cfg/CentOs6/compilers.profile b/cfg/CentOs6/compilers.profile index 189080c..583bfd3 100644 --- a/cfg/CentOs6/compilers.profile +++ b/cfg/CentOs6/compilers.profile @@ -1,13 +1,2 @@ -# the .profile is sometimes read by "dash" and we cannot provide -# a sourced script with some parameters (it is a "bashism") -# -# -# recompiled gcc -export PATH=/opt/gcc/bin:$PATH -export LD_LIBRARY_PATH=/opt/gcc/lib64:$LD_LIBRARY_PATH -# icc -#if [ -n "$BASH_VERSION" ]; then - #if [ -z "$MKLROOT" ]; then # pas suffisant! (MKLROOT transmis au "at" mais pas LD_LIBRARY_PATH) -# . /opt/intel/bin/compilervars.sh intel64 - #fi -#fi +add2env PATH "/opt/gcc/bin" front +add2env LD_LIBRARY_PATH "/opt/gcc/lib64" front diff --git a/cfg/CentOs6/matlab.profile b/cfg/CentOs6/matlab.profile index 48e86c1..f391a0e 100644 --- a/cfg/CentOs6/matlab.profile +++ b/cfg/CentOs6/matlab.profile @@ -1,2 +1 @@ -PATH=$PATH:/opt/MATLAB/R2012a/bin - +add2env PATH "/opt/MATLAB/R2012a/bin" diff --git a/cfg/CentOs6/mumps.profile b/cfg/CentOs6/mumps.profile index 75ef411..57e0ada 100644 --- a/cfg/CentOs6/mumps.profile +++ b/cfg/CentOs6/mumps.profile @@ -1,9 +1,3 @@ -# $id$ -# -# configuration to allow CMake to automatically find mumps -# -export LIB=$LIB:/opt/mumps/lib -export INCLUDE=$INCLUDE:/opt/mumps/include - -# not necessary while cmake link with absolute path to libs -export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/mumps/lib +add2env LD_LIBRARY_PATH "/opt/mumps/lib" +add2env LIB "/opt/mumps/lib" +add2env INCLUDE "/opt/mumps/include" diff --git a/cfg/CentOs6/parasolid.profile b/cfg/CentOs6/parasolid.profile index c121151..e24e2e8 100644 --- a/cfg/CentOs6/parasolid.profile +++ b/cfg/CentOs6/parasolid.profile @@ -1,30 +1,3 @@ -# Parasolid - -# adds pskernel.so to the PATH - -if [ -d /opt/parasolid/shared_object ] ; then - if [ -z "${PATH}" ] ; then - export PATH="/opt/parasolid/shared_object" - else - export PATH="/opt/parasolid/shared_object:${PATH}" - fi - if [ -z "${LD_LIBRARY_PATH}" ] ; then - export LD_LIBRARY_PATH="/opt/parasolid/shared_object" - else - export LD_LIBRARY_PATH="/opt/parasolid/shared_object:${LD_LIBRARY_PATH}" - fi - -fi - -# adds parasolid INCLUDE dir - -if [ -d /opt/parasolid ] ; then - if [ -z "${INCLUDE}" ] ; then - export INCLUDE="/opt/parasolid" - else - export INCLUDE="/opt/parasolid:${INCLUDE}" - fi -fi - +add2env PATH "/opt/parasolid/shared_object" +add2env INCLUDE "/opt/parasolid" export P_SCHEMA=/opt/parasolid/schema - diff --git a/cfg/CentOs6/python.profile b/cfg/CentOs6/python.profile index b0880e9..e3a2588 100644 --- a/cfg/CentOs6/python.profile +++ b/cfg/CentOs6/python.profile @@ -1,2 +1,2 @@ -export PATH=/opt/python-2.7.10/bin:$PATH -export LD_LIBRARY_PATH=/opt/python-2.7.10/lib:$LD_LIBRARY_PATH +add2env PATH "/opt/python-2.7.10/bin" front +add2env LD_LIBRARY_PATH "/opt/python-2.7.10/lib" front diff --git a/cfg/CentOs6/qt.profile b/cfg/CentOs6/qt.profile index a395354..cf036d1 100644 --- a/cfg/CentOs6/qt.profile +++ b/cfg/CentOs6/qt.profile @@ -1,2 +1,2 @@ -export PATH=/opt/qt/bin:$PATH -export LD_LIBRARY_PATH=/opt/qt/lib:$LD_LIBRARY_PATH +add2env PATH "/opt/qt/bin" front +add2env LD_LIBRARY_PATH "/opt/qt/bin" front diff --git a/cfg/CentOs6/samcef.profile b/cfg/CentOs6/samcef.profile deleted file mode 100644 index 2ea188a..0000000 --- a/cfg/CentOs6/samcef.profile +++ /dev/null @@ -1,8 +0,0 @@ -# Samcef v15.01-3 - -export SAM_ZONE=200000000 -#PATH=$PATH:/opt/SamcefField/V8.5-01 -PATH=$PATH:/opt/SamcefField/V8.5-01/Samcef-V151i8/lin/bin -export SAM_USE_FLEXLM=1 -export SAMTECH_LICENSE_FILE=@pegase.ltas.ulg.ac.be - diff --git a/cfg/CentOs6/subversion.profile b/cfg/CentOs6/subversion.profile index 0167db9..807b808 100644 --- a/cfg/CentOs6/subversion.profile +++ b/cfg/CentOs6/subversion.profile @@ -1 +1 @@ -export PATH=/opt/subversion-1.8.14/bin:$PATH +add2env PATH "/opt/subversion-1.8.14/bin" front diff --git a/cfg/CentOs6/vtk.profile b/cfg/CentOs6/vtk.profile index 6e88e22..6b85d7f 100644 --- a/cfg/CentOs6/vtk.profile +++ b/cfg/CentOs6/vtk.profile @@ -1,5 +1,2 @@ - -LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/vtk/lib/ -export LD_LIBRARY_PATH -PYTHONPATH=$PYTHON_PATH:/opt/vtk/lib/python2.7/site-packages -export PYTHONPATH +add2env LD_LIBRARY_PATH "/opt/vtk/lib/" +add2env PYTHON_PATH "/opt/vtk/lib/python2.7/site-packages" diff --git a/cfg/blueberry/intelCommunity.bashrc b/cfg/blueberry/intelCommunity.bashrc index 55a8521..09fe18c 100644 --- a/cfg/blueberry/intelCommunity.bashrc +++ b/cfg/blueberry/intelCommunity.bashrc @@ -1,6 +1,17 @@ -# this should be done in the .profile but if the shell is dash -# it does not work. -# => we call intel cf file in both places (bashrc & profile) +# Intel compiler and/or TBB/MKL +# +# EXPLANATIONS [RB]: +# In practise, the call to "compilervars.sh" or ("mklvars.sh", etc) should be done in .profile +# (it sets PATH, LD_LIBRARY_PATH, etc.) +# +# BUT, if the login shell is dash, it does not work (we cannot add an extra argument to a sourced script with dash). +# => we call the scripts in both places (.bashrc & .profile) +# => the env is cleaned in "loop.sh", removing duplicates if the .profile was actually read by bash +# +# SPECIAL CASE: "at" job +# => the environment is OK and kept, but "LD_LIBRARY_PATH" is set to nothing by "at" +# => the .profile is then rerun manually in our scripts (with bash) +# => duplicates are finally removed by loop.sh if [ -z "$MKLROOT" ]; then . /opt/intel/mkl/bin/mklvars.sh intel64 diff --git a/cfg/blueberry/intelCommunity.profile b/cfg/blueberry/intelCommunity.profile index d2bff7e..3fa6997 100644 --- a/cfg/blueberry/intelCommunity.profile +++ b/cfg/blueberry/intelCommunity.profile @@ -1,11 +1,19 @@ -# the .profile is sometimes read by "dash" and we cannot provide -# a sourced script with some parameters (it is a "bashism") +# Intel compiler and/or TBB/MKL +# +# EXPLANATIONS [RB]: +# In practise, the call to "compilervars.sh" or ("mklvars.sh", etc) should be done in .profile +# (it sets PATH, LD_LIBRARY_PATH, etc.) +# +# BUT, if the login shell is dash, it does not work (we cannot add an extra argument to a sourced script with dash). +# => we call the scripts in both places (.bashrc & .profile) +# => the env is cleaned in "loop.sh", removing duplicates if the .profile was actually read by bash +# +# SPECIAL CASE: "at" job +# => the environment is OK and kept, but "LD_LIBRARY_PATH" is set to nothing by "at" +# => the .profile is then rerun manually in our scripts (with bash) +# => duplicates are finally removed by loop.sh if [ -n "$BASH_VERSION" ]; then - #if [ -z "$MKLROOT" ]; then # pas suffisant! (MKLROOT transmis au "at" mais pas LD_LIBRARY_PATH) - . /opt/intel/mkl/bin/mklvars.sh intel64 - #fi - #if [ -z "$TBBROOT" ]; then - . /opt/intel/tbb/bin/tbbvars.sh intel64 - #fi + . /opt/intel/mkl/bin/mklvars.sh intel64 + . /opt/intel/tbb/bin/tbbvars.sh intel64 fi diff --git a/cfg/blueberry/mumps.profile b/cfg/blueberry/mumps.profile index 2d94cb9..57e0ada 100644 --- a/cfg/blueberry/mumps.profile +++ b/cfg/blueberry/mumps.profile @@ -1,6 +1,3 @@ -# MUMPS + MKL-TBB - add2env LD_LIBRARY_PATH "/opt/mumps/lib" add2env LIB "/opt/mumps/lib" add2env INCLUDE "/opt/mumps/include" - diff --git a/cfg/blueberry/parasolid.profile b/cfg/blueberry/parasolid.profile index 5f9e03b..e24e2e8 100644 --- a/cfg/blueberry/parasolid.profile +++ b/cfg/blueberry/parasolid.profile @@ -1,6 +1,3 @@ -# Parasolid - add2env PATH "/opt/parasolid/shared_object" add2env INCLUDE "/opt/parasolid" export P_SCHEMA=/opt/parasolid/schema - diff --git a/cfg/clifton/intelCommunity.bashrc b/cfg/clifton/intelCommunity.bashrc index 6b5efc4..7b93b13 100644 --- a/cfg/clifton/intelCommunity.bashrc +++ b/cfg/clifton/intelCommunity.bashrc @@ -1,9 +1,19 @@ -# this should be done in the .profile but if the shell is dash -# it does not work. -# => we call intel cf file in both places (bashrc & profile) +# Intel compiler and/or TBB/MKL +# +# EXPLANATIONS [RB]: +# In practise, the call to "compilervars.sh" or ("mklvars.sh", etc) should be done in .profile +# (it sets PATH, LD_LIBRARY_PATH, etc.) +# +# BUT, if the login shell is dash, it does not work (we cannot add an extra argument to a sourced script with dash). +# => we call the scripts in both places (.bashrc & .profile) +# => the env is cleaned in "loop.sh", removing duplicates if the .profile was actually read by bash +# +# SPECIAL CASE: "at" job +# => the environment is OK and kept, but "LD_LIBRARY_PATH" is set to nothing by "at" +# => the .profile is then rerun manually in our scripts (with bash) +# => duplicates are finally removed by loop.sh if [ -z "$MKLROOT" ]; then -# . /opt/intel/bin/compilervars.sh intel64 . /opt/intelCommunity2017/mkl/bin/mklvars.sh intel64 fi if [ -z "$TBBROOT" ]; then diff --git a/cfg/clifton/intelCommunity.profile b/cfg/clifton/intelCommunity.profile index 8d2cadb..c74dbb2 100644 --- a/cfg/clifton/intelCommunity.profile +++ b/cfg/clifton/intelCommunity.profile @@ -1,13 +1,19 @@ -# the .profile is sometimes read by "dash" and we cannot provide -# a sourced script with some parameters (it is a "bashism") +# Intel compiler and/or TBB/MKL +# +# EXPLANATIONS [RB]: +# In practise, the call to "compilervars.sh" or ("mklvars.sh", etc) should be done in .profile +# (it sets PATH, LD_LIBRARY_PATH, etc.) +# +# BUT, if the login shell is dash, it does not work (we cannot add an extra argument to a sourced script with dash). +# => we call the scripts in both places (.bashrc & .profile) +# => the env is cleaned in "loop.sh", removing duplicates if the .profile was actually read by bash +# +# SPECIAL CASE: "at" job +# => the environment is OK and kept, but "LD_LIBRARY_PATH" is set to nothing by "at" +# => the .profile is then rerun manually in our scripts (with bash) +# => duplicates are finally removed by loop.sh if [ -n "$BASH_VERSION" ]; then - #if [ -z "$MKLROOT" ]; then # pas suffisant! (MKLROOT transmis au "at" mais pas LD_LIBRARY_PATH) - #. /opt/intel/bin/compilervars.sh intel64 - . /opt/intelCommunity2017/mkl/bin/mklvars.sh intel64 - #fi - #if [ -z "$TBBROOT" ]; then - . /opt/intelCommunity2017/tbb/bin/tbbvars.sh intel64 - #fi - + . /opt/intelCommunity2017/mkl/bin/mklvars.sh intel64 + . /opt/intelCommunity2017/tbb/bin/tbbvars.sh intel64 fi diff --git a/cfg/clifton/matlab.profile b/cfg/clifton/matlab.profile index df9a228..58f04e5 100644 --- a/cfg/clifton/matlab.profile +++ b/cfg/clifton/matlab.profile @@ -1,2 +1 @@ -PATH=$PATH:/opt/MATLAB/R2015a/bin - +add2env PATH "/opt/MATLAB/R2015a/bin" diff --git a/cfg/clifton/mumps.profile b/cfg/clifton/mumps.profile index e4ff5f5..98a366c 100644 --- a/cfg/clifton/mumps.profile +++ b/cfg/clifton/mumps.profile @@ -1,10 +1,3 @@ -# $Id$ -# -# configuration to allow CMake to automatically find mumps -# -LIB=$LIB:/opt/mumps-4.10.0-Tbb/lib -export LIB -INCLUDE=$INCLUDE:/opt/mumps-4.10.0-Tbb/include -export INCLUDE -LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/mumps-4.10.0-Tbb/lib -export LD_LIBRARY_PATH +add2env LD_LIBRARY_PATH "/opt/mumps-4.10.0-Tbb/lib" +add2env LIB "/opt/mumps-4.10.0-Tbb/lib" +add2env INCLUDE "/opt/mumps-4.10.0-Tbb/include" diff --git a/cfg/clifton/parasolid.profile b/cfg/clifton/parasolid.profile index 8dfef6f..158db8d 100644 --- a/cfg/clifton/parasolid.profile +++ b/cfg/clifton/parasolid.profile @@ -1,24 +1,5 @@ # Parasolid -# adds pskernel.so to the PATH - -if [ -d /opt/parasolid-28.1/shared_object ] ; then - if [ -z "${PATH}" ] ; then - export PATH="/opt/parasolid-28.1/shared_object" - else - export PATH="/opt/parasolid-28.1/shared_object:${PATH}" - fi -fi - -# adds parasolid INCLUDE dir - -if [ -d /opt/parasolid-28.1 ] ; then - if [ -z "${INCLUDE}" ] ; then - export INCLUDE="/opt/parasolid-28.1" - else - export INCLUDE="/opt/parasolid-28.1:${INCLUDE}" - fi -fi - +add2env PATH "/opt/parasolid-28.1/shared_object" +add2env INCLUDE "/opt/parasolid-28.1" export P_SCHEMA=/opt/parasolid-28.1/schema - diff --git a/cfg/clifton/samcef.profile b/cfg/clifton/samcef.profile index 121ccc7..b504e28 100644 --- a/cfg/clifton/samcef.profile +++ b/cfg/clifton/samcef.profile @@ -1,7 +1,2 @@ -# Samcef v17.1 i8 - export SAM_ZONE=200000000 -PATH=$PATH:/opt/Samv17i8/ -#export SAM_USE_FLEXLM=1 -#export SAMTECH_LICENSE_FILE=@pegase.ltas.ulg.ac.be - +add2env PATH "/opt/Samv17i8" diff --git a/cfg/default/aliases.bashrc b/cfg/default/aliases.bashrc index 98c206b..9cc8ef1 100644 --- a/cfg/default/aliases.bashrc +++ b/cfg/default/aliases.bashrc @@ -1,3 +1 @@ - alias verif='cd ~/dev/oo_meta/apps/verif' - diff --git a/cfg/default/editor.bashrc b/cfg/default/editor.bashrc index ea04dba..e0560ad 100644 --- a/cfg/default/editor.bashrc +++ b/cfg/default/editor.bashrc @@ -1,3 +1,2 @@ - export EDITOR=vim alias vi='vim' diff --git a/cfg/default/functions.bashrc b/cfg/default/functions.bashrc index 2b177c4..30bb21f 100644 --- a/cfg/default/functions.bashrc +++ b/cfg/default/functions.bashrc @@ -1,5 +1,3 @@ -# Fonctions generales - function backup() { ARC=backup-profile-bin.tar.gz diff --git a/cfg/default/omp.profile b/cfg/default/omp.profile index 4b6bf3f..ea8dc08 100644 --- a/cfg/default/omp.profile +++ b/cfg/default/omp.profile @@ -1,3 +1 @@ - export OMP_NUM_THREADS=1 - diff --git a/cfg/fabulous/lammps.profile b/cfg/fabulous/lammps.profile index 07f77ad..348d0d9 100644 --- a/cfg/fabulous/lammps.profile +++ b/cfg/fabulous/lammps.profile @@ -1,5 +1 @@ - -if [ -d ~/dev/lammps/src ] ; then - PATH=$PATH:~/dev/lammps/src -fi - +add2env PATH "~/dev/lammps/src" diff --git a/cfg/fabulous/ls_colors.bashrc b/cfg/fabulous/ls_colors.bashrc index f80ed49..8971679 100644 --- a/cfg/fabulous/ls_colors.bashrc +++ b/cfg/fabulous/ls_colors.bashrc @@ -1,4 +1,2 @@ - LS_COLORS='di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36' export LS_COLORS - diff --git a/cfg/fabulous/modules.profile b/cfg/fabulous/modules.profile index 9185c6a..08634cb 100644 --- a/cfg/fabulous/modules.profile +++ b/cfg/fabulous/modules.profile @@ -3,14 +3,12 @@ module load slurm module load git subversion module load gcc cmake swig module load python qt vtk parasolid mumps -#module load gmm trilinos module load samcef gmsh module load isosurf tetgen triangle module load matlab scilab # intel community -#. /cm/shared/apps/intel-community/2017.2/bin/compilervars.sh intel64 . /cm/shared/apps/intel-community/2017.2/mkl/bin/mklvars.sh intel64 . /cm/shared/apps/intel-community/2017.2/tbb/bin/tbbvars.sh intel64 diff --git a/cfg/fabulous/progs_bin.profile b/cfg/fabulous/progs_bin.profile deleted file mode 100644 index 3d34ff0..0000000 --- a/cfg/fabulous/progs_bin.profile +++ /dev/null @@ -1,2 +0,0 @@ - -add2env PATH "$HOME/dev/progs/bin" front diff --git a/cfg/garfield/compilers.bashrc b/cfg/garfield/compilers.bashrc index 6f6574b..3f73074 100644 --- a/cfg/garfield/compilers.bashrc +++ b/cfg/garfield/compilers.bashrc @@ -1,9 +1,19 @@ -# this should be done in the .profile but if the shell is dash -# it does not work. -# => we call intel cf file in both places (bashrc & profile) +# Intel compiler and/or TBB/MKL +# +# EXPLANATIONS [RB]: +# In practise, the call to "compilervars.sh" or ("mklvars.sh", etc) should be done in .profile +# (it sets PATH, LD_LIBRARY_PATH, etc.) +# +# BUT, if the login shell is dash, it does not work (we cannot add an extra argument to a sourced script with dash). +# => we call the scripts in both places (.bashrc & .profile) +# => the env is cleaned in "loop.sh", removing duplicates if the .profile was actually read by bash +# +# SPECIAL CASE: "at" job +# => the environment is OK and kept, but "LD_LIBRARY_PATH" is set to nothing by "at" +# => the .profile is then rerun manually in our scripts (with bash) +# => duplicates are finally removed by loop.sh if [ -z "$MKLROOT" ]; then - #. /opt/intel/bin/compilervars.sh intel64 # mets intel mpi par defaut! . /opt/intel/mkl/bin/mklvars.sh intel64 . /opt/intel/tbb/bin/tbbvars.sh intel64 fi diff --git a/cfg/garfield/compilers.profile b/cfg/garfield/compilers.profile index a046a25..3fa6997 100644 --- a/cfg/garfield/compilers.profile +++ b/cfg/garfield/compilers.profile @@ -1,10 +1,19 @@ -# the .profile is sometimes read by "dash" and we cannot provide -# a sourced script with some parameters (it is a "bashism") +# Intel compiler and/or TBB/MKL +# +# EXPLANATIONS [RB]: +# In practise, the call to "compilervars.sh" or ("mklvars.sh", etc) should be done in .profile +# (it sets PATH, LD_LIBRARY_PATH, etc.) +# +# BUT, if the login shell is dash, it does not work (we cannot add an extra argument to a sourced script with dash). +# => we call the scripts in both places (.bashrc & .profile) +# => the env is cleaned in "loop.sh", removing duplicates if the .profile was actually read by bash +# +# SPECIAL CASE: "at" job +# => the environment is OK and kept, but "LD_LIBRARY_PATH" is set to nothing by "at" +# => the .profile is then rerun manually in our scripts (with bash) +# => duplicates are finally removed by loop.sh if [ -n "$BASH_VERSION" ]; then - #if [ -z "$MKLROOT" ]; then # pas suffisant! (MKLROOT transmis au "at" mais pas LD_LIBRARY_PATH) - #. /opt/intel/bin/compilervars.sh intel64 # mets intel mpi par defaut! - . /opt/intel/mkl/bin/mklvars.sh intel64 - . /opt/intel/tbb/bin/tbbvars.sh intel64 - #fi + . /opt/intel/mkl/bin/mklvars.sh intel64 + . /opt/intel/tbb/bin/tbbvars.sh intel64 fi diff --git a/cfg/garfield/metafor.bashrc b/cfg/garfield/metafor.bashrc index 05ffa73..5ada172 100644 --- a/cfg/garfield/metafor.bashrc +++ b/cfg/garfield/metafor.bashrc @@ -1,6 +1,4 @@ - function mtfconfig { cmake -C ../oo_meta/CMake/ubuntu.cmake ../oo_meta } - diff --git a/cfg/garfield/metafor.profile b/cfg/garfield/metafor.profile deleted file mode 100644 index 33f66eb..0000000 --- a/cfg/garfield/metafor.profile +++ /dev/null @@ -1,6 +0,0 @@ -# permet d'installer un metafor compilé -# (plus très utile depuis scripts Luc?) - -#add2env LD_LIBRARY_PATH "$HOME/MetaforBIN" -#add2env PATH "$HOME/MetaforBIN" - diff --git a/cfg/garfield/misc.bashrc b/cfg/garfield/misc.bashrc index 5f2964a..352e8fc 100644 --- a/cfg/garfield/misc.bashrc +++ b/cfg/garfield/misc.bashrc @@ -1,10 +1,2 @@ -# misc aliases - alias a2ps='a2ps --pro=color --line-numbers=5' alias plotdigitizer='java -Xmx256m -jar /opt/PlotDigitizer/PlotDigitizer.jar' - -function mnt_Shared() -{ - sudo mount -t vboxsf Shared /mnt -} - diff --git a/cfg/garfield/mumps.profile b/cfg/garfield/mumps.profile index 2d94cb9..57e0ada 100644 --- a/cfg/garfield/mumps.profile +++ b/cfg/garfield/mumps.profile @@ -1,6 +1,3 @@ -# MUMPS + MKL-TBB - add2env LD_LIBRARY_PATH "/opt/mumps/lib" add2env LIB "/opt/mumps/lib" add2env INCLUDE "/opt/mumps/include" - diff --git a/cfg/garfield/parasolid.profile b/cfg/garfield/parasolid.profile index 5f9e03b..e24e2e8 100644 --- a/cfg/garfield/parasolid.profile +++ b/cfg/garfield/parasolid.profile @@ -1,6 +1,3 @@ -# Parasolid - add2env PATH "/opt/parasolid/shared_object" add2env INCLUDE "/opt/parasolid" export P_SCHEMA=/opt/parasolid/schema - diff --git a/cfg/garfield/paraview.bashrc b/cfg/garfield/paraview.bashrc index ac9fb65..2272019 100644 --- a/cfg/garfield/paraview.bashrc +++ b/cfg/garfield/paraview.bashrc @@ -1,2 +1,2 @@ - alias paraview='/opt/paraview/bin/paraview' +alias pvserver='/opt/paraview/bin/pvserver' diff --git a/cfg/garfield/progs_bin.profile b/cfg/garfield/progs_bin.profile deleted file mode 100644 index 3d34ff0..0000000 --- a/cfg/garfield/progs_bin.profile +++ /dev/null @@ -1,2 +0,0 @@ - -add2env PATH "$HOME/dev/progs/bin" front diff --git a/cfg/garfield/python.profile b/cfg/garfield/python.profile index 668d279..67b3efb 100644 --- a/cfg/garfield/python.profile +++ b/cfg/garfield/python.profile @@ -1,2 +1,2 @@ -# binaires ajouté par pip par exemple (pip lui-meme ou yapf) +# binaires ajoute par pip par exemple (pip lui-meme ou yapf) add2env PATH "$HOME/.local/bin" front diff --git a/cfg/garfield/samcef.profile b/cfg/garfield/samcef.profile index e52e31a..542f794 100644 --- a/cfg/garfield/samcef.profile +++ b/cfg/garfield/samcef.profile @@ -4,7 +4,7 @@ add2env PATH "/opt/samcef" # pas besoin de definir LMS_LICENSE # (deja defini dans "/opt/samcef/site" lors de l'install) - +# ----------------------------------------------------------- # version "russe" #add2env PATH "/opt/sfield/V8.5-01/Samcef-V151i8/lin/bin" #export SAMTECH_LICENSE_FILE=/opt/sfield/V8.5-01/SAMTECH.lic \ No newline at end of file diff --git a/cfg/garfield/trilinos.bashrc b/cfg/garfield/trilinos.bashrc index d49863c..a26619a 100644 --- a/cfg/garfield/trilinos.bashrc +++ b/cfg/garfield/trilinos.bashrc @@ -1,4 +1,3 @@ -# Trilinos custom compilé localement - +# Trilinos custom compile localement # (permet le FIND_PACKAGE(Trilinos) dans CMake) -add2env CMAKE_PREFIX_PATH "/opt/trilinos" front +#add2env CMAKE_PREFIX_PATH "/opt/trilinos" front diff --git a/cfg/garfield/vtk.profile b/cfg/garfield/vtk.profile index 2f2befc..cb69d4c 100644 --- a/cfg/garfield/vtk.profile +++ b/cfg/garfield/vtk.profile @@ -1,2 +1,2 @@ -# vtk custom compilé localement +# vtk custom compile localement #add2env LD_LIBRARY_PATH "/usr/local/lib/vtk-5.10" diff --git a/cfg/gaston/intelCommunity.bashrc b/cfg/gaston/intelCommunity.bashrc index 55a8521..7fb2eff 100644 --- a/cfg/gaston/intelCommunity.bashrc +++ b/cfg/gaston/intelCommunity.bashrc @@ -1,6 +1,17 @@ -# this should be done in the .profile but if the shell is dash -# it does not work. -# => we call intel cf file in both places (bashrc & profile) +# Intel compiler and/or TBB/MKL +# +# EXPLANATIONS [RB]: +# In practise, the call to "compilervars.sh" or ("mklvars.sh", etc) should be done in .profile +# (it sets PATH, LD_LIBRARY_PATH, etc.) +# +# BUT, if the login shell is dash, it does not work (we cannot add an extra argument to a sourced script with dash). +# => we call the scripts in both places (.bashrc & .profile) +# => the env is cleaned in "loop.sh", removing duplicates if the .profile was actually read by bash +# +# SPECIAL CASE: "at" job +# => the environment is OK and kept, but "LD_LIBRARY_PATH" is set to nothing by "at" +# => the .profile is then rerun manually in our scripts (with bash) +# => duplicates are finally removed by loop.sh if [ -z "$MKLROOT" ]; then . /opt/intel/mkl/bin/mklvars.sh intel64 @@ -8,4 +19,3 @@ fi if [ -z "$TBBROOT" ]; then . /opt/intel/tbb/bin/tbbvars.sh intel64 fi - diff --git a/cfg/gaston/intelCommunity.profile b/cfg/gaston/intelCommunity.profile index d2bff7e..2501156 100644 --- a/cfg/gaston/intelCommunity.profile +++ b/cfg/gaston/intelCommunity.profile @@ -1,11 +1,19 @@ -# the .profile is sometimes read by "dash" and we cannot provide -# a sourced script with some parameters (it is a "bashism") +# Intel compiler and/or TBB/MKL +# +# EXPLANATIONS [RB]: +# In practise, the call to "compilervars.sh" or ("mklvars.sh", etc) should be done in .profile +# (it sets PATH, LD_LIBRARY_PATH, etc.) +# +# BUT, if the login shell is dash, it does not work (we cannot add an extra argument to a sourced script with dash). +# => we call the scripts in both places (.bashrc & .profile) +# => the env is cleaned in "loop.sh", removing duplicates if the .profile was actually read by bash +# +# SPECIAL CASE: "at" job +# => the environment is OK and kept, but "LD_LIBRARY_PATH" is set to nothing by "at" +# => the .profile is then rerun manually in our scripts (with bash) +# => duplicates are finally removed by loop.sh if [ -n "$BASH_VERSION" ]; then - #if [ -z "$MKLROOT" ]; then # pas suffisant! (MKLROOT transmis au "at" mais pas LD_LIBRARY_PATH) . /opt/intel/mkl/bin/mklvars.sh intel64 - #fi - #if [ -z "$TBBROOT" ]; then . /opt/intel/tbb/bin/tbbvars.sh intel64 - #fi fi diff --git a/cfg/gaston/mumps.profile b/cfg/gaston/mumps.profile index 2d94cb9..57e0ada 100644 --- a/cfg/gaston/mumps.profile +++ b/cfg/gaston/mumps.profile @@ -1,6 +1,3 @@ -# MUMPS + MKL-TBB - add2env LD_LIBRARY_PATH "/opt/mumps/lib" add2env LIB "/opt/mumps/lib" add2env INCLUDE "/opt/mumps/include" - diff --git a/cfg/gaston/parasolid.profile b/cfg/gaston/parasolid.profile index 5f9e03b..e24e2e8 100644 --- a/cfg/gaston/parasolid.profile +++ b/cfg/gaston/parasolid.profile @@ -1,6 +1,3 @@ -# Parasolid - add2env PATH "/opt/parasolid/shared_object" add2env INCLUDE "/opt/parasolid" export P_SCHEMA=/opt/parasolid/schema - diff --git a/cfg/hmem00/git.profile b/cfg/hmem00/git.profile index 4871e7a..e984471 100644 --- a/cfg/hmem00/git.profile +++ b/cfg/hmem00/git.profile @@ -1,6 +1 @@ - - unset SSH_ASKPASS - - - diff --git a/cfg/hmem00/modules.profile b/cfg/hmem00/modules.profile index 6c80be2..d263785 100644 --- a/cfg/hmem00/modules.profile +++ b/cfg/hmem00/modules.profile @@ -1,5 +1,2 @@ - module load cmake python module load intel/compiler - - diff --git a/cfg/loop.sh b/cfg/loop.sh index ca61df1..e3b00ca 100755 --- a/cfg/loop.sh +++ b/cfg/loop.sh @@ -1,4 +1,3 @@ -# $Id: loop.sh 1755 2013-05-30 12:18:36Z boman $ # # usage: # add the following calls to the end of the .bashrc/.profile cfg files @@ -7,32 +6,36 @@ # .bashrc: (interactive stuffs) # . $HOME/bin/cfg/loop.sh ; fct_loop bashrc $* ; unset fct_loop # -# arg1 is the extension of the files to be loaded -# arg2 is the name of the master node if needed (clusters) -# # if this script is sometimes run with dash (not bash!) -# (by gnome on ubuntu for the .profile) +# (by gnome on ubuntu/debian for the .profile) # => avoid bashisms (e.g. ~ becomes $HOME) -# -# RoBo 2013 - function add2env() { + #verb=1 #uncomment to debug script + if [ $# -lt 2 ] || [ $# -gt 3 ] ; then echo "add2env VARNAME folder [front]" return fi - if [ -d $2 ] ; then # if the second arg is an existing folder - if [ -z ${!1} ] ; then # if the first arg is an empty variable + + ndir=${2%/} # remove trailing space + if [ -d $ndir ] ; then # if the second arg is an existing folder + if [ -z ${!1} ] ; then # if the first arg is an empty env variable #echo $1 is empty - eval export $1="$2" + eval export $1="$ndir" else #echo $1 is not empty - if [ "$3" == "front" ] ; then - eval export $1="$2:\$$1" # add folder to the front + if ! eval echo \$$1 | grep -E -q "(^|:)$ndir($|:)" ; then # if ndir is not already present in the variable + if [ "$3" == "front" ] ; then + eval export $1="$ndir:\$$1" # add folder to the front + else + eval export $1="\$$1:$ndir" # add folder to the end + fi else - eval export $1="\$$1:$2" # add folder to the end + if [ -n "$verb" ] ; then + echo "! $1 already contains $ndir" + fi fi fi else @@ -42,14 +45,21 @@ function add2env() } +# arg1 is the extension of the files to be loaded +# arg2 is the name of the master node if needed (clusters) + function fct_loop() { umask 007 - #echo "Execute loop.sh" - #echo "script=$0" - #echo "nargs=$#" - #echo "arguments=$*" + #verb=1 #uncomment to debug script + + if [ -n "$verb" ] ; then + echo "Executing \"loop.sh $*\" with shell=$0" + #echo "script=$0" + #echo "nargs=$#" + #echo "arguments=$*" + fi #for var in "$@"; do # echo "var=$var" #done @@ -66,14 +76,16 @@ function fct_loop() # default cfg for i in $thisdir/default/*.$1 ; do - #echo "testing script $i ..." - if [ -r $i ]; then - # do not read file if a file with the same name exists in the "myhost" folder - if [ ! -f $thisdir/$myhost/`basename $i` ] ; then - #echo " =>loading script $i ..." - . $i + #echo "testing script $i ..." + if [ -r $i ]; then + # do not read file if a file with the same name exists in the "myhost" folder + if [ ! -f $thisdir/$myhost/`basename $i` ] ; then + if [ -n "$verb" ] ; then + echo " =>loading script $i ..." + fi + . $i + fi fi - fi done # machine-dependent cfg @@ -81,9 +93,27 @@ function fct_loop() for i in $thisdir/$myhost/*.$1 ; do #echo "testing script $i ..." if [ -r $i ]; then - #echo " =>loading script $i ..." + if [ -n "$verb" ] ; then + echo " =>loading script $i ..." + fi . $i fi done unset i + + + # remove duplicate entries in env vars ---- + # see https://unix.stackexchange.com/questions/40749/remove-duplicate-path-entries-with-awk-command + + # - initial version + #LD_LIBRARY_PATH=$(printf %s "$LD_LIBRARY_PATH" | awk -v RS=: '{ if (!arr[$0]++) {printf("%s%s",!ln++?"":":",$0)}}') + # - loop version + for var in PATH LD_LIBRARY_PATH INTEL_LICENSE_FILE CPATH INFOPATH NLSPATH LIBRARY_PATH MANPATH CLASSPATH MIC_LIBRARY_PATH MIC_LD_LIBRARY_PATH + do + if [ -n "$(eval echo \$$var)" ] ; then # if var is set + cmd="$var=\$(printf %s \"\$$var\" | awk -v RS=: '{ if (!arr[\$0]++) {printf(\"%s%s\",!ln++?\"\":\":\",\$0)}}')" + eval $(echo $cmd) + fi + done + } diff --git a/cfg/master2/git.profile b/cfg/master2/git.profile index bee69f7..07acaaf 100644 --- a/cfg/master2/git.profile +++ b/cfg/master2/git.profile @@ -1,3 +1 @@ - module load git - diff --git a/cfg/master2/gmm.profile b/cfg/master2/gmm.profile index 266b12b..a3259ca 100644 --- a/cfg/master2/gmm.profile +++ b/cfg/master2/gmm.profile @@ -1,4 +1,2 @@ # gmm compile localement - add2env INCLUDE "/home/ulg/nlcm/rboman/local/gmm/include" front - diff --git a/cfg/master2/gmsh.profile b/cfg/master2/gmsh.profile index 7505f59..b54f563 100644 --- a/cfg/master2/gmsh.profile +++ b/cfg/master2/gmsh.profile @@ -1,4 +1,2 @@ # gmsh compile par RB - add2env PATH "/home/ulg/nlcm/rboman/local/gmsh/bin" front - diff --git a/cfg/master2/lammps.profile b/cfg/master2/lammps.profile index 07f77ad..348d0d9 100644 --- a/cfg/master2/lammps.profile +++ b/cfg/master2/lammps.profile @@ -1,5 +1 @@ - -if [ -d ~/dev/lammps/src ] ; then - PATH=$PATH:~/dev/lammps/src -fi - +add2env PATH "~/dev/lammps/src" diff --git a/cfg/master2/pcre.profile b/cfg/master2/pcre.profile index b98426c..e81830e 100644 --- a/cfg/master2/pcre.profile +++ b/cfg/master2/pcre.profile @@ -1,6 +1,4 @@ # pcre (swig) compile localement par RB - add2env LIB "/home/ulg/nlcm/rboman/local/pcre/lib" front add2env INCLUDE "/home/ulg/nlcm/rboman/local/pcre/include" front add2env LD_LIBRARY_PATH "/home/ulg/nlcm/rboman/local/pcre/lib" front - diff --git a/cfg/master2/python.profile b/cfg/master2/python.profile index 5d06da1..dcbf334 100644 --- a/cfg/master2/python.profile +++ b/cfg/master2/python.profile @@ -1,6 +1,4 @@ - module load python/2.7.10 # trucs qui manquent dans le modulefile de David add2env CMAKE_PREFIX_PATH "/cm/shared/apps/python/2.7.10" front - diff --git a/cfg/master2/swig.profile b/cfg/master2/swig.profile index b99ddb6..3a1acae 100644 --- a/cfg/master2/swig.profile +++ b/cfg/master2/swig.profile @@ -1,4 +1 @@ -# swig recompile localement par RB - add2env PATH "/home/ulg/nlcm/rboman/local/swig-3.0.11/bin" front - diff --git a/cfg/spirou/cmake.profile b/cfg/spirou/cmake.profile index 2b5121c..732d4fe 100644 --- a/cfg/spirou/cmake.profile +++ b/cfg/spirou/cmake.profile @@ -1,3 +1 @@ - - add2env PATH "/Applications/CMake.app/Contents/bin" diff --git a/cfg/spirou/gmsh.profile b/cfg/spirou/gmsh.profile index 6950dac..3b40fed 100644 --- a/cfg/spirou/gmsh.profile +++ b/cfg/spirou/gmsh.profile @@ -1,2 +1 @@ - add2env PATH "/Applications/Gmsh.app/Contents/MacOS" diff --git a/cfg/spirou/intel.profile b/cfg/spirou/intel.profile index 33b60d9..202314b 100644 --- a/cfg/spirou/intel.profile +++ b/cfg/spirou/intel.profile @@ -1,4 +1,3 @@ - . /opt/intel/compilers_and_libraries/mac/mkl/bin/mklvars.sh intel64 . /opt/intel/compilers_and_libraries/mac/tbb/bin/tbbvars.sh intel64 diff --git a/cfg/spirou/matlab.bashrc b/cfg/spirou/matlab.bashrc index f218f35..9a3e351 100644 --- a/cfg/spirou/matlab.bashrc +++ b/cfg/spirou/matlab.bashrc @@ -1 +1 @@ -alias matlab='/Applications/MATLAB_R2016b.app/bin/matlab' \ No newline at end of file +alias matlab='/Applications/MATLAB_R2016b.app/bin/matlab' diff --git a/cfg/spirou/mumps.profile b/cfg/spirou/mumps.profile index 9163d49..92cbf63 100644 --- a/cfg/spirou/mumps.profile +++ b/cfg/spirou/mumps.profile @@ -1,4 +1,2 @@ - add2env LIB "/opt/mumps/lib" add2env INCLUDE "/opt/mumps/include" - diff --git a/cfg/spirou/parasolid.profile b/cfg/spirou/parasolid.profile index 5663431..e81e5c2 100644 --- a/cfg/spirou/parasolid.profile +++ b/cfg/spirou/parasolid.profile @@ -1,6 +1,3 @@ -# Parasolid - add2env PATH "/usr/local/parasolid/shared_object" add2env INCLUDE "/usr/local/parasolid" export P_SCHEMA=/usr/local/parasolid/schema - diff --git a/cfg/spirou/prompt.bashrc b/cfg/spirou/prompt.bashrc index cf9ee21..8583cd5 100644 --- a/cfg/spirou/prompt.bashrc +++ b/cfg/spirou/prompt.bashrc @@ -1,3 +1 @@ - export PS1="\[$(tput bold)\]\u@\h:\w$ \[$(tput sgr0)\]" - diff --git a/cfg/spirou/qt.profile b/cfg/spirou/qt.profile index 558cc5b..59d39de 100644 --- a/cfg/spirou/qt.profile +++ b/cfg/spirou/qt.profile @@ -1,4 +1,2 @@ - add2env PATH "/usr/local/qt-5.8.0/bin" add2env DYLD_LIBRARY_PATH "/usr/local/qt-5.8.0/lib" - diff --git a/cfg/spirou/vtk.profile b/cfg/spirou/vtk.profile index d8acaf9..2718ac5 100644 --- a/cfg/spirou/vtk.profile +++ b/cfg/spirou/vtk.profile @@ -1,3 +1,2 @@ - add2env PYTHONPATH "/usr/local/vtk-7.1.0/lib/python2.7/site-packages" add2env DYLD_LIBRARY_PATH "/usr/local/vtk-7.1.0/lib" diff --git a/cfg/spring/compilers.bashrc b/cfg/spring/compilers.bashrc index 78f2ef9..09e595a 100644 --- a/cfg/spring/compilers.bashrc +++ b/cfg/spring/compilers.bashrc @@ -1,10 +1,18 @@ -# this should be done in the .profile but if the shell is dash -# it does not work. -# => we call intel cf file in both places (bashrc & profile) +# Intel compiler and/or TBB/MKL +# +# EXPLANATIONS [RB]: +# In practise, the call to "compilervars.sh" or ("mklvars.sh", etc) should be done in .profile +# (it sets PATH, LD_LIBRARY_PATH, etc.) +# +# BUT, if the login shell is dash, it does not work (we cannot add an extra argument to a sourced script with dash). +# => we call the scripts in both places (.bashrc & .profile) +# => the env is cleaned in "loop.sh", removing duplicates if the .profile was actually read by bash +# +# SPECIAL CASE: "at" job +# => the environment is OK and kept, but "LD_LIBRARY_PATH" is set to nothing by "at" +# => the .profile is then rerun manually in our scripts (with bash) +# => duplicates are finally removed by loop.sh if [ -z "$MKLROOT" ]; then . /opt/intel/bin/compilervars.sh intel64 - #. /opt/intel/mkl/bin/mklvars.sh intel64 - #. /opt/intel/tbb/bin/tbbvars.sh intel64 fi - diff --git a/cfg/spring/compilers.profile b/cfg/spring/compilers.profile index a08a1fb..f8c5c50 100644 --- a/cfg/spring/compilers.profile +++ b/cfg/spring/compilers.profile @@ -1,22 +1,18 @@ -# the .profile is sometimes read by "dash" and we cannot provide -# a sourced script with some parameters (it is a "bashism") +# Intel compiler and/or TBB/MKL +# +# EXPLANATIONS [RB]: +# In practise, the call to "compilervars.sh" or ("mklvars.sh", etc) should be done in .profile +# (it sets PATH, LD_LIBRARY_PATH, etc.) +# +# BUT, if the login shell is dash, it does not work (we cannot add an extra argument to a sourced script with dash). +# => we call the scripts in both places (.bashrc & .profile) +# => the env is cleaned in "loop.sh", removing duplicates if the .profile was actually read by bash +# +# SPECIAL CASE: "at" job +# => the environment is OK and kept, but "LD_LIBRARY_PATH" is set to nothing by "at" +# => the .profile is then rerun manually in our scripts (with bash) +# => duplicates are finally removed by loop.sh if [ -n "$BASH_VERSION" ]; then - #if [ -z "$MKLROOT" ]; then # pas suffisant! (MKLROOT transmis au "at" mais pas LD_LIBRARY_PATH) . /opt/intel/bin/compilervars.sh intel64 # mets intel mpi par defaut! - #. /opt/intel/mkl/bin/mklvars.sh intel64 - #. /opt/intel/tbb/bin/tbbvars.sh intel64 - #fi fi - -# remove duplicate entries in LD_LIBRARY_PATH -# see https://unix.stackexchange.com/questions/40749/remove-duplicate-path-entries-with-awk-command - -# -version initiale -#LD_LIBRARY_PATH=$(printf %s "$LD_LIBRARY_PATH" | awk -v RS=: '{ if (!arr[$0]++) {printf("%s%s",!ln++?"":":",$0)}}') -# -version "boucle" -for var in PATH LD_LIBRARY_PATH INTEL_LICENSE_FILE CPATH INFOPATH NLSPATH LIBRARY_PATH MANPATH CLASSPATH -do - cmd="$var=\$(printf %s \"\$$var\" | awk -v RS=: '{ if (!arr[\$0]++) {printf(\"%s%s\",!ln++?\"\":\":\",\$0)}}')" - eval $(echo $cmd) -done \ No newline at end of file diff --git a/cfg/spring/mumps.profile b/cfg/spring/mumps.profile index 2d94cb9..57e0ada 100644 --- a/cfg/spring/mumps.profile +++ b/cfg/spring/mumps.profile @@ -1,6 +1,3 @@ -# MUMPS + MKL-TBB - add2env LD_LIBRARY_PATH "/opt/mumps/lib" add2env LIB "/opt/mumps/lib" add2env INCLUDE "/opt/mumps/include" - diff --git a/cfg/spring/parasolid.profile b/cfg/spring/parasolid.profile index 5f9e03b..e24e2e8 100644 --- a/cfg/spring/parasolid.profile +++ b/cfg/spring/parasolid.profile @@ -1,6 +1,3 @@ -# Parasolid - add2env PATH "/opt/parasolid/shared_object" add2env INCLUDE "/opt/parasolid" export P_SCHEMA=/opt/parasolid/schema - diff --git a/cfg/thorgal/intelCommunity.bashrc b/cfg/thorgal/intelCommunity.bashrc index 55a8521..09fe18c 100644 --- a/cfg/thorgal/intelCommunity.bashrc +++ b/cfg/thorgal/intelCommunity.bashrc @@ -1,6 +1,17 @@ -# this should be done in the .profile but if the shell is dash -# it does not work. -# => we call intel cf file in both places (bashrc & profile) +# Intel compiler and/or TBB/MKL +# +# EXPLANATIONS [RB]: +# In practise, the call to "compilervars.sh" or ("mklvars.sh", etc) should be done in .profile +# (it sets PATH, LD_LIBRARY_PATH, etc.) +# +# BUT, if the login shell is dash, it does not work (we cannot add an extra argument to a sourced script with dash). +# => we call the scripts in both places (.bashrc & .profile) +# => the env is cleaned in "loop.sh", removing duplicates if the .profile was actually read by bash +# +# SPECIAL CASE: "at" job +# => the environment is OK and kept, but "LD_LIBRARY_PATH" is set to nothing by "at" +# => the .profile is then rerun manually in our scripts (with bash) +# => duplicates are finally removed by loop.sh if [ -z "$MKLROOT" ]; then . /opt/intel/mkl/bin/mklvars.sh intel64 diff --git a/cfg/thorgal/intelCommunity.profile b/cfg/thorgal/intelCommunity.profile index d2bff7e..2501156 100644 --- a/cfg/thorgal/intelCommunity.profile +++ b/cfg/thorgal/intelCommunity.profile @@ -1,11 +1,19 @@ -# the .profile is sometimes read by "dash" and we cannot provide -# a sourced script with some parameters (it is a "bashism") +# Intel compiler and/or TBB/MKL +# +# EXPLANATIONS [RB]: +# In practise, the call to "compilervars.sh" or ("mklvars.sh", etc) should be done in .profile +# (it sets PATH, LD_LIBRARY_PATH, etc.) +# +# BUT, if the login shell is dash, it does not work (we cannot add an extra argument to a sourced script with dash). +# => we call the scripts in both places (.bashrc & .profile) +# => the env is cleaned in "loop.sh", removing duplicates if the .profile was actually read by bash +# +# SPECIAL CASE: "at" job +# => the environment is OK and kept, but "LD_LIBRARY_PATH" is set to nothing by "at" +# => the .profile is then rerun manually in our scripts (with bash) +# => duplicates are finally removed by loop.sh if [ -n "$BASH_VERSION" ]; then - #if [ -z "$MKLROOT" ]; then # pas suffisant! (MKLROOT transmis au "at" mais pas LD_LIBRARY_PATH) . /opt/intel/mkl/bin/mklvars.sh intel64 - #fi - #if [ -z "$TBBROOT" ]; then . /opt/intel/tbb/bin/tbbvars.sh intel64 - #fi fi diff --git a/cfg/thorgal/mumps.profile b/cfg/thorgal/mumps.profile index 2d94cb9..57e0ada 100644 --- a/cfg/thorgal/mumps.profile +++ b/cfg/thorgal/mumps.profile @@ -1,6 +1,3 @@ -# MUMPS + MKL-TBB - add2env LD_LIBRARY_PATH "/opt/mumps/lib" add2env LIB "/opt/mumps/lib" add2env INCLUDE "/opt/mumps/include" - diff --git a/cfg/thorgal/parasolid.profile b/cfg/thorgal/parasolid.profile index 5f9e03b..e24e2e8 100644 --- a/cfg/thorgal/parasolid.profile +++ b/cfg/thorgal/parasolid.profile @@ -1,6 +1,3 @@ -# Parasolid - add2env PATH "/opt/parasolid/shared_object" add2env INCLUDE "/opt/parasolid" export P_SCHEMA=/opt/parasolid/schema - diff --git a/cfg/zen/eclipse.profile b/cfg/zen/eclipse.profile index 989a22d..3861d00 100644 --- a/cfg/zen/eclipse.profile +++ b/cfg/zen/eclipse.profile @@ -1,5 +1 @@ - -if [ -d ~/local/eclipse/cpp-mars/eclipse ] ; then - PATH=$PATH:~/local/eclipse/cpp-mars/eclipse -fi - +add2env PATH "~/local/eclipse/cpp-mars/eclipse" diff --git a/cfg/zen/lammps.profile b/cfg/zen/lammps.profile index 07f77ad..348d0d9 100644 --- a/cfg/zen/lammps.profile +++ b/cfg/zen/lammps.profile @@ -1,5 +1 @@ - -if [ -d ~/dev/lammps/src ] ; then - PATH=$PATH:~/dev/lammps/src -fi - +add2env PATH "~/dev/lammps/src" diff --git a/externalProgramPath.py b/externalProgramPath.py old mode 100644 new mode 100755 diff --git a/externalProgramPathGui.pyw b/externalProgramPathGui.pyw old mode 100644 new mode 100755 diff --git a/postProLoop.py b/postProLoop.py old mode 100644 new mode 100755 diff --git a/postProLoopGui.pyw b/postProLoopGui.pyw old mode 100644 new mode 100755 -- GitLab