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

Instructions on setting up environment-modules need update for macOS #2440

Closed
TomasPuverle opened this issue Nov 30, 2016 · 2 comments · Fixed by #6410
Closed

Instructions on setting up environment-modules need update for macOS #2440

TomasPuverle opened this issue Nov 30, 2016 · 2 comments · Fixed by #6410
Assignees
Labels
documentation Improvements or additions to documentation macOS modules

Comments

@TomasPuverle
Copy link
Contributor

TomasPuverle commented Nov 30, 2016

I noticed that the following example in "Getting started" no longer appears to work:

TMP=`tempfile`
echo >$TMP
MODULE_HOME=`spack location --install-dir environment-modules`
MODULE_VERSION=`ls -1 $MODULE_HOME/Modules | head -1`
${MODULE_HOME}/Modules/${MODULE_VERSION}/bin/add.modules <$TMP
cp .bashrc $TMP
echo "MODULE_VERSION=${MODULE_VERSION}" > .bashrc
cat $TMP >>.bashrc

I think the problem is (at least) two fold:

  1. I don't think tempfile is universaly supported
  2. I installed environment-modules using spack and the MODULE_VERSION variable just expands to 'bin', leading to a path of '..../Modules/bin/bin/add.modules', which doesn't exist.

Thank you,

Tom

@adamjstewart
Copy link
Member

I don't think tempfile is universaly supported

You're right. tempfile doesn't exist on my macOS or on CentOS 6. From the tempfile manpage: "tempfile is deprecated; you should use mktemp(1) instead."

@adamjstewart adamjstewart added documentation Improvements or additions to documentation modules labels Nov 30, 2016
@citibeth citibeth self-assigned this Dec 2, 2016
@citibeth citibeth changed the title Documentation issue Instructions on setting up environment-modules need update for MacOS Dec 2, 2016
@citibeth citibeth changed the title Instructions on setting up environment-modules need update for MacOS Instructions on setting up environment-modules need update for macOS Dec 2, 2016
@hartzell
Copy link
Contributor

hartzell commented Dec 3, 2016

At some point in my past I cargo-culted a bit of code to work around platform variations in how mktemp behaved. This is most likely where I cut-n-pasted it from (didn't write it down at the time but it's a perfect match...).

# platform agnostic mktemp call...
tools=$(mktemp -d 2>/dev/null || mktemp -d -t '/tmp/foo-bar.XXXXX')

@alalazo alalazo added the macOS label Nov 22, 2017
alalazo added a commit to epfl-scitas/spack that referenced this issue Nov 22, 2017
fixes spack#2440

The "Getting started" guide should be short and sweet. This commit
simplifies the "Environment-Modules" section pruning:

 - outdated / wrong suggestions as noted in spack#2440
 - uncommon setups that are better treated in a reference guide
scheibelp pushed a commit that referenced this issue Dec 11, 2017
…6410)

Fixes #2440

The "Getting started" guide should be short and sweet. This commit
simplifies the "Environment-Modules" section pruning:

 - outdated / wrong suggestions as noted in #2440
 - uncommon setups that are better treated in a reference guide
ch741 pushed a commit to ch741/spack that referenced this issue Apr 20, 2018
…pack#6410)

Fixes spack#2440

The "Getting started" guide should be short and sweet. This commit
simplifies the "Environment-Modules" section pruning:

 - outdated / wrong suggestions as noted in spack#2440
 - uncommon setups that are better treated in a reference guide
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation macOS modules
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants