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

Simplify -l cflags #175

Merged
merged 3 commits into from
Oct 21, 2023
Merged

Conversation

ttytm
Copy link
Member

@ttytm ttytm commented Oct 20, 2023

Summary by CodeRabbit

  • Refactor: Updated build configurations across multiple platforms for improved compatibility and efficiency. This includes changes to the way we link with HDF5, MPI, OpenBLAS, and LAPACKE libraries.
  • New Feature: Added VMODROOT directory inclusion in the build process, enhancing the software's ability to locate necessary modules and libraries.
  • Refactor: Adjusted library linking flags for Linux, Windows, and macOS, optimizing the build process and potentially improving application performance.

These changes aim to streamline the build process and enhance the software's performance across various platforms. Users may experience improved reliability and efficiency as a result.

@coderabbitai
Copy link

coderabbitai bot commented Oct 20, 2023

Walkthrough

The changes primarily revolve around the modification of build flags for different platforms across several files. The alterations include the addition and removal of certain flags, updating library paths, and specifying new directories. No changes to function signatures, global data structures, or interfaces have been made.

Changes

File Summary
inout/h5/_cflags.c.v Removed -lhdf5 and -lhdf5_hl flags, added necessary HDF5 headers.
mpi/_cflags.c.v Removed and re-added -lmpi flag, no functional changes.
vlas/cflags_d_cblas.v Removed OpenBLAS and LAPACKE linking flags, added library paths and VMODROOT directory.
vlas/cflags_notd_cblas.v Modified library linking flags for Linux, Windows, macOS, added VMODROOT directory, updated LAPACKE library for macOS.
vlas/cflags_notd_cblas.v (2nd) Removed -llapacke for Linux and Darwin, added -lgfortran for Windows, updated include and library paths.
vlas/cflags_d_cblas.v (2nd) Removed OpenBLAS and LAPACKE linking flags, replaced with library path flags, added VMODROOT directory and OpenBLAS linking flag.

🐇

"In the land of code, where the shadows lie,

Flags were changed, under the digital sky.

Paths were updated, libraries set free,

Celebrate the changes, as simple as can be! 🎉"

## Walkthrough

This pull request primarily focuses on modifying build flags across different platforms for various libraries such as HDF5, MPI, OpenBLAS, LAPACKE, and VMODROOT. The changes include removal, addition, and modification of flags, as well as updates to include and library paths.

Changes

File Path Summary
inout/h5/_cflags.c.v Removed -lhdf5 and -lhdf5_hl flags, added necessary HDF5 headers.
mpi/_cflags.c.v Removed and re-added -lmpi flag, no functional changes.
vlas/cflags_d_cblas.v Removed OpenBLAS and LAPACKE linking flags, added library paths and VMODROOT directory.
vlas/cflags_notd_cblas.v (multiple entries) Various changes to library linking flags and paths across Linux, Windows, and macOS platforms.

🐇💻

In the land of code, where the semicolons lie,

Changes are made, under the GitHub sky.

Flags are shifted, paths are set,

In the world of code, no sun ever set.

Libraries linked, headers aligned,

In the pull request, improvements we find.

So here's to the coder, with their diligent gaze,

Making the software, a better maze. 🎉🥕


Tips

Chat with CodeRabbit Bot (@coderabbitai)

  • If you reply to a review comment from CodeRabbit, the bot will automatically respond.
  • To engage with CodeRabbit bot directly around the specific lines of code in the PR, mention @coderabbitai in your review comment
  • Note: Review comments are made on code diffs or files, not on the PR overview.

CodeRabbit Commands

  • Enter @coderabbitai pause as a PR comment to pause the reviews on a PR.
  • Enter @coderabbitai resume as a PR comment to resume the paused reviews.
  • For on-demand reviews, enter @coderabbitai review as a PR comment to trigger a review. This is useful when reviews are automatic disabled at the repository level.
  • Enter @coderabbitai: ignore in the PR description to stop a specific PR from being reviewed.

Note these commands work only in the PR comment. For conversations with the bot, please use the review comments on code diffs or files.


Tips

Chat with CodeRabbit Bot (@coderabbitai)

  • If you reply to a review comment from CodeRabbit, the bot will automatically respond.
  • To engage with CodeRabbit bot directly around the specific lines of code in the PR, mention @coderabbitai in your review comment
  • Note: Review comments are made on code diffs or files, not on the PR overview.
  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.

Note: For conversation with the bot, please use the review comments on code diffs or files.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 0

Commits Files that changed from the base of the PR and between 6904d72 and 7ae4176.
Files selected for processing (4)
  • inout/h5/_cflags.c.v (1 hunks)
  • mpi/_cflags.c.v (1 hunks)
  • vlas/cflags_d_cblas.v (1 hunks)
  • vlas/cflags_notd_cblas.v (1 hunks)
Files skipped from review due to trivial changes (4)
  • inout/h5/_cflags.c.v
  • mpi/_cflags.c.v
  • vlas/cflags_d_cblas.v
  • vlas/cflags_notd_cblas.v

@ttytm
Copy link
Member Author

ttytm commented Oct 20, 2023

Marking as draft as I'd like to re-check the changes for the blas related files. Feedback is already welcome.

@ttytm ttytm marked this pull request as draft October 20, 2023 22:37
#flag -I@VMODROOT
#flag -lopenblas -llapacke
Copy link
Member

Choose a reason for hiding this comment

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

we can remove -lopenblas from here 👌🏻

vlas/cflags_notd_cblas.v Outdated Show resolved Hide resolved
@ttytm ttytm marked this pull request as ready for review October 21, 2023 00:10
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 0

Commits Files that changed from the base of the PR and between 7ae4176 and da7361f.
Files selected for processing (1)
  • vlas/cflags_notd_cblas.v (1 hunks)
Files skipped from review due to trivial changes (1)
  • vlas/cflags_notd_cblas.v

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 0

Commits Files that changed from the base of the PR and between da7361f and 55f8603.
Files selected for processing (1)
  • vlas/cflags_notd_cblas.v (1 hunks)
Additional comments (Suppressed): 4
vlas/cflags_notd_cblas.v (4)
  • 3-4: The -llapacke flag has been removed from the Linux build flags. Ensure that this does not cause any linking issues with the LAPACKE library. If the library is still required, consider adding it back.

  • 6-6: The -lopenblas flag has been removed from the Windows build flags. If OpenBLAS is still required, this could cause issues. Please verify.

  • 7-8: The include and library paths for the Darwin platform have been changed from openblas to lapack. If the OpenBLAS library is still required, this could cause issues. Please verify.

  • 10-10: The -llapacke flag has been added for all platforms. Ensure that the LAPACKE library is available on all platforms and that this change does not cause any issues.

@ttytm ttytm marked this pull request as draft October 21, 2023 01:06
@ttytm
Copy link
Member Author

ttytm commented Oct 21, 2023

Marking as draft again to put some more time into it tomorrow or over the weeken. I think with further investigation I can start from here to make it a base to fix tests on mac.

@ulises-jeremias
Copy link
Member

Just to add some context, the problem with vsl.vlas on MAC is that I was not able to use lapackE in Mac 🥲

@ttytm
Copy link
Member Author

ttytm commented Oct 21, 2023

Could do some more checks, the flags should be used correctly as they are now.

Fixing the tests has it's own scope. I would fix LAPACKe usage and and tests on macOS in a followup PR and we could review and discuss there if that's okay.

@ttytm ttytm marked this pull request as ready for review October 21, 2023 19:20
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 0

Commits Files that changed from the base of the PR and between 55f8603 and 564649d.
Files selected for processing (1)
  • vlas/cflags_d_cblas.v (1 hunks)
Files skipped from review due to trivial changes (1)
  • vlas/cflags_d_cblas.v

@coderabbitai
Copy link

coderabbitai bot commented Oct 21, 2023

Walkthrough

The changes primarily revolve around the modification of build flags for different platforms across several files. The alterations include the addition and removal of certain flags, updating library paths, and specifying new directories. No changes to function signatures, global data structures, or interfaces have been made.

Changes

File Summary
inout/h5/_cflags.c.v Removed -lhdf5 and -lhdf5_hl flags, added necessary HDF5 headers.
mpi/_cflags.c.v Removed and re-added -lmpi flag, no functional changes.
vlas/cflags_d_cblas.v Removed OpenBLAS and LAPACKE linking flags, added library paths and VMODROOT directory.
vlas/cflags_notd_cblas.v Modified library linking flags for Linux, Windows, macOS, added VMODROOT directory, updated LAPACKE library for macOS.
vlas/cflags_notd_cblas.v (2nd) Removed -llapacke for Linux and Darwin, added -lgfortran for Windows, updated include and library paths.
vlas/cflags_d_cblas.v (2nd) Removed OpenBLAS and LAPACKE linking flags, replaced with library path flags, added VMODROOT directory and OpenBLAS linking flag.

🐇

"In the land of code, where the shadows lie,

Flags were changed, under the digital sky.

Paths were updated, libraries set free,

Celebrate the changes, as simple as can be! 🎉"

## Walkthrough

This pull request primarily focuses on modifying build flags across different platforms for various libraries such as HDF5, MPI, OpenBLAS, LAPACKE, and VMODROOT. The changes include removal, addition, and modification of flags, as well as updates to include and library paths.

Changes

File Path Summary
inout/h5/_cflags.c.v Removed -lhdf5 and -lhdf5_hl flags, added necessary HDF5 headers.
mpi/_cflags.c.v Removed and re-added -lmpi flag, no functional changes.
vlas/cflags_d_cblas.v Removed OpenBLAS and LAPACKE linking flags, added library paths and VMODROOT directory.
vlas/cflags_notd_cblas.v (multiple entries) Various changes to library linking flags and paths across Linux, Windows, and macOS platforms.

🐇💻

In the land of code, where the semicolons lie,

Changes are made, under the GitHub sky.

Flags are shifted, paths are set,

In the world of code, no sun ever set.

Libraries linked, headers aligned,

In the pull request, improvements we find.

So here's to the coder, with their diligent gaze,

Making the software, a better maze. 🎉🥕


Tips

Chat with CodeRabbit Bot (@coderabbitai)

  • If you reply to a review comment from CodeRabbit, the bot will automatically respond.
  • To engage with CodeRabbit bot directly around the specific lines of code in the PR, mention @coderabbitai in your review comment
  • Note: Review comments are made on code diffs or files, not on the PR overview.

CodeRabbit Commands

  • Enter @coderabbitai pause as a PR comment to pause the reviews on a PR.
  • Enter @coderabbitai resume as a PR comment to resume the paused reviews.
  • For on-demand reviews, enter @coderabbitai review as a PR comment to trigger a review. This is useful when reviews are automatic disabled at the repository level.
  • Enter @coderabbitai: ignore in the PR description to stop a specific PR from being reviewed.

Note these commands work only in the PR comment. For conversations with the bot, please use the review comments on code diffs or files.


Tips

Chat with CodeRabbit Bot (@coderabbitai)

  • If you reply to a review comment from CodeRabbit, the bot will automatically respond.
  • To engage with CodeRabbit bot directly around the specific lines of code in the PR, mention @coderabbitai in your review comment
  • Note: Review comments are made on code diffs or files, not on the PR overview.
  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.

Note: For conversation with the bot, please use the review comments on code diffs or files.

@ulises-jeremias ulises-jeremias merged commit 904b61d into vlang:main Oct 21, 2023
19 checks passed
@ttytm ttytm deleted the refactor/simplify-cflags branch October 24, 2023 23:30
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.

2 participants