vlang / vsl

V library to develop Artificial Intelligence and High-Performance Scientific Computations
https://vlang.github.io/vsl
MIT License
340 stars 46 forks source link

Simplify `-l` cflags #175

Closed ttytm closed 8 months ago

ttytm commented 8 months ago

Summary by CodeRabbit

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[bot] commented 8 months ago

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.
ttytm commented 8 months ago

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

ttytm commented 8 months ago

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 commented 8 months ago

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

ttytm commented 8 months ago

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.

coderabbitai[bot] commented 8 months ago

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.