Skip to content

fix for /tmp/tmp access issues - #7733

Merged
sklam merged 3 commits into
numba:mainfrom
ChiCheng45:master
Jul 19, 2022
Merged

sklam merged 3 commits into
numba:mainfrom
ChiCheng45:master

Conversation

@ChiCheng45

Copy link
Copy Markdown

Changes are made on how the temp files and temp dirs are created by numba for testing the compilers in the function _check_external_compiler in platform.py

This is my proposed fix for the issue #7218 which can occur when multiple users are working on a shared resource such as on a HPC. Basically if one user builds numba AOT code they will create a directory named /tmp/tmp which may mean that other users will unable to build AOT due to a permission error.

fixes #7218

@gmarkall

Copy link
Copy Markdown
Member

@ChiCheng45 Many thanks for the PR! Is this now ready for review?

@ChiCheng45

Copy link
Copy Markdown
Author

@gmarkall Hi yes this is ready for review now but I'm not sure why this docs are taking so long to be built, has it gotten stuck?

@gmarkall

Copy link
Copy Markdown
Member

@gmarkall Hi yes this is ready for review now but I'm not sure why this docs are taking so long to be built, has it gotten stuck?

Many thanks, I've added it to the queue. I didn't see a problem with the doc building - I think sometimes RTD builders wait in a queue for a little while though.

@gmarkall gmarkall added this to the Numba 0.56 RC milestone Jan 17, 2022
@sklam sklam modified the milestones: Numba 0.56 RC, Numba 0.57 RC Jun 1, 2022
@esc
esc removed request for esc, sklam and stuartarchibald July 12, 2022 15:02
@esc esc removed this from the Numba 0.57 RC milestone Jul 12, 2022
@esc
esc requested review from apmasell and esc July 12, 2022 15:04
Comment thread numba/pycc/platform.py Outdated
apmasell
apmasell previously approved these changes Jul 18, 2022
@apmasell apmasell added 5 - Ready to merge Review and testing done, is ready to merge and removed 3 - Ready for Review labels Jul 18, 2022
@sklam

sklam commented Jul 18, 2022

Copy link
Copy Markdown
Member

BFID numba_smoketest_cpu_yaml_116

@sklam sklam added Pending BuildFarm For PRs that have been reviewed but pending a push through our buildfarm 4 - Waiting on CI Review etc done, waiting for CI to finish and removed 5 - Ready to merge Review and testing done, is ready to merge labels Jul 18, 2022
@sklam

sklam commented Jul 18, 2022

Copy link
Copy Markdown
Member

Checking it in the farm because the use of Path.anchor may have interesting effect on windows with multiple drive.

Comment thread numba/pycc/platform.py
@sklam sklam removed Pending BuildFarm For PRs that have been reviewed but pending a push through our buildfarm 4 - Waiting on CI Review etc done, waiting for CI to finish labels Jul 19, 2022

@sklam sklam left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI passed and all review addressed

@sklam sklam added the 5 - Ready to merge Review and testing done, is ready to merge label Jul 19, 2022
@sklam
sklam merged commit 34ec4ef into numba:main Jul 19, 2022
@OlafvdSpek

OlafvdSpek commented Jul 20, 2022 •

Copy link
Copy Markdown

Would this run with output_dir='/' on Linux?
And with output_dir='c:\\' on Windows?

@ChiCheng45

Copy link
Copy Markdown
Author

@OlafvdSpek yea that should also work but I preferred Path(ntf.name).anchor since they might have the tmp dir on another drive on windows

@OlafvdSpek

Copy link
Copy Markdown

Yeah, was just asking what the effective output_dir would be. Wouldn't this create a new c:\\tmp dir on Windows?

@ChiCheng45

Copy link
Copy Markdown
Author

@OlafvdSpek no it creates a directory in whatever the temp directory is for example, C:\Users\username\AppData\Local\Temp\tmp4kygk7kx.

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

Labels

5 - Ready to merge Review and testing done, is ready to merge Effort - medium Medium size effort needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Compiler not found: /tmp/tmp bug

7 participants