Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No corresponding command for Linux machine #8

Open
DeeDiveT opened this issue Apr 2, 2020 · 1 comment
Open

No corresponding command for Linux machine #8

DeeDiveT opened this issue Apr 2, 2020 · 1 comment

Comments

@DeeDiveT
Copy link

DeeDiveT commented Apr 2, 2020

Hi, I'm trying to build nalu-wind following
https://nalu-wind.readthedocs.io/en/latest/source/user/build_spack.html#

But it seems that there is no corresponding command for Linux machine (Ubuntu 18.04), see

# Copy machine-specific configuration for Spack if we recognize the machine
if [ "${MACHINE}" == 'eagle' ] || \
[ "${MACHINE}" == 'rhodes' ] || \
[ "${MACHINE}" == 'mac' ]; then
printf "Machine is detected as ${MACHINE}.\n"
#All machines do this
(set -x; cp machines/base/*.yaml ${SPACK_ROOT}/etc/spack/)
(set -x; cp custom-package-files/parallel-netcdf/package.py ${SPACK_ROOT}/var/spack/repos/builtin/packages/parallel-netcdf/package.py)
(set -x; cp custom-package-files/trilinos-catalyst-ioss-adapter/package.py ${SPACK_ROOT}/var/spack/repos/builtin/packages/trilinos-catalyst-ioss-adapter/package.py)
#Extra stuff for eagle
if [ ${MACHINE} == 'eagle' ]; then
(set -x; mkdir ${SPACK_ROOT}/etc/spack/linux)
(set -x; cp machines/${MACHINE}/packages.yaml.${MACHINE} ${SPACK_ROOT}/etc/spack/linux/packages.yaml)
(set -x; cp custom-package-files/mpich/package.py ${SPACK_ROOT}/var/spack/repos/builtin/packages/mpich/package.py)
(set -x; cp custom-package-files/ucx/package.py ${SPACK_ROOT}/var/spack/repos/builtin/packages/ucx/package.py)
(set -x; cp custom-package-files/trilinos/package.py ${SPACK_ROOT}/var/spack/repos/builtin/packages/trilinos/package.py)
(set -x; cp custom-package-files/nalu-wind/package.py ${SPACK_ROOT}/var/spack/repos/builtin/packages/nalu-wind/package.py)
(set -x; cp machines/${MACHINE}/compilers.yaml.software ${SPACK_ROOT}/etc/spack/compilers.yaml)
(set -x; cp machines/${MACHINE}/modules.yaml.software ${SPACK_ROOT}/etc/spack/modules.yaml)
fi
#Extra stuff for rhodes
if [ ${MACHINE} == 'rhodes' ]; then
(set -x; mkdir ${SPACK_ROOT}/etc/spack/linux)
(set -x; cp machines/${MACHINE}/packages.yaml.${MACHINE} ${SPACK_ROOT}/etc/spack/linux/packages.yaml)
(set -x; cp machines/${MACHINE}/compilers.yaml.software ${SPACK_ROOT}/etc/spack/compilers.yaml)
(set -x; cp machines/${MACHINE}/modules.yaml.software ${SPACK_ROOT}/etc/spack/modules.yaml)
fi
if [ "${MACHINE}" == 'mac' ]; then
(set -x; mkdir ${SPACK_ROOT}/etc/spack/darwin)
(set -x; cp machines/${MACHINE}/packages.yaml.${MACHINE} ${SPACK_ROOT}/etc/spack/darwin/packages.yaml)
fi
#Extra stuff for mira
#if [ ${MACHINE} == 'mira' ]; then
# (set -x; cp -R machines/${MACHINE}/libsigsegv ${SPACK_ROOT}/var/spack/repos/builtin/packages/)
# (set -x; cp -R machines/${MACHINE}/nalu ${SPACK_ROOT}/var/spack/repos/builtin/packages/)
# (set -x; cp -R machines/${MACHINE}/nalu-wind ${SPACK_ROOT}/var/spack/repos/builtin/packages/)
# (set -x; cp -R machines/${MACHINE}/netcdf ${SPACK_ROOT}/var/spack/repos/builtin/packages/)
# (set -x; cp -R machines/${MACHINE}/parallel-netcdf ${SPACK_ROOT}/var/spack/repos/builtin/packages/)
# (set -x; cp -R machines/${MACHINE}/superlu ${SPACK_ROOT}/var/spack/repos/builtin/packages/)
# (set -x; cp -R machines/${MACHINE}/trilinos ${SPACK_ROOT}/var/spack/repos/builtin/packages/)
# (set -x; cp -R machines/${MACHINE}/yaml-cpp ${SPACK_ROOT}/var/spack/repos/builtin/packages/)
#fi
else
printf "\nMachine name not found.\n"
fi

The script above gives "Machine name not found".

Millions of thx in advance.

@wjhorne
Copy link

wjhorne commented Dec 9, 2020

I know this response is a bit late, but I had the same issue installing Nalu on a Debian box. I was able to install everything by creating a psuedo entry in setup-spack.sh for MACHINE="Linux". I have attached the resulting file. I also found that I had to modify the various custom package.py files to enable the PIC flags. I am guessing the issue is due to differences in spack version. I have included an example of the modifications I had to do to the parallel-netcdf package.py to make it work.

package.py.txt
setup-spack.sh.txt

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

No branches or pull requests

2 participants