-
Notifications
You must be signed in to change notification settings - Fork 119
Closed
Description
Describe the bug
With a terminal of one to three columns, the output of "module list" return an error.
To Reproduce
Steps to reproduce the behavior:
$ stty cols 1
$ module listThe same error is encountered with "stty cols 2" or "stty cols 3".
Expected behavior
The output should be on one column (or return a warning message for the user).
Error and debugging information
$ module --debug list
DEBUG setConf: tcl_ext_lib set to '/usr/local/Modules/lib/libtclenvmodules.so'
DEBUG setConf: siteconfig set to '/usr/local/Modules/etc/siteconfig.tcl'
DEBUG setConf: locked_configs set to ''
DEBUG setState: shell set to 'bash'
DEBUG setState: shelltype set to 'sh'
DEBUG setState: subcmd set to 'list'
DEBUG setState: subcmd_args set to ''
DEBUG setState: init_error_report set to '1'
DEBUG setConf: verbosity set to 'debug'
DEBUG setConf: term_background set to 'dark'
DEBUG setConf: colors set to 'hi=1:db=2:tr=2:se=2:er=91:wa=93:me=95:in=94:mp=1;94:di=94:al=96:sy=95:de=4:cm=92:aL=100:L=90;47:H=2:F=41:nF=43:S=46:sS=44'
DEBUG setConf: color set to '0'
DEBUG setConf: pager set to '/usr/bin/less -eFKRX'
DEBUG setState: is_stderr_tty set to '1'
DEBUG setState: paginate set to '1'
DEBUG setState: report_format set to 'plain'
DEBUG setState: reportfd set to 'file6'
DEBUG lappendState: modulefile appended with '{}'
DEBUG module: cmd='list', args=''
DEBUG setConf: avail_indepth set to '1'
DEBUG setConf: search_match set to 'starts_with'
DEBUG parseModuleCommandArgs: (show_oneperline=0, show_mtime=0, show_filter=, search_filter=, search_match=starts_with, dump_state=0, addpath_pos=prepend, not_req=0, otherargs=)
DEBUG lappendState: always_read_full_file appended with '0'
DEBUG lappendState: commandname appended with 'list'
DEBUG runModulerc: running...
DEBUG setState: lm_info_cached set to '1'
DEBUG setState: is_win set to '0'
DEBUG setState: path_separator set to ':'
DEBUG setState: sub1_separator set to '&'
DEBUG setState: sub2_separator set to '|'
DEBUG setConf: advanced_version_spec set to '0'
DEBUG setModuleVersSpec: Set module 'setenv/1.0' (escglob 'setenv/1.0'), module name 'setenv' (re ''), module root 'setenv', version cmp 'eq' and version(s) '' for argument 'setenv/1.0'
DEBUG setConf: icase set to 'never'
DEBUG setConf: extended_default set to '0'
DEBUG setConf: unload_match_order set to 'returnlast'
DEBUG doesModuleConflict: 'loc_def/default' conflicts with '' (declared as '')
DEBUG setModuleDependency: set requirements of 'loc_def/default' to ''
DEBUG setModuleDependency: set NPO requirements of 'loc_def/default' to ''
DEBUG doesModuleConflict: 'loc_def/truedef' conflicts with '' (declared as '')
DEBUG setModuleDependency: set requirements of 'loc_def/truedef' to ''
DEBUG setModuleDependency: set NPO requirements of 'loc_def/truedef' to ''
DEBUG doesModuleConflict: 'loc_dv1/2.0' conflicts with '' (declared as '')
DEBUG setModuleDependency: set requirements of 'loc_dv1/2.0' to ''
DEBUG setModuleDependency: set NPO requirements of 'loc_dv1/2.0' to ''
DEBUG doesModuleConflict: 'loc_dv3/1.0' conflicts with '' (declared as '')
DEBUG setModuleDependency: set requirements of 'loc_dv3/1.0' to ''
DEBUG setModuleDependency: set NPO requirements of 'loc_dv3/1.0' to ''
DEBUG doesModuleConflict: 'loc_dv6/1.0' conflicts with '' (declared as '')
DEBUG setModuleDependency: set requirements of 'loc_dv6/1.0' to ''
DEBUG setModuleDependency: set NPO requirements of 'loc_dv6/1.0' to ''
DEBUG doesModuleConflict: 'loc_rc2/2.0' conflicts with '' (declared as '')
DEBUG setModuleDependency: set requirements of 'loc_rc2/2.0' to ''
DEBUG setModuleDependency: set NPO requirements of 'loc_rc2/2.0' to ''
DEBUG doesModuleConflict: 'loc_rc1/2.0' conflicts with '' (declared as '')
DEBUG setModuleDependency: set requirements of 'loc_rc1/2.0' to ''
DEBUG setModuleDependency: set NPO requirements of 'loc_rc1/2.0' to ''
DEBUG doesModuleConflict: 'loc_rc7/0.9' conflicts with '' (declared as '')
DEBUG setModuleDependency: set requirements of 'loc_rc7/0.9' to ''
DEBUG setModuleDependency: set NPO requirements of 'loc_rc7/0.9' to ''
DEBUG doesModuleConflict: 'setenv/1.0' conflicts with '' (declared as '')
DEBUG setModuleDependency: set requirements of 'setenv/1.0' to ''
DEBUG setModuleDependency: set NPO requirements of 'setenv/1.0' to ''
DEBUG doesModuleConflict: 'module/2.0' conflicts with '' (declared as '')
DEBUG setModuleDependency: set requirements of 'module/2.0' to 'setenv/1.0'
DEBUG setModuleDependency: set NPO requirements of 'module/2.0' to 'setenv/1.0'
DEBUG doesModuleConflict: 'bad2/proc' conflicts with '' (declared as '')
DEBUG setModuleDependency: set requirements of 'bad2/proc' to ''
DEBUG setModuleDependency: set NPO requirements of 'bad2/proc' to ''
DEBUG cacheCurrentModules: 11 loaded
DEBUG setState: hiding_threshold set to '0'
DEBUG getTagList: 'loc_def/default' has tag list 'loaded'
DEBUG getTagList: 'loc_def/truedef' has tag list 'loaded'
DEBUG getTagList: 'loc_dv1/2.0' has tag list 'loaded'
DEBUG getTagList: 'loc_dv3/1.0' has tag list 'loaded'
DEBUG getTagList: 'loc_dv6/1.0' has tag list 'loaded'
DEBUG getTagList: 'loc_rc2/2.0' has tag list 'loaded'
DEBUG getTagList: 'loc_rc1/2.0' has tag list 'loaded'
DEBUG getTagList: 'loc_rc7/0.9' has tag list 'loaded'
DEBUG getTagList: 'setenv/1.0' has tag list 'auto-loaded'
DEBUG getTagList: 'module/2.0' has tag list 'loaded'
DEBUG getTagList: 'bad2/proc' has tag list 'loaded'
DEBUG setConf: tag_abbrev set to 'auto-loaded=aL:loaded=L:hidden=H:hidden-loaded=H:forbidden=F:nearly-forbidden=nF:sticky=S:super-sticky=sS'
DEBUG setConf: tag_color_name set to ''
DEBUG getTagList: 'loc_def/default' has tag list 'loaded'
DEBUG getTagList: 'loc_def/truedef' has tag list 'loaded'
DEBUG getTagList: 'loc_dv1/2.0' has tag list 'loaded'
DEBUG getTagList: 'loc_dv3/1.0' has tag list 'loaded'
DEBUG getTagList: 'loc_dv6/1.0' has tag list 'loaded'
DEBUG getTagList: 'loc_rc2/2.0' has tag list 'loaded'
DEBUG getTagList: 'loc_rc1/2.0' has tag list 'loaded'
DEBUG getTagList: 'loc_rc7/0.9' has tag list 'loaded'
DEBUG getTagList: 'setenv/1.0' has tag list 'auto-loaded'
DEBUG getTagList: 'module/2.0' has tag list 'loaded'
DEBUG getTagList: 'bad2/proc' has tag list 'loaded'
Currently Loaded Modulefiles:
DEBUG displayElementList: header=noheader, sgrkey=, hstyle=, elt_cnt=11, max_len=15, one_per_line=0, display_idx=1
DEBUG setConf: term_width set to '1'
DEBUG setState: term_columns set to '1'
DEBUG displayElementList: list=loc_def/default loc_def/truedef loc_dv1/2.0 loc_dv3/1.0 loc_dv6/1.0 loc_rc2/2.0 loc_rc1/2.0 loc_rc7/0.9 {setenv/1.0 <aL>} module/2.0 bad2/proc
DEBUG setState: inhibit_errreport set to '0'
DEBUG setState: error_count set to '0'
DEBUG setState: error_count set to '1'
DEBUG setState: false_rendered set to '1'
DEBUG setState: error_count set to '2'
ERROR: divide by zero
while executing
"expr {int($elt_cnt % $rows)}"
(procedure "displayElementList" line 133)
invoked from within
"displayElementList noheader {} {} $one_per_line $display_idx $display_list $len_list $max_len"
(procedure "cmdModuleList" line 88)
invoked from within
"cmdModuleList $show_oneperline $show_mtime"
(procedure "module" line 279)
invoked from within
"module list"
("eval" body line 1)
invoked from within
"eval $execcmdlist"
Please report this issue at https://github.com/cea-hpc/modules/issuesModules version and configuration
$ module config
Modules Release 4.6.1+termwidth-292-g9790b06c (2021-01-19)
- Config. name ---------.- Value (set by if default overridden) ---------------
advanced_version_spec 0
auto_handling 0
avail_indepth 1
avail_report_dir_sym 1
avail_report_mfile_sym 1
collection_pin_version 0
collection_target <undef>
color never
colors hi=1:db=2:tr=2:se=2:er=91:wa=93:me=95:in=94:mp=1;94:di=94:al=96:sy=95:de=4:cm=92:aL=100:L=90;47:H=2:F=41:nF=43:S=46:sS=44
contact root@localhost
csh_limit 4000
extended_default 0
extra_siteconfig <undef>
home /usr/local/Modules (env-var)
icase never
ignored_dirs CVS RCS SCCS .svn .git .SYNC .sos
implicit_default 1
implicit_requirement 1
locked_configs
ml 1
nearly_forbidden_days 14
pager /usr/bin/less -eFKRX
rcfile <undef>
run_quarantine <undef>
search_match starts_with
set_shell_startup 1
shells_with_ksh_fpath
silent_shell_debug <undef>
siteconfig /usr/local/Modules/etc/siteconfig.tcl
tag_abbrev auto-loaded=aL:loaded=L:hidden=H:hidden-loaded=H:forbidden=F:nearly-forbidden=nF:sticky=S:super-sticky=sS
tag_color_name
tcl_ext_lib /usr/local/Modules/lib/libtclenvmodules.so
term_background dark
term_width 1 (cmd-line)
unload_match_order returnlast
verbosity normal
wa_277 0
xdelaruelle