Toolchain: Remove redundant exporting variables#7230
Open
Growl1234 wants to merge 4 commits intodeepmodeling:developfrom
Open
Toolchain: Remove redundant exporting variables#7230Growl1234 wants to merge 4 commits intodeepmodeling:developfrom
Growl1234 wants to merge 4 commits intodeepmodeling:developfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR streamlines the ABACUS toolchain install scripts by reducing redundant environment-variable exports in generated setup_* files (relying more consistently on prepend_path), while also updating some package configuration details (e.g., ScaLAPACK versions and a LibXC CMake option).
Changes:
- Remove redundant
export ...="$dir:$VAR"patterns in multiple install scripts and standardize variable expansion/quoting. - Adjust how toolchain setup files populate
CPATH,CMAKE_PREFIX_PATH,PKG_CONFIG_PATH, and library paths viaprepend_path. - Update ScaLAPACK main/alt versions (and checksums) in centralized package version management.
Reviewed changes
Copilot reviewed 21 out of 21 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| toolchain/scripts/stage4/install_rapidjson.sh | Simplifies setup generation (use prepend_path + consolidated exports) and standardizes quoting. |
| toolchain/scripts/stage4/install_nep.sh | Removes redundant exports in generated setup file; keeps root/flags exports. |
| toolchain/scripts/stage4/install_libtorch.sh | Removes redundant exports in setup generation (but currently impacts CPU include path setup). |
| toolchain/scripts/stage4/install_libri.sh | Simplifies CPATH setup and standardizes quoting. |
| toolchain/scripts/stage4/install_libnpy.sh | Simplifies CPATH setup and standardizes quoting. |
| toolchain/scripts/stage4/install_libcomm.sh | Simplifies CPATH setup and standardizes quoting. |
| toolchain/scripts/stage4/install_cereal.sh | Simplifies setup generation and adjusts CMake prefix handling. |
| toolchain/scripts/stage3/install_scalapack.sh | Removes redundant exports from path-setup block; keeps root/flags exports. |
| toolchain/scripts/stage3/install_libxc.sh | Simplifies setup generation and adds a CMake policy minimum option. |
| toolchain/scripts/stage3/install_fftw.sh | Removes redundant exports in setup generation. |
| toolchain/scripts/stage3/install_elpa.sh | Removes redundant exports in setup generation and consolidates ELPA_ROOT export. |
| toolchain/scripts/stage2/install_openblas.sh | Removes redundant exports in one block; still sets/uses pkg-config/cmake prefix paths in setup. |
| toolchain/scripts/stage2/install_aocl.sh | Drops previously generated path-prepend setup block; keeps AOCL flags/root exports. |
| toolchain/scripts/stage1/install_openmpi.sh | Removes redundant exports and attempts to switch to prepend_path for env setup. |
| toolchain/scripts/stage1/install_mpich.sh | Removes redundant exports and attempts to switch to prepend_path for env setup. |
| toolchain/scripts/stage1/install_intelmpi.sh | Removes non-system PATH/lib/include prepend block; keeps wrapper/flags exports. |
| toolchain/scripts/stage0/install_intel.sh | Removes redundant path-prepend block; keeps compiler/flags exports. |
| toolchain/scripts/stage0/install_gcc.sh | Removes redundant exports in generated setup file; keeps prepend-based env setup. |
| toolchain/scripts/stage0/install_cmake.sh | Removes redundant PATH export and relies on prepend_path. |
| toolchain/scripts/stage0/install_amd.sh | Removes redundant path-prepend block; keeps compiler/flags exports. |
| toolchain/scripts/package_versions.sh | Bumps ScaLAPACK versions/checksums in centralized version list. |
Comments suppressed due to low confidence (1)
toolchain/scripts/stage3/install_scalapack.sh:130
SCALAPACK_ROOTis exported twice in the generated setup file. This is redundant and makes future edits error-prone; keep a single export (preferably once in the common export block).
cat << EOF >> "${BUILDDIR}/setup_scalapack"
export SCALAPACK_ROOT="${pkg_install_dir}"
export SCALAPACK_LDFLAGS="${SCALAPACK_LDFLAGS}"
export SCALAPACK_LIBS="${SCALAPACK_LIBS}"
export SCALAPACK_ROOT="${pkg_install_dir}"
export CP_DFLAGS="\${CP_DFLAGS} IF_MPI(-D__SCALAPACK|)"
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
0e07c22 to
46f60c8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.