diff --git a/cfg/blueberry/intelCommunity.bashrc b/cfg/blueberry/intelCommunity.bashrc index 09fe18c1e4284810ed589a52a0f277eeec31f3e3..2d14ff92dd8decb05ab870de1b83467ec9634c83 100644 --- a/cfg/blueberry/intelCommunity.bashrc +++ b/cfg/blueberry/intelCommunity.bashrc @@ -1,22 +1,8 @@ # 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 +# EXPLANATIONS [RB]: (see "cfg/garfield/compilers.*") -if [ -z "$MKLROOT" ]; then +if [ -d /opt/intel ] ; then . /opt/intel/mkl/bin/mklvars.sh intel64 -fi -if [ -z "$TBBROOT" ]; then . /opt/intel/tbb/bin/tbbvars.sh intel64 fi - diff --git a/cfg/blueberry/intelCommunity.profile b/cfg/blueberry/intelCommunity.profile index 3fa6997e30102509582894798e281ff71bc3adbf..b7ff6515f7b2e9fec9c46c006d25d042fdc70f4b 100644 --- a/cfg/blueberry/intelCommunity.profile +++ b/cfg/blueberry/intelCommunity.profile @@ -1,19 +1,10 @@ # 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 +# EXPLANATIONS [RB]: (see "cfg/garfield/compilers.*") if [ -n "$BASH_VERSION" ]; then - . /opt/intel/mkl/bin/mklvars.sh intel64 - . /opt/intel/tbb/bin/tbbvars.sh intel64 -fi + if [ -d /opt/intel ] ; then + . /opt/intel/mkl/bin/mklvars.sh intel64 + . /opt/intel/tbb/bin/tbbvars.sh intel64 + fi +fi \ No newline at end of file diff --git a/cfg/clifton/intelCommunity.bashrc b/cfg/clifton/intelCommunity.bashrc index 7b93b13d833bc210e40c7d9937d7ac1503934b8b..a24f3b453f24834706ff2ad2aeb7cf9804a71b3f 100644 --- a/cfg/clifton/intelCommunity.bashrc +++ b/cfg/clifton/intelCommunity.bashrc @@ -1,21 +1,8 @@ # 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 +# EXPLANATIONS [RB]: (see "cfg/garfield/compilers.*") -if [ -z "$MKLROOT" ]; then +if [ -d /opt/intelCommunity2017 ] ; then . /opt/intelCommunity2017/mkl/bin/mklvars.sh intel64 -fi -if [ -z "$TBBROOT" ]; then . /opt/intelCommunity2017/tbb/bin/tbbvars.sh intel64 fi diff --git a/cfg/clifton/intelCommunity.profile b/cfg/clifton/intelCommunity.profile index c74dbb2ddedd11150fd0c304a3405c4ba2faa089..597c39a36bbe37ba66f7867e50294021e93e8fb6 100644 --- a/cfg/clifton/intelCommunity.profile +++ b/cfg/clifton/intelCommunity.profile @@ -1,19 +1,10 @@ # 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 +# EXPLANATIONS [RB]: (see "cfg/garfield/compilers.*") if [ -n "$BASH_VERSION" ]; then - . /opt/intelCommunity2017/mkl/bin/mklvars.sh intel64 - . /opt/intelCommunity2017/tbb/bin/tbbvars.sh intel64 + if [ -d /opt/intelCommunity2017 ] ; then + . /opt/intelCommunity2017/mkl/bin/mklvars.sh intel64 + . /opt/intelCommunity2017/tbb/bin/tbbvars.sh intel64 + fi fi diff --git a/cfg/garfield/compilers.bashrc b/cfg/garfield/compilers.bashrc index 3f73074a32091bf5187617b4a4971c1317a5e1c3..9655075107eac4c2acf3bdd2e939f0917a6b04bf 100644 --- a/cfg/garfield/compilers.bashrc +++ b/cfg/garfield/compilers.bashrc @@ -1,20 +1,25 @@ # 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.) +# In practise, the call to "compilervars.sh" or ("mklvars.sh", etc) sets PATH, LD_LIBRARY_PATH. +# If we want these variables to be set system-wide, it should be run in .profile +# +# BUT +# 1. the gnome display manager unset LD_LIBRARY_PATH # -# BUT, if the login shell is dash, it does not work (we cannot add an extra argument to a sourced script with dash). +# 2. if the login shell is "dash", the script cannot be called +# (we cannot add an extra argument to a sourced script with dash). +# THEN # => 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) +# should we run also .bashrc as LD_LIBRARY_PATH should be set here on systems with gnome? # => duplicates are finally removed by loop.sh -if [ -z "$MKLROOT" ]; then - . /opt/intel/mkl/bin/mklvars.sh intel64 - . /opt/intel/tbb/bin/tbbvars.sh intel64 +if [ -d /opt/intel ] ; then + . /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 3fa6997e30102509582894798e281ff71bc3adbf..47e39800223c0e0c05d8d2bfc5ccd3056985944c 100644 --- a/cfg/garfield/compilers.profile +++ b/cfg/garfield/compilers.profile @@ -1,19 +1,27 @@ # 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.) +# In practise, the call to "compilervars.sh" or ("mklvars.sh", etc) sets PATH, LD_LIBRARY_PATH. +# If we want these variables to be set system-wide, it should be run in .profile +# +# BUT +# 1. the gnome display manager unset LD_LIBRARY_PATH # -# BUT, if the login shell is dash, it does not work (we cannot add an extra argument to a sourced script with dash). +# 2. if the login shell is "dash", the script cannot be called +# (we cannot add an extra argument to a sourced script with dash). +# THEN # => 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) +# should we run also .bashrc as LD_LIBRARY_PATH should be set here on systems with gnome? # => duplicates are finally removed by loop.sh if [ -n "$BASH_VERSION" ]; then - . /opt/intel/mkl/bin/mklvars.sh intel64 - . /opt/intel/tbb/bin/tbbvars.sh intel64 + if [ -d /opt/intel ] ; then + . /opt/intel/mkl/bin/mklvars.sh intel64 + . /opt/intel/tbb/bin/tbbvars.sh intel64 + fi fi diff --git a/cfg/garfield/mumps.profile b/cfg/garfield/mumps.profile index 57e0adabd33cd60503f6133f2c8fa4acd4e77105..ad17390d94f796fb907039697e3166b6acf00355 100644 --- a/cfg/garfield/mumps.profile +++ b/cfg/garfield/mumps.profile @@ -1,3 +1,3 @@ -add2env 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/gaston/intelCommunity.bashrc b/cfg/gaston/intelCommunity.bashrc index 7fb2effa4b737db5f5bc12c26503b3c56bb657f0..43482b633f9fbd79eb2dc15eb695d37e0e509762 100644 --- a/cfg/gaston/intelCommunity.bashrc +++ b/cfg/gaston/intelCommunity.bashrc @@ -1,17 +1,6 @@ # 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 +# EXPLANATIONS [RB]: (see "cfg/garfield/compilers.*") if [ -z "$MKLROOT" ]; then . /opt/intel/mkl/bin/mklvars.sh intel64 diff --git a/cfg/gaston/intelCommunity.profile b/cfg/gaston/intelCommunity.profile index 25011564808cb6ddd5f141521806c0f4e4a824ec..e5d1ff529ac7757508667647255d5708529c0467 100644 --- a/cfg/gaston/intelCommunity.profile +++ b/cfg/gaston/intelCommunity.profile @@ -1,19 +1,10 @@ # 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 +# EXPLANATIONS [RB]: (see "cfg/garfield/compilers.*") if [ -n "$BASH_VERSION" ]; then - . /opt/intel/mkl/bin/mklvars.sh intel64 - . /opt/intel/tbb/bin/tbbvars.sh intel64 + if [ -d /opt/intel ] ; then + . /opt/intel/mkl/bin/mklvars.sh intel64 + . /opt/intel/tbb/bin/tbbvars.sh intel64 + fi fi diff --git a/cfg/spring/compilers.bashrc b/cfg/spring/compilers.bashrc index 09e595ab75f0238944165eb52b843820fcac8469..b7f235d395bf1753248d8e741a77493e61700a98 100644 --- a/cfg/spring/compilers.bashrc +++ b/cfg/spring/compilers.bashrc @@ -1,18 +1,9 @@ # 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 +# EXPLANATIONS [RB]: (see "cfg/garfield/compilers.*") if [ -z "$MKLROOT" ]; then - . /opt/intel/bin/compilervars.sh intel64 + if [ -d /opt/intel ] ; then + . /opt/intel/bin/compilervars.sh intel64 + fi fi diff --git a/cfg/spring/compilers.profile b/cfg/spring/compilers.profile index f8c5c50d1acafb34f20ea46b4d4b142a2c720a66..04874c07b5baa14cbcd7faff8dadc34133746694 100644 --- a/cfg/spring/compilers.profile +++ b/cfg/spring/compilers.profile @@ -1,18 +1,9 @@ # 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 +# EXPLANATIONS [RB]: (see "cfg/garfield/compilers.*") if [ -n "$BASH_VERSION" ]; then - . /opt/intel/bin/compilervars.sh intel64 # mets intel mpi par defaut! -fi + if [ -d /opt/intel ] ; then + . /opt/intel/bin/compilervars.sh intel64 # mets intel mpi par defaut! + fi +fi \ No newline at end of file diff --git a/cfg/thorgal/intelCommunity.bashrc b/cfg/thorgal/intelCommunity.bashrc index 09fe18c1e4284810ed589a52a0f277eeec31f3e3..a81955c06d056963a9f05d0b4e730e417edc39c3 100644 --- a/cfg/thorgal/intelCommunity.bashrc +++ b/cfg/thorgal/intelCommunity.bashrc @@ -1,17 +1,6 @@ # 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 +# EXPLANATIONS [RB]: (see "cfg/garfield/compilers.*") if [ -z "$MKLROOT" ]; then . /opt/intel/mkl/bin/mklvars.sh intel64 diff --git a/cfg/thorgal/intelCommunity.profile b/cfg/thorgal/intelCommunity.profile index 25011564808cb6ddd5f141521806c0f4e4a824ec..e5d1ff529ac7757508667647255d5708529c0467 100644 --- a/cfg/thorgal/intelCommunity.profile +++ b/cfg/thorgal/intelCommunity.profile @@ -1,19 +1,10 @@ # 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 +# EXPLANATIONS [RB]: (see "cfg/garfield/compilers.*") if [ -n "$BASH_VERSION" ]; then - . /opt/intel/mkl/bin/mklvars.sh intel64 - . /opt/intel/tbb/bin/tbbvars.sh intel64 + if [ -d /opt/intel ] ; then + . /opt/intel/mkl/bin/mklvars.sh intel64 + . /opt/intel/tbb/bin/tbbvars.sh intel64 + fi fi