Skip to content

Updated prefix in cmake_args for Plasma#12103

Closed
paulbry wants to merge 1 commit intospack:developfrom
paulbry:plasma-cmake-prefix
Closed

Updated prefix in cmake_args for Plasma#12103
paulbry wants to merge 1 commit intospack:developfrom
paulbry:plasma-cmake-prefix

Conversation

@paulbry
Copy link
Copy Markdown
Contributor

@paulbry paulbry commented Jul 23, 2019

Plasma installs correctly (in this instance as part of the xSDK but I've also installed individually) but I'm experiencing the following error when attempting to generate module files.

$ spack module lmod refresh
...
==> Regenerating lmod module files
==> Warning: Could not write module file [/ecp/sw/dev/ecp-p9-4v100/modulefiles/xsdk/lmod/linux-centos7-ppc64le/netlib-lapack/3.8.0-er4hgnv/gcc/8.3.0/plasma/18.11.1.lua]
==> Warning:    --> global name 'prefix' is not defined <--

The fix appears to be using self.prefix instead of just prefix in the cmake_args(self) method. But if this is the wrong approach please let me know. Other posts relating to the "is not defined" error message did not help correct it.

@luszczek hope you don't mind I tag you on this PR since your marked as the maintainer.

options.extend([
"-DCMAKE_INSTALL_PREFIX=%s" % prefix,
"-DCMAKE_INSTALL_NAME_DIR:PATH=%s/lib" % prefix,
"-DCMAKE_INSTALL_PREFIX=%s" % self.prefix,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is already set in the _std_args of CMakePackage so you don't actually need it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even during the module creation? If that's the case I'm honestly not sure what I changed to get it to work then.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure why either of these lines are present in the file, but you're correct that just using prefix without the self. is a bug.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In that case should I close this and open up an issue? I'm not sure I have any other examples where I've experienced this.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like these lines were added back in #9489. @luszczek do you recall why these lines were necessary?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I copied it from version 17 when PLASMA was installed with Makefile. I removed it and tested on x86 and POWER with OpenBLAS and Netlib-LAPACK. It is not necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants