LLNL / H5Z-ZFP

A registered ZFP compression plugin for HDF5
Other
50 stars 22 forks source link

Problems installing with spack #129

Open ghost opened 11 months ago

ghost commented 11 months ago
 30    ar cr libh5zzfp.a H5Zzfp_props.o
 31    ar cr libh5zzfp.a H5Zzfp_props_f.o

32 ar: libh5zzfp.a: error reading H5Zzfp_props_f.o: file truncated 33 make[1]: [Makefile:40: libh5zzfp.a(H5Zzfp_props.o)] Error 1 34 make[1]: Waiting for unfinished jobs.... 35 make[1]: Leaving directory '/tmp/tech/spack-stage/spack-stage-h5z-zf p-develop-7uhkj4qsuxmnpnwmo2jeicmnon7gbpf5/spack-src/src' 36 make: *** [Makefile:53: install] Error 2

See build log for details: /tmp/tech/spack-stage/spack-stage-h5z-zfp-develop-7uhkj4qsuxmnpnwmo2jeicmnon7gbpf5/spack-build-out.txt

==> Warning: Skipping build of sw4-3.0-beta2-4vca7qyjynhz2tbw2soalrzs67jvfwse since h5z-zfp-develop-7uhkj4qsuxmnpnwmo2jeicmnon7gbpf5 failed [+] /home/tech/spack/opt/spack/linux-ubuntu22.04-skylake/gcc-11.4.0/py-h5py-3.8.0-bedfnrd7fbxal2o63rvjwsa7tzc3hhnu ==> Error: sw4-3.0-beta2-4vca7qyjynhz2tbw2soalrzs67jvfwse: Package was not installed ==> Error: Installation request failed. Refer to reported errors for failing package(s).

ubuntu22.04.3 H5Z-ZFP installation via spack

any suggestions ?

markcmiller86 commented 11 months ago

What version of spack were you using and what was your spack command?

I will see if I can reproduce on a docker container.

markcmiller86 commented 11 months ago

It looks like spack has yet to make a new release since updating the spack recipe for H5Z-ZFP 1.1.1. Its on their develop branch now and so should go into the next spack release. That said, I dunno if their current develop branch will build all dependencies correctly. But, I'd say give it a try.

Following guidance here instead of doing git checkout releases/v0.20 do git checkout develop (which I think is default branch just after cloning anyways). And, if you cloned it in the distant past, do a git pull first to pull in everything on their develop branch.

Then follow other instructions as before.

markcmiller86 commented 11 months ago

So, this worked for me on an ubuntu docker system (ubuntu-jammy)

git clone https://github.com/llnl/spack.git
cd spack/
. ./share/spack/setup-env.sh
spack install h5z-zfp~fortran ^hdf5~mpi~fortran ^zfp~openmp

Note, default branch in the clone is develop.

It installed 19 packages and took about 20 mins.

spack find -p h5z-zfp
-- linux-ubuntu22.04-ivybridge / gcc@11.4.0 ---------------------
h5z-zfp@1.1.1  /tmp/spack/opt/spack/linux-ubuntu22.04-ivybridge/gcc-11.4.0/h5z-zfp-1.1.1-oxkdje4krexkyfnlo36y6kjm5qxf4stq
==> 1 installed package
ghost commented 11 months ago

home/tech/spack/var/spack/repos/builtin/packages/sw4/package.py:51, in edit: 48 os.environ["fftw"] = "yes" 49 os.environ["SW4ROOT"] = spec["proj"].prefix 50 os.environ["HDF5ROOT"] = spec["hdf5"].prefix

51        os.environ["H5ZROOT"] = spec["h5z-zfp"].prefix

52 os.environ["ZFPROOT"] = spec["zfp"].prefix 53 os.environ["FFTWHOME"] = spec["fftw"].prefix 54 os.environ["EXTRA_LINK_FLAGS"] = "-lstdc++ -lm -ldl "

See build log for details: /tmp/tech/spack-stage/spack-stage-sw4-3.0-pimxejebklplgx2wsg4a7ulo35jij5pc/spack-build-out.txt

tech@tech1:~$ spack find -p h5z-zfp -- linux-ubuntu22.04-skylake / gcc@11.4.0 ----------------------- h5z-zfp@1.1.1 /home/tech/spack/opt/spack/linux-ubuntu22.04-skylake/gcc-11.4.0/h5z-zfp-1.1.1-y6dhjpupaev2dy2oulaol2gms4uujyhk

ghost commented 11 months ago

==> Error: KeyError: 'No spec with name h5z-zfp in sw4@=3.0%gcc@=11.4.0+fftw+hdf5+openmp+proj~zfp build_system=makefile arch=linux-ubuntu22.04-skylake ^autoconf

ghost commented 11 months ago
51        os.environ["H5ZROOT"] = spec["h5z-zfp"].prefix
markcmiller86 commented 11 months ago

==> Error: KeyError: 'No spec with name h5z-zfp in sw4@=3.0%gcc@=11.4.0+fftw+hdf5+openmp+proj~zfp build_system=makefile arch=linux-ubuntu22.04-skylake ^autoconf

The ~zfp is disabling zfp in the sw4 build. If you disable zfp, you certainly cannot have h5z-zfp. The fact that spack failed instead of proceeding with sw4 build sounds like its not handling cases where zfp has been removed from the build. Lets go look at that code...

markcmiller86 commented 11 months ago

So, I think you need to change ~zfp to +zfp. Have you tried that.