Bright-Computing / bic

Bright-Illumina collaboration
GNU General Public License v2.0
4 stars 5 forks source link

Deliver/verify that Lmod works on a Bright cluster, in default rollout (at rpm/system level) #5

Closed fgeorgatos closed 7 years ago

fgeorgatos commented 8 years ago

having #4 resolved makes the user experience better

boegel commented 8 years ago

I'm interested in this too, i.e. in a script that tests a bunch of module and ml commands, and checks whether they resulted in the expected outcome.

fgeorgatos commented 8 years ago

@boegel: Now that I ponder on it, this can be partly implemented by #5. Lmod though may employ its own test suite that can be invoked. I assigned Robert on this, as an authoritative source of truth for best way of testing...

boegel commented 8 years ago

Testing Lmod is done with Hermes (https://github.com/rtmclay/Hermes).

You just need to run tm . in the Lmod directory once Hermes is there.

Not sure if this works on an installed Lmod though (EasyBuild ships it's unit tests in the installation, I don't think Lmod does).

rtmclay commented 8 years ago

The github repo does include the tests. The 6.1 tar ball doesn't but all new releases will.

R.

fgeorgatos commented 8 years ago

as of 20160711, it all looks good on this end:

[root@demo-ext ~]# id
uid=0(root) gid=0(root) groups=0(root)
[root@demo-ext ~]# module --version

Modules based on Lua: Version 6.4.2 (git-2e415be) 2016-06-16 06:28
    by Robert McLay mclay@tacc.utexas.edu

[root@demo-ext ~]# module --gitversion
git-2e415be
[root@demo-ext ~]# rpm -qa|grep -i lmod
Lmod-6.4.2-50_cm7.3.noarch

@rtmclay: is the test-suite included in the default lmod rollout?

boegel commented 8 years ago

@fgeorgatos sort of, it needs to be run from the Lmod repo (not from an installation), cfr. https://github.com/TACC/Lmod/pull/130

fgeorgatos commented 8 years ago

@boegel, @rtmclay : could someone point me on the instructions about how to run the test suite, against our rpm providing Lmod? there is a risk we might be breaking something without it (:-^)

rtmclay commented 8 years ago

As @boegel said, the test suite runs against the source code in the repo not an installation. You can look at the .travis.yml file to see what it does. Mainly you will download hermes, put the bin directory in your path and run tm.

fgeorgatos commented 8 years ago

I must be doing something wrong; lua_cmd does not exist on my machines (is this an alias?) and if I hack it I get:

[fgeorgatos@demo-ext Lmod]$ PATH=$PATH:$HOME/Hermes/bin tm .
lua: /home/fgeorgatos/Hermes/bin/tm:2: unexpected symbol near '#'
fgeorgatos commented 8 years ago

OK, I run it twice, all tests passed, however watch out what happens at the end - bug #45:

Finished Tests

****************************************************************************************************************************************************
*** Test Results                                                                                                                                 ***
****************************************************************************************************************************************************

Date:             Wed Jul 27 23:21:49 2016
TARGET:           
Tag:              2016_07_27
TM Version:       1.7
Hermes Version:   2.1
Lua Version:      Lua 5.1
Total Test Time:  00:01:50.40

****************************************************************************************************************************************************
*** Test Summary                                                                                                                                 ***
****************************************************************************************************************************************************

Total:   93
passed:  93

*******  *  ****   *********                                ***************
Results  R  Time   Test Name                                version/message
*******  *  ****   *********                                ***************
passed   R  0.497  rt/always/always/t1                      
passed   R  2.55   rt/avail/avail/t1                        
passed   R  2.17   rt/between/between/t1                    
passed   R  3.66   rt/boegel/boegel/t1                      
passed   R  0.494  rt/broken_default/broken/t1              
passed   R  0.394  rt/broken_modulerc/broken_modulerc/t1    
passed   R  0.383  rt/cache/cache/t1                        
passed   R  0.796  rt/cached_loads/cached_loads/t1          
passed   R  0.576  rt/cas_avail/cas_avail/t1                
passed   R  2.28   rt/changeMPATH/changeMPATH/t1            
passed   R  0.617  rt/colorize/colorize/t1                  
passed   R  6.37   rt/columnT/columnT/t1                    
passed   R  0.484  rt/conflict/conflict/t1                  
passed   R  1.18   rt/csh_swap/csh_swap/t1                  
passed   R  0.298  rt/dbT/dbT/t1                            
passed   R  0.507  rt/defaults/defaults/t1                  
passed   R  0.574  rt/delcatty/delcatty/t1                  
passed   R  0.91   rt/delim/delim/t1                        
passed   R  0.403  rt/deprecation/deprecation/t1            
passed   R  0.451  rt/disappear/disappear/t1                
passed   R  0.372  rt/display/display/t1                    
passed   R  1.16   rt/dot/dot/t1                            
passed   R  0.932  rt/dups/dups/t1                          
passed   R  1.71   rt/eb/eb/t1                              
passed   R  0.513  rt/eb_avail/eb_avail/t1                  
passed   R  0.298  rt/empty/empty/t1                        
passed   R  7.99   rt/end2end/end2end/t1                    
passed   R  0.305  rt/errHandler/errHander/t1               
passed   R  0.298  rt/funny_files/funny_files/t1            
passed   R  0.326  rt/genesis/genesis/t1                    
passed   R  1.03   rt/hash_try_load/hash_try_load/t1        
passed   R  0.825  rt/helios/helios/t1                      
passed   R  0.427  rt/help/help/t1                          
passed   R  2.92   rt/hierarchy/hierarchy/t1                
passed   R  0.36   rt/hook/hook/t1                          
passed   R  1.34   rt/ifur/ifur/t1                          
passed   R  1.33   rt/inherit/inherit/t1                    
passed   R  0.676  rt/isloaded/isloaded/t1                  
passed   R  0.81   rt/itac/itac/t1                          
passed   R  0.68   rt/junk/junk/t1                          
passed   R  0.272  rt/keyword/keyword/t1                    
passed   R  1.51   rt/lars/lars/t1                          
passed   R  0.439  rt/lastName/lastName/t1                  
passed   R  0.808  rt/lnk_same_dir/lnk_same_dir/t1          
passed   R  5.33   rt/load/load/t1                          
passed   R  0.542  rt/manpath/manpath/t1                    
passed   R  0.864  rt/mixed/mixed/t1                        
passed   R  0.315  rt/ml/ml/t1                              
passed   R  2.3    rt/modulerc/modulerc/t1                  
passed   R  0.621  rt/mpath/mpath/t1                        
passed   R  1.38   rt/multiL/multiL/t1                      
passed   R  0.322  rt/multiparents/multiparents/t1          
passed   R  0.27   rt/nil/nil/t1                            
passed   R  0.651  rt/noTCL/noTCL/t1                        
passed   R  0.466  rt/oscar/oscar/t1                        
passed   R  0.495  rt/p4est/p4est/t1                        
passed   R  0.286  rt/perl/perl/t1                          
passed   R  0.433  rt/personal_mf/personal_mf/t1            
passed   R  0.625  rt/petsc/petsc/t1                        
passed   R  0.867  rt/pkg/pkg/t1                            
passed   R  1.3    rt/prereq/prereq/t1                      
passed   R  0.789  rt/priority/priority/t1                  
passed   R  0.751  rt/properties/properties/t1              
passed   R  0.905  rt/purge/purge/t1                        
passed   R  1.34   rt/pushenv/pushenv/t1                    
passed   R  0.303  rt/python/python/t1                      
passed   R  0.341  rt/refresh/refresh/t1                    
passed   R  0.904  rt/reset/reset/t1                        
passed   R  0.314  rt/rmap/rmap/t1                          
passed   R  0.36   rt/rtm_inherit/rtm_inherit/t1            
passed   R  6.1    rt/saverestore/saverestore/t1            
passed   R  1.57   rt/sd_tacc/sd_tacc/t1                    
passed   R  0.599  rt/set_alias/set_alias/t1                
passed   R  0.967  rt/settarg/settarg_bash/settarg_bash/t1  
passed   R  0.256  rt/sh_to_modulefile/sh_to_modulefile/t1  
passed   R  1.03   rt/show/show/t1                          
passed   R  0.353  rt/slash/slash/t1                        
passed   R  3      rt/spider/spider/t1                      
passed   R  0.475  rt/spider_dot/spider_dot/t1              
passed   R  4.09   rt/sticky/sticky/t1                      
passed   R  3.88   rt/swap/swap/t1                          
passed   R  0.52   rt/symlink/symlink/t1                    
passed   R  4.27   rt/tabcompl/tabcompl/t1                  
passed   R  2.21   rt/tacc/tacc/t1                          
passed   R  0.837  rt/tamu/tamu/t1                          
passed   R  0.754  rt/uitSitePkg/uitSitePkg/t1              
passed   R  0.663  rt/unload/unload/t1                      
passed   R  0.439  rt/use_append/use_append/t1              
passed   R  0.417  rt/use_cmdline/use_cmdline/t1            
passed   R  0.573  rt/use_unuse/use_unuse/t1                
passed   R  0.325  rt/varType/varType/t1                    
passed   R  0.708  rt/vasp/vasp/t1                          
passed   R  0.346  rt/versionTest/versionTest/t1            

[rtmclay@demo-ext Lmod]$ 
[rtmclay@demo-ext Lmod]$ 
[rtmclay@demo-ext Lmod]$ 
[rtmclay@demo-ext Lmod]$ 
[rtmclay@demo-ext Lmod]$ 
[rtmclay@demo-ext Lmod]$ 
[rtmclay@demo-ext Lmod]$ time tm .
TM Version: 1.7

Starting Tests:

     Started : 23:24:00 tst: 1/93 P/F: 0:0, rt/delim/delim/t1
      passed : 23:24:01 tst: 1/93 P/F: 1:0, rt/delim/delim/t1

     Started : 23:24:01 tst: 2/93 P/F: 1:0, rt/end2end/end2end/t1
      passed : 23:24:09 tst: 2/93 P/F: 2:0, rt/end2end/end2end/t1

     Started : 23:24:09 tst: 3/93 P/F: 2:0, rt/between/between/t1
      passed : 23:24:11 tst: 3/93 P/F: 3:0, rt/between/between/t1

     Started : 23:24:11 tst: 4/93 P/F: 3:0, rt/tamu/tamu/t1
      passed : 23:24:12 tst: 4/93 P/F: 4:0, rt/tamu/tamu/t1

     Started : 23:24:12 tst: 5/93 P/F: 4:0, rt/inherit/inherit/t1
      passed : 23:24:13 tst: 5/93 P/F: 5:0, rt/inherit/inherit/t1

     Started : 23:24:13 tst: 6/93 P/F: 5:0, rt/keyword/keyword/t1
      passed : 23:24:14 tst: 6/93 P/F: 6:0, rt/keyword/keyword/t1

     Started : 23:24:14 tst: 7/93 P/F: 6:0, rt/help/help/t1
      passed : 23:24:14 tst: 7/93 P/F: 7:0, rt/help/help/t1

     Started : 23:24:14 tst: 8/93 P/F: 7:0, rt/hash_try_load/hash_try_load/t1
      passed : 23:24:15 tst: 8/93 P/F: 8:0, rt/hash_try_load/hash_try_load/t1

     Started : 23:24:15 tst: 9/93 P/F: 8:0, rt/csh_swap/csh_swap/t1
      passed : 23:24:16 tst: 9/93 P/F: 9:0, rt/csh_swap/csh_swap/t1

     Started : 23:24:16 tst: 10/93 P/F: 9:0, rt/sd_tacc/sd_tacc/t1
      passed : 23:24:18 tst: 10/93 P/F: 10:0, rt/sd_tacc/sd_tacc/t1

     Started : 23:24:18 tst: 11/93 P/F: 10:0, rt/sticky/sticky/t1
      passed : 23:24:22 tst: 11/93 P/F: 11:0, rt/sticky/sticky/t1

     Started : 23:24:22 tst: 12/93 P/F: 11:0, rt/conflict/conflict/t1
      passed : 23:24:22 tst: 12/93 P/F: 12:0, rt/conflict/conflict/t1

     Started : 23:24:22 tst: 13/93 P/F: 12:0, rt/dbT/dbT/t1
      passed : 23:24:23 tst: 13/93 P/F: 13:0, rt/dbT/dbT/t1

     Started : 23:24:23 tst: 14/93 P/F: 13:0, rt/defaults/defaults/t1
      passed : 23:24:23 tst: 14/93 P/F: 14:0, rt/defaults/defaults/t1

     Started : 23:24:23 tst: 15/93 P/F: 14:0, rt/broken_default/broken/t1
      passed : 23:24:24 tst: 15/93 P/F: 15:0, rt/broken_default/broken/t1

     Started : 23:24:24 tst: 16/93 P/F: 15:0, rt/nil/nil/t1
      passed : 23:24:24 tst: 16/93 P/F: 16:0, rt/nil/nil/t1

     Started : 23:24:24 tst: 17/93 P/F: 16:0, rt/swap/swap/t1
      passed : 23:24:28 tst: 17/93 P/F: 17:0, rt/swap/swap/t1

     Started : 23:24:28 tst: 18/93 P/F: 17:0, rt/cas_avail/cas_avail/t1
      passed : 23:24:28 tst: 18/93 P/F: 18:0, rt/cas_avail/cas_avail/t1

     Started : 23:24:28 tst: 19/93 P/F: 18:0, rt/eb/eb/t1
      passed : 23:24:30 tst: 19/93 P/F: 19:0, rt/eb/eb/t1

     Started : 23:24:30 tst: 20/93 P/F: 19:0, rt/deprecation/deprecation/t1
      passed : 23:24:30 tst: 20/93 P/F: 20:0, rt/deprecation/deprecation/t1

     Started : 23:24:30 tst: 21/93 P/F: 20:0, rt/dot/dot/t1
      passed : 23:24:32 tst: 21/93 P/F: 21:0, rt/dot/dot/t1

     Started : 23:24:32 tst: 22/93 P/F: 21:0, rt/dups/dups/t1
      passed : 23:24:33 tst: 22/93 P/F: 22:0, rt/dups/dups/t1

     Started : 23:24:33 tst: 23/93 P/F: 22:0, rt/set_alias/set_alias/t1
      passed : 23:24:33 tst: 23/93 P/F: 23:0, rt/set_alias/set_alias/t1

     Started : 23:24:33 tst: 24/93 P/F: 23:0, rt/reset/reset/t1
      passed : 23:24:34 tst: 24/93 P/F: 24:0, rt/reset/reset/t1

     Started : 23:24:34 tst: 25/93 P/F: 24:0, rt/junk/junk/t1
      passed : 23:24:35 tst: 25/93 P/F: 25:0, rt/junk/junk/t1

     Started : 23:24:35 tst: 26/93 P/F: 25:0, rt/refresh/refresh/t1
      passed : 23:24:35 tst: 26/93 P/F: 26:0, rt/refresh/refresh/t1

     Started : 23:24:35 tst: 27/93 P/F: 26:0, rt/mpath/mpath/t1
      passed : 23:24:36 tst: 27/93 P/F: 27:0, rt/mpath/mpath/t1

     Started : 23:24:36 tst: 28/93 P/F: 27:0, rt/lastName/lastName/t1
      passed : 23:24:36 tst: 28/93 P/F: 28:0, rt/lastName/lastName/t1

     Started : 23:24:36 tst: 29/93 P/F: 28:0, rt/multiparents/multiparents/t1
      passed : 23:24:37 tst: 29/93 P/F: 29:0, rt/multiparents/multiparents/t1

     Started : 23:24:37 tst: 30/93 P/F: 29:0, rt/isloaded/isloaded/t1
      passed : 23:24:37 tst: 30/93 P/F: 30:0, rt/isloaded/isloaded/t1

     Started : 23:24:37 tst: 31/93 P/F: 30:0, rt/always/always/t1
      passed : 23:24:38 tst: 31/93 P/F: 31:0, rt/always/always/t1

     Started : 23:24:38 tst: 32/93 P/F: 31:0, rt/eb_avail/eb_avail/t1
      passed : 23:24:38 tst: 32/93 P/F: 32:0, rt/eb_avail/eb_avail/t1

     Started : 23:24:38 tst: 33/93 P/F: 32:0, rt/empty/empty/t1
      passed : 23:24:39 tst: 33/93 P/F: 33:0, rt/empty/empty/t1

     Started : 23:24:39 tst: 34/93 P/F: 33:0, rt/use_unuse/use_unuse/t1
      passed : 23:24:39 tst: 34/93 P/F: 34:0, rt/use_unuse/use_unuse/t1

     Started : 23:24:39 tst: 35/93 P/F: 34:0, rt/lars/lars/t1
      passed : 23:24:41 tst: 35/93 P/F: 35:0, rt/lars/lars/t1

     Started : 23:24:41 tst: 36/93 P/F: 35:0, rt/versionTest/versionTest/t1
      passed : 23:24:41 tst: 36/93 P/F: 36:0, rt/versionTest/versionTest/t1

     Started : 23:24:41 tst: 37/93 P/F: 36:0, rt/ml/ml/t1
      passed : 23:24:41 tst: 37/93 P/F: 37:0, rt/ml/ml/t1

     Started : 23:24:41 tst: 38/93 P/F: 37:0, rt/varType/varType/t1
      passed : 23:24:42 tst: 38/93 P/F: 38:0, rt/varType/varType/t1

     Started : 23:24:42 tst: 39/93 P/F: 38:0, rt/cached_loads/cached_loads/t1
      passed : 23:24:42 tst: 39/93 P/F: 39:0, rt/cached_loads/cached_loads/t1

     Started : 23:24:42 tst: 40/93 P/F: 39:0, rt/lnk_same_dir/lnk_same_dir/t1
      passed : 23:24:43 tst: 40/93 P/F: 40:0, rt/lnk_same_dir/lnk_same_dir/t1

     Started : 23:24:43 tst: 41/93 P/F: 40:0, rt/show/show/t1
      passed : 23:24:44 tst: 41/93 P/F: 41:0, rt/show/show/t1

     Started : 23:24:44 tst: 42/93 P/F: 41:0, rt/ifur/ifur/t1
      passed : 23:24:46 tst: 42/93 P/F: 42:0, rt/ifur/ifur/t1

     Started : 23:24:46 tst: 43/93 P/F: 42:0, rt/manpath/manpath/t1
      passed : 23:24:46 tst: 43/93 P/F: 43:0, rt/manpath/manpath/t1

     Started : 23:24:46 tst: 44/93 P/F: 43:0, rt/boegel/boegel/t1
      passed : 23:24:50 tst: 44/93 P/F: 44:0, rt/boegel/boegel/t1

     Started : 23:24:50 tst: 45/93 P/F: 44:0, rt/python/python/t1
      passed : 23:24:50 tst: 45/93 P/F: 45:0, rt/python/python/t1

     Started : 23:24:50 tst: 46/93 P/F: 45:0, rt/rmap/rmap/t1
      passed : 23:24:51 tst: 46/93 P/F: 46:0, rt/rmap/rmap/t1

     Started : 23:24:51 tst: 47/93 P/F: 46:0, rt/petsc/petsc/t1
      passed : 23:24:51 tst: 47/93 P/F: 47:0, rt/petsc/petsc/t1

     Started : 23:24:51 tst: 48/93 P/F: 47:0, rt/perl/perl/t1
      passed : 23:24:51 tst: 48/93 P/F: 48:0, rt/perl/perl/t1

     Started : 23:24:51 tst: 49/93 P/F: 48:0, rt/purge/purge/t1
      passed : 23:24:52 tst: 49/93 P/F: 49:0, rt/purge/purge/t1

     Started : 23:24:52 tst: 50/93 P/F: 49:0, rt/tabcompl/tabcompl/t1
      passed : 23:24:57 tst: 50/93 P/F: 50:0, rt/tabcompl/tabcompl/t1

     Started : 23:24:57 tst: 51/93 P/F: 50:0, rt/prereq/prereq/t1
      passed : 23:24:58 tst: 51/93 P/F: 51:0, rt/prereq/prereq/t1

     Started : 23:24:58 tst: 52/93 P/F: 51:0, rt/tacc/tacc/t1
      passed : 23:25:00 tst: 52/93 P/F: 52:0, rt/tacc/tacc/t1

     Started : 23:25:00 tst: 53/93 P/F: 52:0, rt/hook/hook/t1
      passed : 23:25:01 tst: 53/93 P/F: 53:0, rt/hook/hook/t1

     Started : 23:25:01 tst: 54/93 P/F: 53:0, rt/avail/avail/t1
      passed : 23:25:03 tst: 54/93 P/F: 54:0, rt/avail/avail/t1

     Started : 23:25:03 tst: 55/93 P/F: 54:0, rt/cache/cache/t1
      passed : 23:25:04 tst: 55/93 P/F: 55:0, rt/cache/cache/t1

     Started : 23:25:04 tst: 56/93 P/F: 55:0, rt/personal_mf/personal_mf/t1
      passed : 23:25:04 tst: 56/93 P/F: 56:0, rt/personal_mf/personal_mf/t1

     Started : 23:25:04 tst: 57/93 P/F: 56:0, rt/mixed/mixed/t1
      passed : 23:25:05 tst: 57/93 P/F: 57:0, rt/mixed/mixed/t1

     Started : 23:25:05 tst: 58/93 P/F: 57:0, rt/columnT/columnT/t1
      passed : 23:25:11 tst: 58/93 P/F: 58:0, rt/columnT/columnT/t1

     Started : 23:25:11 tst: 59/93 P/F: 58:0, rt/changeMPATH/changeMPATH/t1
      passed : 23:25:13 tst: 59/93 P/F: 59:0, rt/changeMPATH/changeMPATH/t1

     Started : 23:25:13 tst: 60/93 P/F: 59:0, rt/display/display/t1
      passed : 23:25:14 tst: 60/93 P/F: 60:0, rt/display/display/t1

     Started : 23:25:14 tst: 61/93 P/F: 60:0, rt/unload/unload/t1
      passed : 23:25:15 tst: 61/93 P/F: 61:0, rt/unload/unload/t1

     Started : 23:25:15 tst: 62/93 P/F: 61:0, rt/settarg/settarg_bash/settarg_bash/t1
      passed : 23:25:16 tst: 62/93 P/F: 62:0, rt/settarg/settarg_bash/settarg_bash/t1

     Started : 23:25:16 tst: 63/93 P/F: 62:0, rt/sh_to_modulefile/sh_to_modulefile/t1
      passed : 23:25:16 tst: 63/93 P/F: 63:0, rt/sh_to_modulefile/sh_to_modulefile/t1

     Started : 23:25:16 tst: 64/93 P/F: 63:0, rt/load/load/t1
      passed : 23:25:21 tst: 64/93 P/F: 64:0, rt/load/load/t1

     Started : 23:25:21 tst: 65/93 P/F: 64:0, rt/funny_files/funny_files/t1
      passed : 23:25:21 tst: 65/93 P/F: 65:0, rt/funny_files/funny_files/t1

     Started : 23:25:21 tst: 66/93 P/F: 65:0, rt/priority/priority/t1
      passed : 23:25:22 tst: 66/93 P/F: 66:0, rt/priority/priority/t1

     Started : 23:25:22 tst: 67/93 P/F: 66:0, rt/saverestore/saverestore/t1
      passed : 23:25:28 tst: 67/93 P/F: 67:0, rt/saverestore/saverestore/t1

     Started : 23:25:28 tst: 68/93 P/F: 67:0, rt/helios/helios/t1
      passed : 23:25:29 tst: 68/93 P/F: 68:0, rt/helios/helios/t1

     Started : 23:25:29 tst: 69/93 P/F: 68:0, rt/p4est/p4est/t1
      passed : 23:25:30 tst: 69/93 P/F: 69:0, rt/p4est/p4est/t1

     Started : 23:25:30 tst: 70/93 P/F: 69:0, rt/oscar/oscar/t1
      passed : 23:25:30 tst: 70/93 P/F: 70:0, rt/oscar/oscar/t1

     Started : 23:25:30 tst: 71/93 P/F: 70:0, rt/properties/properties/t1
      passed : 23:25:31 tst: 71/93 P/F: 71:0, rt/properties/properties/t1

     Started : 23:25:31 tst: 72/93 P/F: 71:0, rt/pushenv/pushenv/t1
      passed : 23:25:32 tst: 72/93 P/F: 72:0, rt/pushenv/pushenv/t1

     Started : 23:25:32 tst: 73/93 P/F: 72:0, rt/uitSitePkg/uitSitePkg/t1
      passed : 23:25:33 tst: 73/93 P/F: 73:0, rt/uitSitePkg/uitSitePkg/t1

     Started : 23:25:33 tst: 74/93 P/F: 73:0, rt/errHandler/errHander/t1
      passed : 23:25:33 tst: 74/93 P/F: 74:0, rt/errHandler/errHander/t1

     Started : 23:25:33 tst: 75/93 P/F: 74:0, rt/rtm_inherit/rtm_inherit/t1
      passed : 23:25:34 tst: 75/93 P/F: 75:0, rt/rtm_inherit/rtm_inherit/t1

     Started : 23:25:34 tst: 76/93 P/F: 75:0, rt/vasp/vasp/t1
      passed : 23:25:34 tst: 76/93 P/F: 76:0, rt/vasp/vasp/t1

     Started : 23:25:34 tst: 77/93 P/F: 76:0, rt/genesis/genesis/t1
      passed : 23:25:35 tst: 77/93 P/F: 77:0, rt/genesis/genesis/t1

     Started : 23:25:35 tst: 78/93 P/F: 77:0, rt/spider/spider/t1
      passed : 23:25:38 tst: 78/93 P/F: 78:0, rt/spider/spider/t1

     Started : 23:25:38 tst: 79/93 P/F: 78:0, rt/modulerc/modulerc/t1
      passed : 23:25:40 tst: 79/93 P/F: 79:0, rt/modulerc/modulerc/t1

     Started : 23:25:40 tst: 80/93 P/F: 79:0, rt/disappear/disappear/t1
      passed : 23:25:40 tst: 80/93 P/F: 80:0, rt/disappear/disappear/t1

     Started : 23:25:40 tst: 81/93 P/F: 80:0, rt/use_append/use_append/t1
      passed : 23:25:41 tst: 81/93 P/F: 81:0, rt/use_append/use_append/t1

     Started : 23:25:41 tst: 82/93 P/F: 81:0, rt/hierarchy/hierarchy/t1
      passed : 23:25:44 tst: 82/93 P/F: 82:0, rt/hierarchy/hierarchy/t1

     Started : 23:25:44 tst: 83/93 P/F: 82:0, rt/noTCL/noTCL/t1
      passed : 23:25:44 tst: 83/93 P/F: 83:0, rt/noTCL/noTCL/t1

     Started : 23:25:44 tst: 84/93 P/F: 83:0, rt/itac/itac/t1
      passed : 23:25:45 tst: 84/93 P/F: 84:0, rt/itac/itac/t1

     Started : 23:25:45 tst: 85/93 P/F: 84:0, rt/delcatty/delcatty/t1
      passed : 23:25:46 tst: 85/93 P/F: 85:0, rt/delcatty/delcatty/t1

     Started : 23:25:46 tst: 86/93 P/F: 85:0, rt/multiL/multiL/t1
      passed : 23:25:47 tst: 86/93 P/F: 86:0, rt/multiL/multiL/t1

     Started : 23:25:47 tst: 87/93 P/F: 86:0, rt/spider_dot/spider_dot/t1
      passed : 23:25:48 tst: 87/93 P/F: 87:0, rt/spider_dot/spider_dot/t1

     Started : 23:25:48 tst: 88/93 P/F: 87:0, rt/colorize/colorize/t1
      passed : 23:25:48 tst: 88/93 P/F: 88:0, rt/colorize/colorize/t1

     Started : 23:25:48 tst: 89/93 P/F: 88:0, rt/use_cmdline/use_cmdline/t1
      passed : 23:25:49 tst: 89/93 P/F: 89:0, rt/use_cmdline/use_cmdline/t1

     Started : 23:25:49 tst: 90/93 P/F: 89:0, rt/broken_modulerc/broken_modulerc/t1
      passed : 23:25:49 tst: 90/93 P/F: 90:0, rt/broken_modulerc/broken_modulerc/t1

     Started : 23:25:49 tst: 91/93 P/F: 90:0, rt/pkg/pkg/t1
      passed : 23:25:50 tst: 91/93 P/F: 91:0, rt/pkg/pkg/t1

     Started : 23:25:50 tst: 92/93 P/F: 91:0, rt/slash/slash/t1
      passed : 23:25:50 tst: 92/93 P/F: 92:0, rt/slash/slash/t1

     Started : 23:25:50 tst: 93/93 P/F: 92:0, rt/symlink/symlink/t1
      passed : 23:25:51 tst: 93/93 P/F: 93:0, rt/symlink/symlink/t1

Finished Tests

****************************************************************************************************************************************************
*** Test Results                                                                                                                                 ***
****************************************************************************************************************************************************

Date:             Wed Jul 27 23:24:00 2016
TARGET:           
Tag:              2016_07_27
TM Version:       1.7
Hermes Version:   2.1
Lua Version:      Lua 5.1
Total Test Time:  00:01:50.02

****************************************************************************************************************************************************
*** Test Summary                                                                                                                                 ***
****************************************************************************************************************************************************

Total:   93
passed:  93

*******  *  ****   *********                                ***************
Results  R  Time   Test Name                                version/message
*******  *  ****   *********                                ***************
passed   R  0.502  rt/always/always/t1                      
passed   R  2.56   rt/avail/avail/t1                        
passed   R  2.04   rt/between/between/t1                    
passed   R  3.77   rt/boegel/boegel/t1                      
passed   R  0.483  rt/broken_default/broken/t1              
passed   R  0.39   rt/broken_modulerc/broken_modulerc/t1    
passed   R  0.369  rt/cache/cache/t1                        
passed   R  0.797  rt/cached_loads/cached_loads/t1          
passed   R  0.566  rt/cas_avail/cas_avail/t1                
passed   R  2.22   rt/changeMPATH/changeMPATH/t1            
passed   R  0.616  rt/colorize/colorize/t1                  
passed   R  6.4    rt/columnT/columnT/t1                    
passed   R  0.476  rt/conflict/conflict/t1                  
passed   R  1.17   rt/csh_swap/csh_swap/t1                  
passed   R  0.289  rt/dbT/dbT/t1                            
passed   R  0.503  rt/defaults/defaults/t1                  
passed   R  0.583  rt/delcatty/delcatty/t1                  
passed   R  0.899  rt/delim/delim/t1                        
passed   R  0.387  rt/deprecation/deprecation/t1            
passed   R  0.448  rt/disappear/disappear/t1                
passed   R  0.38   rt/display/display/t1                    
passed   R  1.15   rt/dot/dot/t1                            
passed   R  0.934  rt/dups/dups/t1                          
passed   R  1.74   rt/eb/eb/t1                              
passed   R  0.508  rt/eb_avail/eb_avail/t1                  
passed   R  0.295  rt/empty/empty/t1                        
passed   R  7.82   rt/end2end/end2end/t1                    
passed   R  0.31   rt/errHandler/errHander/t1               
passed   R  0.286  rt/funny_files/funny_files/t1            
passed   R  0.337  rt/genesis/genesis/t1                    
passed   R  1.02   rt/hash_try_load/hash_try_load/t1        
passed   R  0.836  rt/helios/helios/t1                      
passed   R  0.442  rt/help/help/t1                          
passed   R  2.81   rt/hierarchy/hierarchy/t1                
passed   R  0.366  rt/hook/hook/t1                          
passed   R  1.35   rt/ifur/ifur/t1                          
passed   R  1.32   rt/inherit/inherit/t1                    
passed   R  0.723  rt/isloaded/isloaded/t1                  
passed   R  0.82   rt/itac/itac/t1                          
passed   R  0.688  rt/junk/junk/t1                          
passed   R  0.277  rt/keyword/keyword/t1                    
passed   R  1.52   rt/lars/lars/t1                          
passed   R  0.435  rt/lastName/lastName/t1                  
passed   R  0.784  rt/lnk_same_dir/lnk_same_dir/t1          
passed   R  5.31   rt/load/load/t1                          
passed   R  0.541  rt/manpath/manpath/t1                    
passed   R  0.84   rt/mixed/mixed/t1                        
passed   R  0.324  rt/ml/ml/t1                              
passed   R  2.27   rt/modulerc/modulerc/t1                  
passed   R  0.612  rt/mpath/mpath/t1                        
passed   R  1.39   rt/multiL/multiL/t1                      
passed   R  0.322  rt/multiparents/multiparents/t1          
passed   R  0.269  rt/nil/nil/t1                            
passed   R  0.661  rt/noTCL/noTCL/t1                        
passed   R  0.451  rt/oscar/oscar/t1                        
passed   R  0.475  rt/p4est/p4est/t1                        
passed   R  0.273  rt/perl/perl/t1                          
passed   R  0.444  rt/personal_mf/personal_mf/t1            
passed   R  0.611  rt/petsc/petsc/t1                        
passed   R  0.869  rt/pkg/pkg/t1                            
passed   R  1.26   rt/prereq/prereq/t1                      
passed   R  0.809  rt/priority/priority/t1                  
passed   R  0.746  rt/properties/properties/t1              
passed   R  0.921  rt/purge/purge/t1                        
passed   R  1.33   rt/pushenv/pushenv/t1                    
passed   R  0.301  rt/python/python/t1                      
passed   R  0.344  rt/refresh/refresh/t1                    
passed   R  0.941  rt/reset/reset/t1                        
passed   R  0.316  rt/rmap/rmap/t1                          
passed   R  0.38   rt/rtm_inherit/rtm_inherit/t1            
passed   R  6.09   rt/saverestore/saverestore/t1            
passed   R  1.53   rt/sd_tacc/sd_tacc/t1                    
passed   R  0.582  rt/set_alias/set_alias/t1                
passed   R  1.03   rt/settarg/settarg_bash/settarg_bash/t1  
passed   R  0.251  rt/sh_to_modulefile/sh_to_modulefile/t1  
passed   R  0.95   rt/show/show/t1                          
passed   R  0.333  rt/slash/slash/t1                        
passed   R  3.03   rt/spider/spider/t1                      
passed   R  0.478  rt/spider_dot/spider_dot/t1              
passed   R  4.04   rt/sticky/sticky/t1                      
passed   R  3.95   rt/swap/swap/t1                          
passed   R  0.515  rt/symlink/symlink/t1                    
passed   R  4.34   rt/tabcompl/tabcompl/t1                  
passed   R  2.27   rt/tacc/tacc/t1                          
passed   R  0.837  rt/tamu/tamu/t1                          
passed   R  0.723  rt/uitSitePkg/uitSitePkg/t1              
passed   R  0.648  rt/unload/unload/t1                      
passed   R  0.434  rt/use_append/use_append/t1              
passed   R  0.433  rt/use_cmdline/use_cmdline/t1            
passed   R  0.566  rt/use_unuse/use_unuse/t1                
passed   R  0.33   rt/varType/varType/t1                    
passed   R  0.677  rt/vasp/vasp/t1                          
passed   R  0.352  rt/versionTest/versionTest/t1            

real    1m50.716s
user    1m25.510s
sys     0m26.730s
[rtmclay@demo-ext Lmod]$ 
[rtmclay@demo-ext Lmod]$ module av

----------------------------------------------------------------- /etc/modulefiles ------------------------------------------------------------------
   HPCBIOS/2016q2 (L)    sge (L)

  Where:
   L:  Module is loaded

Use "module spider" to find all possible modules.
Use "module keyword key1 key2 ..." to search for all possible modules matching any of the "keys".

[rtmclay@demo-ext Lmod]$ ml

Currently Loaded Modules:
  1) HPCBIOS/2016q2   2) sge

[rtmclay@demo-ext Lmod]$ ml -sge
[rtmclay@demo-ext Lmod]$ bash
[rtmclay@demo-ext Lmod]$ ml

Currently Loaded Modules:
  1) HPCBIOS/2016q2   2) sge

[rtmclay@demo-ext Lmod]$ exit
exit
[rtmclay@demo-ext Lmod]$ ml

Currently Loaded Modules:
  1) HPCBIOS/2016q2

[rtmclay@demo-ext Lmod]$
rtmclay commented 8 years ago

This is because of the startup behavior in /etc/profile.d/z01-default_modules.sh:

if [ -z "$__Init_Default_Modules" -o -z "$LD_LIBRARY_PATH" ]; then
   export __Init_Default_Modules=1;
   if [ -z "$LMOD_SYSTEM_DEFAULT_MODULES" ];then
     if [ -f "/usr/share/modulefiles/DefaultModules.lua" ];then
       export LMOD_SYSTEM_DEFAULT_MODULES="DefaultModules"
     else
       if [ -f "/usr/share/modulefiles/StdEnv.lua" ];then
         export LMOD_SYSTEM_DEFAULT_MODULES="StdEnv"
       fi
     fi
   fi
   module --initial_load restore
else
   module refresh
fi

The problem is that LD_LIBRARY_PATH is empty so when you create a subshell you end up doing:

module --initial_load restore

I added the check for LD_LIBRARY_PATH because if you run a program like screen wipes LD_LIBRARY_PATH so I'd like my modules reloaded. That is not a perfect solution. You can remove the LD_LIBRARY_TEST from z01-default_modules.sh and it will work for you. We always set LD_LIBRARY_PATH in our initial modules so we have never had this problem.

fgeorgatos commented 8 years ago

Do I correctly realize that a system with empty default $LD_LIBRARY_PATH will always be buggy?! @rtmclay : can we do something better than this?

rtmclay commented 8 years ago

It seems to me that you should just remove the test for an empty $LD_LIBRARY_PATH. That will fix your problem.

fgeorgatos commented 8 years ago

btw. I confirm that the following makes the issue go away: export LD_LIBRARY_PATH=/tmp/test1;mkdir $LD_LIBRARY_PATH

Here's the longer explanation on the why of this: http://superuser.com/questions/235760/ld-library-path-unset-by-screen

Interestingly, although Lmod's approach is a kludge, it is a better kludge than most other things I see people proposing. It only does not behave when you do mean to have empty LD_LIBRARY_PATH. (perhaps, this is our answer: point to an empty directory, to be sure)

fgeorgatos commented 7 years ago

OK, I start to understand a little bit better what is going on here, and I'd propose the following:

[fgeorgatos@demo2 ~]$ ml

Currently Loaded Modules:
  1) HPCBIOS/2016q2   2) sge

[fgeorgatos@demo2 ~]$ ml dot null
[fgeorgatos@demo2 ~]$ env|sort|egrep '(__|LD_|MODULE)'
__Init_Default_Modules=1
LMOD_DEFAULT_MODULEPATH=/cm/local/modulefiles:/cm/shared/modulefiles:/etc/modulefiles:/usr/share/modulefiles:/usr/share/Modules/modulefiles
LMOD_SYSTEM_DEFAULT_MODULES=HPCBIOS sge
LOADEDMODULES=HPCBIOS/2016q2:sge:dot:null
MODULEPATH=/cm/local/modulefiles:/cm/shared/modulefiles:/etc/modulefiles:/usr/share/modulefiles:/usr/share/Modules/modulefiles
MODULEPATH_ROOT=/usr/share/modulefiles
MODULESHOME=/usr/share/lmod/lmod
[fgeorgatos@demo2 ~]$

Instead of relying on the value of $LD_LIBRARY_PATH alone, inspect either of __Init_Default_Modules OR LOADEDMODULES and see if they are empty or not.

If not, LOADEDMODULES and MODULEPATH should be of sufficient information to rebuild the environment, as it was before. Would that work as a better workaround?!

I come to realize that there is no perfect solution here because there are assumptions to be made.

fgeorgatos commented 7 years ago

fixed via Lmod_test_suite and proven generally OK via report in #85

fgeorgatos commented 7 years ago

issue closed