Skip to content

Toolchain: Remove redundant exporting variables#7230

Open
Growl1234 wants to merge 4 commits intodeepmodeling:developfrom
Growl1234:toolchain
Open

Toolchain: Remove redundant exporting variables#7230
Growl1234 wants to merge 4 commits intodeepmodeling:developfrom
Growl1234:toolchain

Conversation

@Growl1234
Copy link
Copy Markdown

No description provided.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 via prepend_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_ROOT is 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.

@Growl1234 Growl1234 force-pushed the toolchain branch 4 times, most recently from 0e07c22 to 46f60c8 Compare April 10, 2026 04:35
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