Skip to content

gcc In my-phlex-environment (test in alma-linux9 arch, cpu x86-64) #221

@physnerds

Description

@physnerds

Test Platform

I followed the phlex installation based on the INSTALLATION.md document. I used a base alma9 linux docker container to test the installation process.

The test is done in the following OS version and CPU architecture:

[root@cdd9dbade9ed phlex-work-dir]# cat /etc/os-release 
NAME="AlmaLinux"
VERSION="9.7 (Moss Jungle Cat)"
ID="almalinux"
ID_LIKE="rhel centos fedora"
VERSION_ID="9.7"
PLATFORM_ID="platform:el9"
Architecture:                x86_64
  CPU op-mode(s):            32-bit, 64-bit
  Address sizes:             46 bits physical, 48 bits virtual
  Byte Order:                Little Endian
CPU(s):                      32
Vendor ID:                   GenuineIntel
  Model name:                13th Gen Intel(R) Core(TM) i9-13950HX
    CPU family:              6

Issue

In a new session of my-phlex-environment , I see that which gcc is pointed to /usr/bin/gcc (which may not be same version of spack installed one) by default and have to do spack load gcc in each new session. Perhaps a one time spack add gcc@14 ; spack install in my-phlex-environment to make sure gcc is always pointed to the spack installed one when user loads the my-phlex-environment? If this is intentional, please ignore and close this issue.

[root@cdd9dbade9ed phlex-work-dir]# spack env activate my-phlex-environment
[root@cdd9dbade9ed phlex-work-dir]# which spack
spack ()
{ 
    : this is a shell function from: /scratch/root/phlex-work-dir/spack/share/spack/setup-env.sh;
    : the real spack script is here: /scratch/root/phlex-work-dir/spack/bin/spack;
    _spack_shell_wrapper "$@";
    return $?
}
[root@cdd9dbade9ed phlex-work-dir]# which phlex
/scratch/root/phlex-work-dir/spack/var/spack/environments/my-phlex-environment/.spack-env/view/bin/phlex
[root@cdd9dbade9ed phlex-work-dir]# which gcc
/usr/bin/gcc
[root@cdd9dbade9ed phlex-work-dir]# spack find gcc
==> In environment my-phlex-environment
==> 1 root specs
-- no arch / no compilers ---------------------------------------
[+] phlex

-- linux-almalinux9-skylake / %c,cxx=gcc@11.5.0 -----------------
gcc@14.3.0

-- linux-almalinux9-x86_64 / no compilers -----------------------
gcc@11.5.0
==> 2 installed packages
==> 0 concretized packages to be installed (show with `spack find -c`)
[root@cdd9dbade9ed phlex-work-dir]# spack load gcc@14
[root@cdd9dbade9ed phlex-work-dir]# which gcc
/scratch/root/phlex-work-dir/spack/opt/spack/linux-skylake/gcc-14.3.0-txlqz5htk5rtldijbxrzdtfco5dbdie5/bin/gcc

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions