Repository navigation
Conversation
- track_time=1: on macOS without GNU time (gtime), use /usr/bin/time -l. macOS time has no -v option, so timing failed there. - shared_mem: default to /dev/shm only where it exists. Elsewhere, such as macOS, pass the working directory to GoldPolish. That is where GoldPolish already falls back to, so polishing behaves the same, without the "/dev/shm not present" warning. An explicit shared_mem= still wins. Tested on macOS (Apple Silicon, arm64) with tests/goldrush_test_demo.sh: the demo passes (L50 = 2), and with track_time=1 each step writes a .time file. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
lcoombe
reviewed
Oct 27, 2026
Comment on lines
+16
to
+18
| # Shared memory location for GoldPolish. Left empty on systems without /dev/shm | ||
| # (e.g. macOS); polishing then runs in the working directory, as GoldPolish | ||
| # itself would. |
Contributor
There was a problem hiding this comment.
Suggested change
| # Shared memory location for GoldPolish. Left empty on systems without /dev/shm | |
| # (e.g. macOS); polishing then runs in the working directory, as GoldPolish | |
| # itself would. | |
| # Shared memory location for GoldPolish. |
I might suggest leaving the comment as-is, since the default is already documented in the help page, and it can also be explicitly set by a user.
Comment on lines
+125
to
130
| else ifeq ($(shell uname -s),Darwin) | ||
| # macOS time has no -v; -l reports the same run time and peak memory | ||
| time=command /usr/bin/time -l -o $@.time | ||
| else | ||
| time=command time -v -o $@.time | ||
| endif |
Contributor
There was a problem hiding this comment.
Suggested change
| else ifeq ($(shell uname -s),Darwin) | |
| # macOS time has no -v; -l reports the same run time and peak memory | |
| time=command /usr/bin/time -l -o $@.time | |
| else | |
| time=command time -v -o $@.time | |
| endif | |
| else ifeq ($(shell /usr/bin/time -v true >/dev/null 2>&1 && echo yes),yes) | |
| time=command /usr/bin/time -v -o $@.time | |
| else | |
| time=command /usr/bin/time -l -o $@.time | |
| endif |
A suggestion for how it could be updated without making any explicit OS assumptions
| # Shared memory location for GoldPolish. Left empty on systems without /dev/shm | ||
| # (e.g. macOS); polishing then runs in the working directory, as GoldPolish | ||
| # itself would. | ||
| shared_mem=$(if $(wildcard /dev/shm),/dev/shm,) |
Contributor
There was a problem hiding this comment.
Suggested change
| shared_mem=$(if $(wildcard /dev/shm),/dev/shm,) | |
| shared_mem=$(if $(wildcard /dev/shm),/dev/shm,$(CURDIR)) |
If we handle the /dev/shm check and fallback to the current directory here, we could simplify the goldpolish command below by removing the additional logic.
|
|
||
| %.goldpolish-polished.fa: %.fa $(long_reads) | ||
| $(time) $(set_ulimit) goldpolish $(goldpolish_opts) -t$(t) -m$(shared_mem) $< $(long_reads) $@ | ||
| $(time) $(set_ulimit) goldpolish $(goldpolish_opts) -t$(t) -m$(or $(shared_mem),$(CURDIR)) $< $(long_reads) $@ |
Contributor
There was a problem hiding this comment.
If we change the default setting of shared_mem as suggested above, we could revert this change
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two small changes to the pipeline Makefile (
bin/goldrush) so that it runs cleanly on macOS. Linux behaviour is unchanged.Changes
track_time=1: on macOS without GNU time (gtime), use/usr/bin/time -l. macOStimehas no-v, so timing failed there.gtimeandmemusgstill take precedence when installed.shared_mem: default to/dev/shmonly where it exists. Elsewhere, such as macOS, the polishing step passes the working directory to GoldPolish. GoldPolish already falls back to that directory, so polishing is unchanged, without the/dev/shm not presentwarning. An explicitshared_mem=still wins.Testing
On macOS 27 with Apple Silicon (arm64):
tests/goldrush_test_demo.shpasses (L50 = 2). Withtrack_time=1, each step writes a.timefile.make -nwith the system GNU Make 3.81 shows the expected commands without/dev/shm, with and without an explicitshared_mem=, and withtrack_time=1.Not run on Linux. There
$(wildcard /dev/shm)is non-empty, soshared_memstays/dev/shm, and the timing branch only applies whenuname -sisDarwin.Running GoldRush on Apple Silicon
GoldRush compiles on Apple Silicon without source changes, but packages are missing:
goldrush,goldpolish,sdsl-liteorlibdivsufsort, and its osx-arm64tigmintis Python 3.8 only. These were built from source for this test.Once #153 is released, osx-arm64 recipes on bioconda would make GoldRush installable on Apple Silicon.
🤖 Generated with Claude Code