9595# find compilers
9696. spack/share/spack/setup-env.sh
9797spack compiler find
98- cat ~ /.spack/linux/compilers .yaml
98+ cat ~ /.spack/packages .yaml
9999echo " ::endgroup::"
100100
101- # find external tools
101+ # find external tools, excluding cmake since runner uses 4.0 which is not compatible with some libraries
102102echo " ::group::Find Externals"
103- spack external find
103+ spack external find --exclude cmake
104104echo " ::endgroup::"
105105
106106# create config file (to fix FetchError issue)
137137# check given gcc compiler is found or not? If not, use newer version
138138if [[ " $comp " == * " gcc" * ]]; then
139139 echo " ::group::Check gcc compiler"
140- comp_str=${comp/@/@ =}
141- str=` echo $comp_str | awk -F\@ ' {print $1}' `
142- comp_ver=` grep -ir " ${str} @=" ~ /.spack/linux/compilers.yaml | tr -d " spec: ${str} @=" | sort -n | tail -n 1`
140+ str=` echo $comp | awk -F\@ ' {print $1}' `
141+ comp_ver=` spack compiler list | grep " ${str} @" | tr -d " ${str} @" | sort -n | tail -n 1`
143142
144143 use_latest=0
145144 if [[ " $comp " == * " gcc@latest" * ]]; then
146145 echo " The gcc@latest is set. Trying to find latest available gcc compiler ..."
147146 use_latest=1
148- elif [ -z " $( cat ~ /.spack/linux/compilers .yaml | grep $comp_str ) " ]; then
147+ elif [ -z " $( cat ~ /.spack/packages .yaml | grep $comp ) " ]; then
149148 echo " Given compiler ($comp ) is not found! Exiting ..."
150149 exit 1
151150 fi
@@ -168,12 +167,11 @@ echo " specs:" >> spack.yaml
168167IFS=' , ' read -r -a array <<< " $deps"
169168for d in " ${array[@]} "
170169do
171- echo " - $d % $comp target=$arch " >> spack.yaml
170+ echo " - $d target=$arch % $comp " >> spack.yaml
172171done
173172echo " packages:" >> spack.yaml
174173echo " all:" >> spack.yaml
175174echo " target: ['$arch ']" >> spack.yaml
176- echo " compiler: [$comp ]" >> spack.yaml
177175echo " providers:" >> spack.yaml
178176if [[ " $comp " == * " oneapi" * ]]; then
179177echo " mpi: [intel-${mpi} ]" >> spack.yaml
0 commit comments