Skip to content

update Clang easyblock to add support for new directory structure in Clang versions >= 14 + support Flang + fix --module-only + fix sanity check for Clang 11.x #2800

Merged
ocaisa merged 35 commits intoeasybuilders:developfrom
ComputeCanada:clang-15.x-cmake
Nov 22, 2022
Merged

update Clang easyblock to add support for new directory structure in Clang versions >= 14 + support Flang + fix --module-only + fix sanity check for Clang 11.x #2800
ocaisa merged 35 commits intoeasybuilders:developfrom
ComputeCanada:clang-15.x-cmake

Conversation

@mboisson
Copy link
Copy Markdown
Contributor

No description provided.

@mboisson

This comment was marked as resolved.

@mboisson mboisson changed the title Added support for cmake files in external dir for clang 15.x Added support clang 14+ new directory structure Oct 12, 2022
@mboisson mboisson closed this Oct 12, 2022
@mboisson mboisson reopened this Oct 12, 2022
@mboisson
Copy link
Copy Markdown
Contributor Author

mboisson commented Oct 12, 2022

:( apparently, this never got merged
#2264
and part of it is included in this PR.... can we go back and merge the above ?

@mboisson
Copy link
Copy Markdown
Contributor Author

mboisson commented Oct 12, 2022

In fact, I am not able to get clang to build without downloading the full package llvm-project-%(version)s.src.tar.xz. The sum of components does not equal the whole thing, there are parts missing, see llvm/llvm-project#58320 .

I would suggest to drop the per-component download, and to select which component to install based on LLVM_ENABLE_PROJECTS

@ocaisa
Copy link
Copy Markdown
Member

ocaisa commented Nov 15, 2022

@mboisson This looks good, but there seems to be a conflict right now, can you fix that?

Is there a PR that uses this? I can add one based on your repos.

I'd like to do one which includes flang from v15 up. Can we add that to the sanity check step?

        if 'flang' in self.cfg['llvm_projects'] and LooseVersion(self.version) >= LooseVersion('15'):
            custom_paths['files'].extend(["bin/flang"])

@mboisson
Copy link
Copy Markdown
Contributor Author

mboisson commented Nov 16, 2022

@mboisson This looks good, but there seems to be a conflict right now, can you fix that?

I have no clue how to merge that conflict... the code is completely different and is not in a single commit so I can't cherry-pick the change :( You will have to fix the conflict while merging

@mboisson
Copy link
Copy Markdown
Contributor Author

@ocaisa the other changes are incorporated

@mboisson mboisson closed this Nov 17, 2022
@mboisson mboisson reopened this Nov 17, 2022
@mboisson
Copy link
Copy Markdown
Contributor Author

I am not sure why the tests are not actually running... Any idea @ocaisa ?

@easybuilders easybuilders deleted a comment from boegelbot Nov 22, 2022
@ocaisa
Copy link
Copy Markdown
Member

ocaisa commented Nov 22, 2022

Test report by @ocaisa

Overview of tested easyconfigs (in order)

  • SUCCESS Clang-13.0.1-GCCcore-11.2.0.eb

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

mboisson and others added 4 commits November 22, 2022 08:56
Update list of available runtimes in Clang easyblock
Allow Clang easyblock to work with `--module-only`
@ocaisa
Copy link
Copy Markdown
Member

ocaisa commented Nov 22, 2022

Test report by @ocaisa

Overview of tested easyconfigs (in order)

  • SUCCESS Clang-13.0.1-GCCcore-11.2.0-CUDA-11.4.1.eb

Build succeeded for 1 out of 1 (1 easyconfigs in total)
cnx1 - Linux Rocky Linux 8.5, x86_64, Intel(R) Xeon(R) CPU E5-2690 v3 @ 2.60GHz, Python 3.6.8
See https://gist.github.com/30074b89aa9e6d4a981425783a822b46 for a full test report.

@ocaisa
Copy link
Copy Markdown
Member

ocaisa commented Nov 22, 2022

Test report by @ocaisa

Overview of tested easyconfigs (in order)

  • SUCCESS Clang-12.0.1-GCCcore-10.3.0.eb

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

@ocaisa
Copy link
Copy Markdown
Member

ocaisa commented Nov 22, 2022

Test report by @ocaisa

Overview of tested easyconfigs (in order)

  • SUCCESS Clang-11.0.1-GCCcore-10.2.0.eb

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

@ocaisa
Copy link
Copy Markdown
Member

ocaisa commented Nov 22, 2022

Test report by @ocaisa

Overview of tested easyconfigs (in order)

  • SUCCESS Clang-12.0.1-GCCcore-10.3.0.eb

Build succeeded for 1 out of 1 (1 easyconfigs in total)
cnx1 - Linux Rocky Linux 8.5, x86_64, Intel(R) Xeon(R) CPU E5-2690 v3 @ 2.60GHz, Python 3.6.8
See https://gist.github.com/f975e73b47250690c6927ef0fdd3fed6 for a full test report.

@ocaisa
Copy link
Copy Markdown
Member

ocaisa commented Nov 22, 2022

Test report by @ocaisa

Overview of tested easyconfigs (in order)

  • SUCCESS Clang-13.0.1-GCCcore-11.2.0-CUDA-11.4.1.eb

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

@ocaisa
Copy link
Copy Markdown
Member

ocaisa commented Nov 22, 2022

Test report by @ocaisa

Overview of tested easyconfigs (in order)

  • SUCCESS Clang-13.0.1-GCCcore-11.2.0-CUDA-11.4.1.eb
  • SUCCESS Clang-11.0.1-GCCcore-10.2.0.eb
  • SUCCESS Clang-12.0.1-GCCcore-10.3.0.eb

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

@ocaisa
Copy link
Copy Markdown
Member

ocaisa commented Nov 22, 2022

Last test was to ensure --module-only was also now working for Clang

Copy link
Copy Markdown
Member

@ocaisa ocaisa left a comment

Choose a reason for hiding this comment

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

Thanks for all the hard work @mboisson !

@ocaisa ocaisa merged commit 5353d95 into easybuilders:develop Nov 22, 2022
@mboisson
Copy link
Copy Markdown
Contributor Author

Thanks for all the hard work @mboisson !

🥳

@mboisson mboisson deleted the clang-15.x-cmake branch November 22, 2022 20:10
@boegel boegel changed the title Added support clang 14+ new directory structure update Clang easyblock to add support for new directory structure in Clang versions >= 14 Nov 23, 2022
@boegel boegel added the bug fix label Nov 23, 2022
@boegel boegel changed the title update Clang easyblock to add support for new directory structure in Clang versions >= 14 update Clang easyblock to add support for new directory structure in Clang versions >= 14 + support Flang + fix --module-only + fix sanity check for Clang 11.x Nov 23, 2022
@boegel boegel modified the milestones: 4.x, next release (4.7.0) Dec 21, 2022
@boegel boegel mentioned this pull request Jan 30, 2023
5 tasks
try:
default_targets = DEFAULT_TARGETS_MAP[arch][:]
# If CUDA is included as a dep, add NVPTX as a target
if get_software_root("CUDA"):
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.

Doing this in the constructor doesn't work, since the modules for the dependencies are only loading in prepare_step => #2871

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 guess the key is in the comment here, this should be like what is done in LAMMPS (https://github.com/easybuilders/easybuild-easyblocks/blob/develop/easybuild/easyblocks/l/lammps.py#L175-L177)

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.

@ocaisa please mention that in #2871

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants