superlu_dist icon indicating copy to clipboard operation
superlu_dist copied to clipboard

Installs examples into lib/EXAMPLE

Open yurivict opened this issue 2 years ago • 5 comments

Usually examples are installed into share/examples/{project-name}.

yurivict avatar Aug 27 '22 06:08 yurivict

@liuyangzhuan I forgot why we decided to install EXAMPLE/ in lib/ ? Shall we create another dir for examples ?

xiaoyeli avatar Aug 27 '22 18:08 xiaoyeli

They are installed in lib because spack can easily find them when doing the tests. I suggest we leave them there.

On Aug 27, 2022, at 11:25 AM, X. Sherry Li @.***> wrote:

 @liuyangzhuan I forgot why we decided to install EXAMPLE/ in lib/ ? Shall we create another dir for examples ?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.

liuyangzhuan avatar Aug 28 '22 15:08 liuyangzhuan

lib/EXAMPLES is a very non-standard location for examples that would conflict with all linux packaging systems. Spack should be notified that they should look in share/examples/{project-name}.

yurivict avatar Aug 28 '22 16:08 yurivict

Spack responded that they don't assume this examples directory:

Spack does not care where example code is installed to, there are no customs in Spack of using that particular directory. Spack simply executes the build system of a package and lets the package decide where it should be installed. The superlu-dist package is currently hard-coded to run tests in that directory, but that can easily be changed, and even changed depending on the version of superlu-dist. So I don't think there's anything on Spack's side that is forcing superlu-dist to behave this way.

yurivict avatar Aug 28 '22 21:08 yurivict

No. The fact that spack doesn't care about the example code is exactly why we did this. We don't want to add a separate CMakeList.txt or makefile to build examples at the "spack test" stage. In the past, it caused many troubles for us... Instead, we want to generate an example executable during "spack install". From my understanding, the only place we can fetch things built from spack install is "self.prefix.lib", that's why we prefer to install examples to self.prefix.lib/EXAMPLE.

liuyangzhuan avatar Aug 29 '22 05:08 liuyangzhuan