Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR: domain error: argument not in valid range #296

Closed
zzxtty opened this issue Sep 20, 2019 · 1 comment
Closed

ERROR: domain error: argument not in valid range #296

zzxtty opened this issue Sep 20, 2019 · 1 comment
Labels
Milestone

Comments

@zzxtty
Copy link

zzxtty commented Sep 20, 2019

Here is an interesting bug, it took me a while to workout. Apparently modules 4.3.0 does not like "nan" as a directory name. The previous version I was using ( 4.1.3 ) did not suffer from this problem:

[spimcmw@login2 generic]0% module av
ERROR: domain error: argument not in valid range
[spimcmw@login2 generic]1%

[spimcmw@login2 generic]0% mv nan nax

[spimcmw@login2 generic]0% module av
---------------------------- /home/spimcmw/module/generic ----------------------------
admin/d1  nax/d1  sge/8.1.7
[spimcmw@login2 generic]0%

As "nan" is often used for Not a Number, I'd guess this is the root of the problem. I've tracked the issue to an elseif statement, placing $elt in single quotes appears to resolve the problem:

[nanbuild@grid03 modules-4.3.0]0% diff modulecmd.tcl.in modulecmd.tcl.in.orig
6648c6648
<          $modmatch [list '$elt']]]) || (!$wild && ([string match $mod/* $elt]\
---
>          $modmatch [list $elt]]]) || (!$wild && ([string match $mod/* $elt]\
[nanbuild@grid03 modules-4.3.0]1%

I cannot say I've done extensive testing yet, I know that list, load, unload, and switch now work.

Chris

@xdelaruelle xdelaruelle added this to the 4.3.1 milestone Sep 20, 2019
@xdelaruelle
Copy link
Member

nan seems to be a special value that raise an error when returned by expr. Should rework all the expr tests that may return such value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants