Skip to content

enhance JuliaPackage easyblock to avoid writing to $HOME & clean up JuliaBundle#4102

Open
Flamefire wants to merge 12 commits into
easybuilders:developfrom
Flamefire:20260401164416_new_pr_juliabundle
Open

enhance JuliaPackage easyblock to avoid writing to $HOME & clean up JuliaBundle#4102
Flamefire wants to merge 12 commits into
easybuilders:developfrom
Flamefire:20260401164416_new_pr_juliabundle

Conversation

@Flamefire
Copy link
Copy Markdown
Contributor

@Flamefire Flamefire commented Apr 1, 2026

(created using eb --new-pr)

Some easyconfigs have sanity check commands that run e.g. julia -e ...

This will use the $JULIA_DEPOT_PATH set in the module which is something like :/foo:/bar where the leading colon means "including the user depot": https://docs.julialang.org/en/v1/manual/environment-variables/#JULIA_DEPOT_PATH

That will write artifacts/cache files to $HOME/.julia or fail if that's not writable.

Similar to PythonPackage/PythonBundle use a temporary directory for that and end with a trailing colon for "excluding the user depot."

Additionally some empty methods on Juliabundle can be removed

@Flamefire
Copy link
Copy Markdown
Contributor Author

Test report by @Flamefire

Overview of tested easyconfigs (in order)

Build succeeded for 2 out of 3 (total: 1 hour 12 mins 55 secs) (3 easyconfigs in total)
i7140 - Linux Rocky Linux 9.6, x86_64, AMD EPYC 7702 64-Core Processor (zen2), Python 3.9.21
See https://gist.github.com/Flamefire/d5fcfa06e0bfd1bbdfa15bf0e3ef2c6c for a full test report.

@Flamefire
Copy link
Copy Markdown
Contributor Author

The only failure above is from a test failing due to German locale: "Warnung != Warning"
Fix in easybuilders/easybuild-easyconfigs#25666

@boegel boegel changed the title Update JuliaPackage easyblock to avoid writing to $HOME & cleanup JuliaBundle enhance JuliaPackage easyblock to avoid writing to $HOME & clean up JuliaBundle Apr 8, 2026
@boegel boegel added this to the release after 5.3.0 milestone Apr 8, 2026
@boegel
Copy link
Copy Markdown
Member

boegel commented Apr 8, 2026

@lexming Can you take a look at this?

Comment thread easybuild/easyblocks/generic/juliapackage.py Outdated
Comment thread easybuild/easyblocks/generic/juliapackage.py
Comment thread easybuild/easyblocks/generic/juliapackage.py Outdated
@Crivella
Copy link
Copy Markdown
Contributor

@boegelbot please test @ jsc-zen3
EB_ARGS="--installpath=/tmp/ebpr-4102 IJulia-1.24.2-Julia-1.10.3.eb IJulia-1.23.3-Julia-1.6.7.eb IJulia-1.29.0-Julia-1.11.6.eb IJulia-1.24.0-Julia-1.8.5.eb Suppressor-0.2.4-Julia-1.9.2.eb Circuitscape-5.12.3-Julia-1.7.2.eb Circuitscape-5.12.3-Julia-1.9.2.eb RCall-0.13.17-foss-2022a-R-4.2.1-Julia-1.9.2.eb"

@Flamefire Flamefire force-pushed the 20260401164416_new_pr_juliabundle branch from 08a7ece to 7cf6413 Compare April 29, 2026 15:20
@Crivella
Copy link
Copy Markdown
Contributor

Crivella commented Apr 29, 2026

Can confirm that with this PR neither ~/.julia is touched, nor you get a double compilation of packages under the install directory due to running Pkg.test in the sanity check commands

crivella@crivella-desktop:~$ cd .local/easybuild/software/Clearwood_stiffness_model/0.1.0-Julia-1.12.2
crivella@crivella-desktop:~/.local/easybuild/software/Clearwood_stiffness_model/0.1.0-Julia-1.12.2$ ls compiled/v1.12/Adapt
rUIgN_NQeV1.ji  rUIgN_NQeV1.so
crivella@crivella-desktop:~/.local/easybuild/software/Clearwood_stiffness_model/0.1.0-Julia-1.12.2$ ls ~/.julia
ls: cannot access '/home/crivella/.julia': No such file or directory
crivella@crivella-desktop:~/.local/easybuild/software/Clearwood_stiffness_model/0.1.0-Julia-1.12.2$ 

Test report by @Crivella

Overview of tested easyconfigs (in order)

  • SUCCESS Clearwood_stiffness_model-0.1.0-Julia-1.12.2.eb

Build succeeded for 1 out of 1 (total: 10 mins 0 secs) (1 easyconfigs in total)
crivella-desktop - Linux Ubuntu 22.04.5 LTS (Jammy Jellyfish), x86_64, 13th Gen Intel(R) Core(TM) i9-13900K (skylake), Python 3.11.14
See https://gist.github.com/Crivella/38f4d9e8d6378c1cb391182476f3c2bc for a full test report.

@boegelbot
Copy link
Copy Markdown

@Crivella: Request for testing this PR well received on jsczen3l1.int.jsc-zen3.fz-juelich.de

PR test command 'if [[ develop != 'develop' ]]; then EB_BRANCH=develop ./easybuild_develop.sh 2> /dev/null 1>&2; EB_PREFIX=/home/boegelbot/easybuild/develop source init_env_easybuild_develop.sh; fi; EB_PR=4102 EB_ARGS="--installpath=/tmp/ebpr-4102 IJulia-1.24.2-Julia-1.10.3.eb IJulia-1.23.3-Julia-1.6.7.eb IJulia-1.29.0-Julia-1.11.6.eb IJulia-1.24.0-Julia-1.8.5.eb Suppressor-0.2.4-Julia-1.9.2.eb Circuitscape-5.12.3-Julia-1.7.2.eb Circuitscape-5.12.3-Julia-1.9.2.eb RCall-0.13.17-foss-2022a-R-4.2.1-Julia-1.9.2.eb" EB_CONTAINER= EB_REPO=easybuild-easyblocks EB_BRANCH=develop /opt/software/slurm/bin/sbatch --job-name test_PR_4102 --ntasks=8 ~/boegelbot/eb_from_pr_upload_jsc-zen3.sh' executed!

  • exit code: 0
  • output:
Submitted batch job 10329

Test results coming soon (I hope)...

Details

- notification for comment with ID 4345043665 processed

Message to humans: this is just bookkeeping information for me,
it is of no use to you (unless you think I have a bug, which I don't).

@Flamefire
Copy link
Copy Markdown
Contributor Author

I'm currently invetigating why the sanity check of Circuitscape/5.12.3-Julia-1.9.2 fails. Not sure if this is introduced by this or was there before.

@boegelbot
Copy link
Copy Markdown

Test report by @boegelbot

Overview of tested easyconfigs (in order)

Build succeeded for 2 out of 8 (total: 1 hour 14 mins 49 secs) (8 easyconfigs in total)
jsczen3c2.int.jsc-zen3.fz-juelich.de - Linux Rocky Linux 9.7, x86_64, AMD EPYC-Milan Processor (zen3), Python 3.9.25
See https://gist.github.com/boegelbot/6ed33711b9b47d8e2591877581dd8ace for a full test report.

Comment thread easybuild/easyblocks/generic/juliapackage.py
Comment thread easybuild/easyblocks/generic/juliapackage.py Outdated
@Crivella
Copy link
Copy Markdown
Contributor

Crivella commented May 1, 2026

Test report by @Crivella

Overview of tested easyconfigs (in order)

  • SUCCESS Clearwood_stiffness_model-0.1.0-Julia-1.12.2.eb

Build succeeded for 1 out of 1 (total: 9 mins 5 secs) (1 easyconfigs in total)
crivella-desktop - Linux Ubuntu 22.04.5 LTS (Jammy Jellyfish), x86_64, 13th Gen Intel(R) Core(TM) i9-13900K (skylake), Python 3.11.14
See https://gist.github.com/Crivella/ea92cb4b64ff929b6f8cc29d4cf6628e for a full test report.

Comment thread easybuild/easyblocks/generic/juliapackage.py
Co-authored-by: Davide Grassano <34096612+Crivella@users.noreply.github.com>
@Flamefire
Copy link
Copy Markdown
Contributor Author

mod_filepath = self.mod_filepath
AttributeError: 'JuliaPackage' object has no attribute 'mod_filepath'

That one is very weird: self.mod_filepath is set in the constructor/__init__

Looks like something else is off, seen that before when doing testing, but it disappeared. And now it's back again.
Will do some more investigation next week. Putting this on hold until then

@Flamefire Flamefire marked this pull request as draft May 1, 2026 08:26
@Crivella
Copy link
Copy Markdown
Contributor

Crivella commented May 1, 2026

That one is very weird: self.mod_filepath is set in the constructor/init

Looks like something else is off, seen that before when doing testing, but it disappeared. And now it's back again.
Will do some more investigation next week. Putting this on hold until then

I assume it is coming from some extra stuff you have in framework (eg maybe you are on top of easybuilders/easybuild-framework#5185 ?)

I tested one of them on my workstation with develop as the framework branch and it works normally

@Crivella
Copy link
Copy Markdown
Contributor

Crivella commented May 1, 2026

@Flamefire Flamefire marked this pull request as ready for review May 1, 2026 08:50
@Flamefire
Copy link
Copy Markdown
Contributor Author

True, I'm trying to always use all my open PRs in one tree for all builds so I detect issues. So indeed that PR was the cause: In some intermediate version I had an inverted condition in this (now fixed up) commit easybuilders/easybuild-framework@5ace95d
Basically: module creating in an extension doesn't work (and doesn't need to)

The job must have started before I applied that fix back on the cluster

@Crivella
Copy link
Copy Markdown
Contributor

Crivella commented May 1, 2026

@boegelbot please test @ jsc-zen3
EB_ARGS="--installpath=/tmp/ebpr-4102 IJulia-1.24.2-Julia-1.10.3.eb IJulia-1.23.3-Julia-1.6.7.eb IJulia-1.29.0-Julia-1.11.6.eb IJulia-1.24.0-Julia-1.8.5.eb Suppressor-0.2.4-Julia-1.9.2.eb Circuitscape-5.12.3-Julia-1.7.2.eb Circuitscape-5.12.3-Julia-1.9.2.eb RCall-0.13.17-foss-2022a-R-4.2.1-Julia-1.9.2.eb"

@boegelbot
Copy link
Copy Markdown

@Crivella: Request for testing this PR well received on jsczen3l1.int.jsc-zen3.fz-juelich.de

PR test command 'if [[ develop != 'develop' ]]; then EB_BRANCH=develop ./easybuild_develop.sh 2> /dev/null 1>&2; EB_PREFIX=/home/boegelbot/easybuild/develop source init_env_easybuild_develop.sh; fi; EB_PR=4102 EB_ARGS="--installpath=/tmp/ebpr-4102 IJulia-1.24.2-Julia-1.10.3.eb IJulia-1.23.3-Julia-1.6.7.eb IJulia-1.29.0-Julia-1.11.6.eb IJulia-1.24.0-Julia-1.8.5.eb Suppressor-0.2.4-Julia-1.9.2.eb Circuitscape-5.12.3-Julia-1.7.2.eb Circuitscape-5.12.3-Julia-1.9.2.eb RCall-0.13.17-foss-2022a-R-4.2.1-Julia-1.9.2.eb" EB_CONTAINER= EB_REPO=easybuild-easyblocks EB_BRANCH=develop /opt/software/slurm/bin/sbatch --job-name test_PR_4102 --ntasks=8 ~/boegelbot/eb_from_pr_upload_jsc-zen3.sh' executed!

  • exit code: 0
  • output:
Submitted batch job 10337

Test results coming soon (I hope)...

Details

- notification for comment with ID 4358702055 processed

Message to humans: this is just bookkeeping information for me,
it is of no use to you (unless you think I have a bug, which I don't).

@boegelbot
Copy link
Copy Markdown

Test report by @boegelbot

Overview of tested easyconfigs (in order)

  • SUCCESS IJulia-1.24.2-Julia-1.10.3.eb

  • SUCCESS IJulia-1.23.3-Julia-1.6.7.eb

  • SUCCESS IJulia-1.29.0-Julia-1.11.6.eb

  • SUCCESS IJulia-1.24.0-Julia-1.8.5.eb

  • SUCCESS Suppressor-0.2.4-Julia-1.9.2.eb

  • SUCCESS Circuitscape-5.12.3-Julia-1.7.2.eb

  • SUCCESS Circuitscape-5.12.3-Julia-1.9.2.eb

  • FAIL RCall-0.13.17-foss-2022a-R-4.2.1-Julia-1.9.2.eb (build issue)
    (partial log available at https://gist.github.com/boegelbot/60bdd755677ff2041beb32f9cc64490d)

Build succeeded for 7 out of 8 (total: 1 hour 13 mins 11 secs) (8 easyconfigs in total)
jsczen3c1.int.jsc-zen3.fz-juelich.de - Linux Rocky Linux 9.7, x86_64, AMD EPYC-Milan Processor (zen3), Python 3.9.25
See https://gist.github.com/boegelbot/9960322651eee1f2c0af30ca38b2ba2b for a full test report.

@Flamefire
Copy link
Copy Markdown
Contributor Author

That is caused by not listing all required packages, so an actual bug in the easyconfig we didn't catch before setting "offline" in the sanity check and hence the missing package was downloaded.
I have a fix for that but couldn't test it yet, due to the previous issue here with missing installdir

@Crivella
Copy link
Copy Markdown
Contributor

Crivella commented May 1, 2026

We could probably also double check the other ECs with

NOTE: It seems that AxisArrays is a weak (optional) dependency of RCall, but RCall's test suite does not skip/disable the test using it.

I am wondering if we should allow downloads for testing, right now we would need to install the test dependencies together with the normal ones.

In this case AxisArrays is also an optional deps so it would be fine but i do not think it is impossible to have a dep that is used only for testing

@Flamefire
Copy link
Copy Markdown
Contributor Author

That is caused by not listing all required packages, so an actual bug in the easyconfig we didn't catch before setting "offline" in the sanity check and hence the missing package was downloaded. I have a fix for that but couldn't test it yet, due to the previous issue here with missing installdir

Fix in easybuilders/easybuild-easyconfigs#25903

We could probably also double check the other ECs with

As a good proxy we can run them as test reports for this PR. If the (now offline) sanity checks succeed there is a high chance they are complete.

NOTE: It seems that AxisArrays is a weak (optional) dependency of RCall, but RCall's test suite does not skip/disable the test using it.

I am wondering if we should allow downloads for testing, right now we would need to install the test dependencies together with the normal ones.

In this case AxisArrays is also an optional deps so it would be fine but i do not think it is impossible to have a dep that is used only for testing

If I understand the code directly it is not only for testing but an optional dependency allowing additional features. When they are not used nothing breaks. Only the tests assume they are available.
So IMO adding that is fine. Otherwise we'd need to disable those tests somehow.

Enabling downloads wouldn't be a good solution IMO. We already spend quite some time elsewhere in EasyBuild to allow fully offline builds.

@Flamefire
Copy link
Copy Markdown
Contributor Author

Test report by @Flamefire

Overview of tested easyconfigs (in order)

  • SUCCESS Suppressor-0.2.4-Julia-1.9.2.eb

  • SUCCESS Julia-1.12.2.eb

  • SUCCESS Julia-1.11.7.eb

  • SUCCESS Julia-1.11.5.eb

  • SUCCESS Pluto-0.20.13-Julia-1.11.5.eb

  • FAIL PySR-1.5.8-gfbf-2024a.eb (build issue)
    (partial log available at https://gist.github.com/Flamefire/d8ee9ddce37110b877cf4f5664db0db8)

  • SUCCESS IJulia-1.24.0-Julia-1.8.5.eb

  • SUCCESS IJulia-1.23.3-Julia-1.6.7.eb

  • SUCCESS IJulia-1.24.2-Julia-1.10.3.eb

  • SUCCESS IJulia-1.29.0-Julia-1.11.6.eb

  • SUCCESS Circuitscape-5.12.3-Julia-1.7.2.eb

  • SUCCESS Circuitscape-5.12.3-Julia-1.9.2.eb

  • SUCCESS RCall-0.13.17-foss-2022a-R-4.2.1-Julia-1.9.2.eb

  • SUCCESS ResistanceGA-4.2-5-foss-2022a-R-4.2.1-Julia-1.9.2.eb

Build succeeded for 13 out of 14 (total: 4 hours 17 mins 16 secs) (13 easyconfigs in total)
i7014 - Linux Rocky Linux 9.6, x86_64, AMD EPYC 7702 64-Core Processor (zen2), Python 3.9.21
See https://gist.github.com/Flamefire/f87390042a32ddd673a9ab411afa4b5c for a full test report.

@Flamefire
Copy link
Copy Markdown
Contributor Author

PySR is tricky: It is a PythonBundle that uses some Julia stuff.

Added a fix in easybuilders/easybuild-easyconfigs#25909 that avoids the writes to $HOME in the sanity check.
Would be better if it had a dependency on the required Julia package(s?) instead/additionally so it doesn't download stuff in exts_filter, but works "enough" for now.

@Crivella
Copy link
Copy Markdown
Contributor

Crivella commented May 5, 2026

@boegelbot please test @ jsc-zen3
EB_ARGS="--buildpath=/tmp/ebpr-4102/build --installpath=/tmp/ebpr-4102/install --from-pr 25903,25909 RCall-0.13.17-foss-2022a-R-4.2.1-Julia-1.9.2.eb PySR-1.5.8-gfbf-2024a.eb"

@boegelbot
Copy link
Copy Markdown

@Crivella: Request for testing this PR well received on jsczen3l1.int.jsc-zen3.fz-juelich.de

PR test command 'if [[ develop != 'develop' ]]; then EB_BRANCH=develop ./easybuild_develop.sh 2> /dev/null 1>&2; EB_PREFIX=/home/boegelbot/easybuild/develop source init_env_easybuild_develop.sh; fi; EB_PR=4102 EB_ARGS="--buildpath=/tmp/ebpr-4102/build --installpath=/tmp/ebpr-4102/install --from-pr 25903,25909 RCall-0.13.17-foss-2022a-R-4.2.1-Julia-1.9.2.eb PySR-1.5.8-gfbf-2024a.eb" EB_CONTAINER= EB_REPO=easybuild-easyblocks EB_BRANCH=develop /opt/software/slurm/bin/sbatch --job-name test_PR_4102 --ntasks=8 ~/boegelbot/eb_from_pr_upload_jsc-zen3.sh' executed!

  • exit code: 0
  • output:
Submitted batch job 10355

Test results coming soon (I hope)...

Details

- notification for comment with ID 4377729904 processed

Message to humans: this is just bookkeeping information for me,
it is of no use to you (unless you think I have a bug, which I don't).

@Crivella
Copy link
Copy Markdown
Contributor

Crivella commented May 5, 2026

@Crivella
Copy link
Copy Markdown
Contributor

Crivella commented May 5, 2026

PySR is tricky: It is a PythonBundle that uses some Julia stuff.

Added a fix in easybuilders/easybuild-easyconfigs#25909 that avoids the writes to $HOME in the sanity check.
Would be better if it had a dependency on the required Julia package(s?) instead/additionally so it doesn't download stuff in exts_filter, but works "enough" for now.

This begs the question if we should always set JULIA_DEPOT_PATH to a tmpdir when Julia is a dependency.
Any package could depend on Julia and use it under the hood to do stuff which will end up producing artifacts in the user home

@Flamefire
Copy link
Copy Markdown
Contributor Author

This begs the question if we should always set JULIA_DEPOT_PATH to a tmpdir when Julia is a dependency.
Any package could depend on Julia and use it under the hood to do stuff which will end up producing artifacts in the user home

This fits into the discussion of setting Python and Cargo variables in framework where the same applies

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants