-
-
Notifications
You must be signed in to change notification settings - Fork 512
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ccache as an optional spkg #13032
Comments
comment:1
Not yet ready, the build scripts still need to be modified to set |
This comment has been minimized.
This comment has been minimized.
Dependencies: #13040 |
Changed keywords from none to sd40.5 |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
comment:13
Two general comments:
|
comment:14
Replying to @ppurka:
This is set in the spkg-install to 3G.
Both good points, I'll see about changing these. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
comment:21
|
comment:46
Replying to @jdemeyer:
Because it keeps the sage files in a fixed sage directory instead of the home directory of the user. The default sizes of those directories are huge (4G) and are needed because Sage itself is huge. I am already using 3.5G of that.
|
comment:48
ccache spkg is on the server |
Merged: sage-5.6.beta2 |
comment:50
I still don't quite like how this patch uses a separate
I would like to have just one Also note that the default size of 1GB is too little anyway to be useful for Sage. |
comment:51
You can of course have only one ccache dir. In that case, simply define the environment variable
|
comment:52
Replying to @ppurka:
Not really. I didn't bother setting |
comment:53
Maybe there should be a new environment variable ppurka, you also didn't address the comment about 1GB being "too little anyway to be useful for Sage". |
comment:54
I don't think we should introduce yet another environment variable. Users wishing to set a Sage-only ccache dir can use .sage/sagerc |
comment:55
I don't understand what the confusion is about. There are only two possibilities.
|
comment:56
Replying to @ppurka:
That's already false, the default is 1GB.
Because I don't consider cache compilation files to be Sage-related. Imagine I want to compile a package X outside of Sage, a package which happens to be part of Sage (I do that with PARI for example). Then it's a pity that the cached object files for package X appear twice in my home directory: once in My problem really boils down to this: why would you want a separate ccache directory for Sage? |
comment:57
Replying to @ppurka:
I would say that, by not setting I think that setting a variable explicitly to its default value should be the same as not setting it at all. |
comment:58
Replying to @jdemeyer:
I must reiterate. If you don't provide any ccache directory settings at all, then it is set to 4GB with this ticket/spkg.
Well, then you set your ccache environment variable appropriately. To use ccache while compiling with sage you need to set
In fact, one question that I would ask is - what other sage setting is present outside the ~/.sage directory? If there is, then it makes sense to mix and match sage specific settings and folders with system/user specific settings. |
comment:59
You might want to put this question to sage-devel if you haven't already. I think there might be people on both sides of the argument. On the one hand I agree that setting a variable explicitly to its default value should be the same as not setting it at all. On the other hand, I feel like I'd want a separate ccache directory for Sage because I would like all Sage artifacts to be segregated from other stuff on my system, as they currently are by default. Currently, Sage will never modify anything outside its directory except A compromise/workaround would be to, say, symlink |
comment:60
Replying to @ppurka:
OK, so it's something specific to this spkg. When using system ccache, I still get 1GB of cache inside
Again false, as a system ccache might be used.
Probably Sage's readline uses non-Sage-specific configuration files ( |
comment:61
Replying to @kini:
Of course it's not much burden for me, but what about other people in the same situation? This patch changes the ccache directory and the cache size behind people's back if they were using system ccache before. So this patch can make performance strictly worse without users being aware of it. |
comment:62
Replying to @kini:
Which is a problem because ...........? |
comment:63
Does Sage change
As I said, we can print a note at the end of the SPKG installation process, or otherwise document it. I suspect that most users will not mind that the ccache directory
Sage installs another copy of Python on the system "behind people's back" as well and nobody complains (or at least we don't listen to such complaints). I don't see the problem. Also, maybe I am misunderstanding something. Are you saying that installing this SPKG into Sage will change the behavior of the system ccache running independently of Sage?
For one thing, it means more detritus around the system to clean up if you want to remove Sage from your system. And very large unwanted detritus at that, if the user doesn't have a system ccache. Of course, it's an optional package, so we can assume the user at least knows they have installed the ccache SPKG, but most users would expect that they can completely eradicate Sage and all its artifacts by deleting the Sage directory and Also, this kind of lack of compartmentalization just seems unhygienic. I kind of don't like the idea of Sage interacting with and modifying data that belongs to other programs which I've installed systemwide. I like that Sage is a sandbox mini-distribution of software which is self-contained. (Or, at least that's the paradigm the official Sage distribution has conformed to so far, sage-on-gentoo and sage-on-debian notwithstanding.) |
comment:64
Replying to @kini:
No, that's not the case at all. The case I am considering is the opposite: not installing this SPKG into Sage but using a system-wide ccache. |
comment:65
Here is a proposal for a compromise: use
|
comment:66
Replying to @kini:
I'd argue that in this case, the interaction is a feature, not a bug.
But I do have system-wide ccache. For me, this patch adds 1GB of extra detritus in |
comment:67
I think what you are really asking about is What should the zero-configuration scenario, even for advanced users, look like? I count you as an advanced user since you are using a user-wide ccache, and you don't want sage to use any other ccache directory by default. On top of that, you want sage to use the ccache directory that you are already using, which may or may not be the default ccache directory. I think this question should be asked to the general audience in sage-devel. There might be people who keep the ~/.sage directory separate, along with the rest of their sage installation. For a heavy user of sage or for someone running a server, I can contemplate that the ~/.sage (or |
comment:68
Replying to @ppurka:
Done. |
comment:69
Since the spkg is pretty small, would it make sense to distribute it with Sage? It would still only be built if |
comment:70
Replying to @jhpalmieri:
I don't mind. |
comment:71
I created a patch at #13938 to not set |
This is needed to eliminate the majority of the build time when switching between various branches in the git based workflow. It is also useful in the short run for dramatically speeding up the build process for many spkgs.
Installation:
CC: @kini @robertwb @ppurka @jdemeyer
Component: packages: optional
Keywords: sd40.5
Author: R. Andrew Ohana
Reviewer: Punarbasu Purkayastha
Merged: sage-5.6.beta2
Issue created by migration from https://trac.sagemath.org/ticket/13032
The text was updated successfully, but these errors were encountered: