spack / spack-bootstrap-installer

Code to generate installers for Spack and any required dependencies (ie python)
Apache License 2.0
1 stars 0 forks source link

Convert spack locks to Windows compatible library #8

Open BetsyMcPhail opened 3 years ago

BetsyMcPhail commented 3 years ago

https://github.com/spack/spack/pull/20412

BetsyMcPhail commented 3 years ago

PR includes other changes to workaround Linux-only libraries.

Currently, the locking tests are not passing on Windows. To run the lock tests:

spack unit-test lib/spack/spack/test/llnl/util/lock.py

BetsyMcPhail commented 3 years ago

More lock tests are passing now.

None of the range-locking tests work. In theory, it seems like this should be possible on Windows (e.g. https://docs.microsoft.com/en-us/windows/win32/fileio/locking-and-unlocking-byte-ranges-in-files) but in practice I haven't found a successful implementation.

BetsyMcPhail commented 3 years ago

Note also that disabling locks does not completely bypass the locks class. Specifically, installer.py uses llnl.util.lock.py directly instead of the lock.py wrapper class.