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

update SuiteSparse easyblock to only install SuiteSparse libraries with make install #3004

Conversation

appolloford
Copy link
Contributor

(created using eb --new-pr)

@appolloford appolloford changed the title Install only suitespare c libraries with Install only suitespare c libraries with make install Sep 18, 2023
@appolloford appolloford changed the title Install only suitespare c libraries with make install Install only suitesparse c libraries with make install Sep 25, 2023
@boegel boegel changed the title Install only suitesparse c libraries with make install Install only SuiteSparse libraries with make install Sep 27, 2023
@boegel boegel added this to the 4.x milestone Sep 27, 2023
@boegel boegel added the change label Sep 27, 2023
@boegel
Copy link
Member

boegel commented Sep 27, 2023

It looks like these changes are not backwards-compatible at all...

@appolloford Can you provide some more info on why these changes are required?

@appolloford
Copy link
Contributor Author

This PR is trying to make the installation of SuiteSparse as close to normal ConfigureMake as possible and keep backwards-compatibility as much as possible. I have tested 3.6.0, 4.0.0, 4.5.0, 5.1.2, 5.7.1, 5.8.1, 5.13.0, and 7.1.0. Although the older versions (< v5.1.2) are not supported anymore (which needs metis-4.x), I still keep the related codes there for reference.

The current behaviour of this easyblock is (1) revise the UConfig or SuiteSparse_Config for the older versions (< 4.5.0) which does not support setting options from environment (this is almost the same as the original configuration step) (2) Set proper environment variables for newer versions (< 6.0.0) (3) Left easyconfig to handle the CMAKE_OPTIONS for the recent versions

A few major changes:

  1. If METIS is not provided in the dependencies, it will compile its own metis lib. After v6.0.0, users are not allowed to use preinstalled METIS either. My understanding is that it does not install metis lib either but only use its object file when compiling some libs.
  2. By using make; make install, only c libraries will be installed (ideally static libs for versions < 4.5.0 and shared libs for else). No object files or subfolders are copied to the installdir (e.g. KLU/Lib).
  3. Since its matlab tools need be compiled with mex and need all dependencies in relative path (e.g. KLU/Lib). The related files are not copied to the installdir anymore.
  4. I think suitesparse does not need mpi and remove the code looking for MPICC in the original code. Suitesparse easyconfigs could move to gfbf instead of foss in the future.

Some concerns:

  1. I tested SuiteSparse-5.10.1-foss-2021a-METIS-5.1.0-CUDA-11.3.1.eb and it passed, but there is no other versions I can test.
  2. Suitesparse starts to use CMake from v5 in GraphBLAS, but lacks of proper options to set BLAS/LAPACK/INSTALL_PREFIX. Since there is no such easyconfig file and they are old, I did not do more work to support them.

Details:

  1. Before v4.5.0, suitesparse uses INSTALL_LIB and INSTALL_INCLUDE to control installdir and use METIS_PATH and METIS to know the path of metis lib
  2. From v4.5.0 to v6.0.0, suitesparse use INSTALL to control installdir and GraphBLAS need its own CMAKE_INSTALL_PREFIX
  3. From v4.5.0 to v6.0.0, metis path is set by MY_METIS_LIB and MY_METIS_INC

Please let me know if you find any mistakes. I may forget some details and write something wrong here.

@boegel
Copy link
Member

boegel commented Oct 10, 2023

@boegelbot please test @ generoso
EB_ARGS="SuiteSparse-5.7.1-foss-2020a-METIS-5.1.0.eb SuiteSparse-5.7.1-intel-2020a-METIS-5.1.0.eb SuiteSparse-5.8.1-foss-2020b-METIS-5.1.0.eb SuiteSparse-5.8.1-intel-2020b-METIS-5.1.0.eb SuiteSparse-5.10.1-foss-2021a-METIS-5.1.0.eb SuiteSparse-5.10.1-foss-2021b-METIS-5.1.0.eb SuiteSparse-5.10.1-intel-2021a-METIS-5.1.0.eb SuiteSparse-5.10.1-intel-2021b-METIS-5.1.0.eb SuiteSparse-5.13.0-foss-2022a-METIS-5.1.0.eb SuiteSparse-5.13.0-foss-2022b-METIS-5.1.0.eb --installpath /tmp/$USER/pr3004"

@boegelbot
Copy link

@boegel: Request for testing this PR well received on login1

PR test command 'EB_PR=3004 EB_ARGS="SuiteSparse-5.7.1-foss-2020a-METIS-5.1.0.eb SuiteSparse-5.7.1-intel-2020a-METIS-5.1.0.eb SuiteSparse-5.8.1-foss-2020b-METIS-5.1.0.eb SuiteSparse-5.8.1-intel-2020b-METIS-5.1.0.eb SuiteSparse-5.10.1-foss-2021a-METIS-5.1.0.eb SuiteSparse-5.10.1-foss-2021b-METIS-5.1.0.eb SuiteSparse-5.10.1-intel-2021a-METIS-5.1.0.eb SuiteSparse-5.10.1-intel-2021b-METIS-5.1.0.eb SuiteSparse-5.13.0-foss-2022a-METIS-5.1.0.eb SuiteSparse-5.13.0-foss-2022b-METIS-5.1.0.eb --installpath /tmp/$USER/pr3004" EB_CONTAINER= EB_REPO=easybuild-easyblocks /opt/software/slurm/bin/sbatch --job-name test_PR_3004 --ntasks=4 ~/boegelbot/eb_from_pr_upload_generoso.sh' executed!

  • exit code: 0
  • output:
Submitted batch job 11915

Test results coming soon (I hope)...

- notification for comment with ID 1756123421 processed

Message to humans: this is just bookkeeping information for me,
it is of no use to you (unless you think I have a bug, which I don't).

@boegelbot
Copy link

Test report by @boegelbot

Overview of tested easyconfigs (in order)

  • SUCCESS SuiteSparse-5.7.1-foss-2020a-METIS-5.1.0.eb
  • FAIL (build issue) SuiteSparse-5.7.1-intel-2020a-METIS-5.1.0.eb (partial log available at https://gist.github.com/boegelbot/6c49ebf1ee66b55f650f73f5d6a76f0d)
  • SUCCESS SuiteSparse-5.8.1-foss-2020b-METIS-5.1.0.eb
  • FAIL (build issue) SuiteSparse-5.8.1-intel-2020b-METIS-5.1.0.eb (partial log available at https://gist.github.com/boegelbot/345768cdb9777e0362882613b72b558a)
  • SUCCESS SuiteSparse-5.10.1-foss-2021a-METIS-5.1.0.eb
  • SUCCESS SuiteSparse-5.10.1-foss-2021b-METIS-5.1.0.eb
  • SUCCESS SuiteSparse-5.10.1-intel-2021a-METIS-5.1.0.eb
  • SUCCESS SuiteSparse-5.10.1-intel-2021b-METIS-5.1.0.eb
  • SUCCESS SuiteSparse-5.13.0-foss-2022a-METIS-5.1.0.eb
  • SUCCESS SuiteSparse-5.13.0-foss-2022b-METIS-5.1.0.eb

Build succeeded for 8 out of 10 (10 easyconfigs in total)
cns3 - Linux Rocky Linux 8.5, x86_64, Intel(R) Xeon(R) CPU E5-2667 v3 @ 3.20GHz (haswell), Python 3.6.8
See https://gist.github.com/boegelbot/a5c137fe87b240a59528842550b5aa1e for a full test report.

@appolloford
Copy link
Contributor Author

These two tests failed for intel license.

Error: A license for Comp-CL is not available now (-15,570,115).

@akesandgren
Copy link
Contributor

Test report by @akesandgren

Overview of tested easyconfigs (in order)

  • SUCCESS SuiteSparse-5.7.1-intel-2020a-METIS-5.1.0.eb
  • SUCCESS SuiteSparse-5.8.1-intel-2020b-METIS-5.1.0.eb

Build succeeded for 2 out of 2 (2 easyconfigs in total)
b-an02.hpc2n.umu.se - Linux Ubuntu 20.04, x86_64, Intel(R) Xeon(R) CPU E5-2690 v4 @ 2.60GHz, Python 3.8.10
See https://gist.github.com/akesandgren/23e356e8f9553d3735859db5bb4e0321 for a full test report.

@akesandgren
Copy link
Contributor

akesandgren commented Oct 31, 2023

Also since SuiteSparse uses CMake from v6 we should take care of that in the easyblock.
It won't be the first time we do CMakeMake/ConfigureMake compatible easyblocks.

This can however be done in a separate PR

@appolloford
Copy link
Contributor Author

appolloford commented Oct 31, 2023

Actually SuiteSparse does not follow the normal cmake; make; make install steps. It uses CMake in several subfolders (I am not sure whether all subfolders have been moved to cmake projects) but the top level is still managed by a makefile. The official guide says the whole suite should be built in this command:

CMAKE_OPTIONS="-DNPARTITION=1 -DNSTATIC=1 -DCMAKE_BUILD_TYPE=Debug" make

I think this does not match with the CMakeMake easyblock and I leave the CMAKE_OPTIONS to be controlled by each easyconfig file, like

easybuilders/easybuild-easyconfigs#18857

@akesandgren
Copy link
Contributor

akesandgren commented Oct 31, 2023

According to the python-linting test you should also remove these imports
shutil, stat, easybuild.tools.filetools.adjust_permissions, easybuild.tools.filetools.copy_dir
since they aren't used

Copy link
Contributor

@akesandgren akesandgren left a comment

Choose a reason for hiding this comment

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

LGTM

@akesandgren
Copy link
Contributor

Going in, thanks @appolloford!

@akesandgren akesandgren merged commit c4c52af into easybuilders:develop Nov 6, 2023
46 checks passed
@akesandgren akesandgren modified the milestones: 4.x, next release (4.9.0?) Nov 6, 2023
@boegel boegel changed the title Install only SuiteSparse libraries with make install update SuiteSparse easyblok to only install SuiteSparse libraries with make install Nov 8, 2023
@boegel boegel changed the title update SuiteSparse easyblok to only install SuiteSparse libraries with make install update SuiteSparse easyblock to only install SuiteSparse libraries with make install Dec 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants