-
Notifications
You must be signed in to change notification settings - Fork 18
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
developer installation for the new version ? #15
Comments
Yep, if you'd like to modify cosmosis itself instead of the cosmology library then you can clone it with:
Then you can edit it as you wish and then install it with If you are just adding new functions and not modifying existing ones then it might be easier to just make a new library for them, and link to that as well as to the main cosmosis library. Although I see you're using C++ so that might not be straightforward. |
Many thanks for the info. I followed your suggestions to get the main cosmosis repository, and successfully pip installed. The changes I need to make to main cosmosis repository are rather minimal, including introducing new sections in datablock to hold linear and nonlinear galaxy statistics and new functions in c_datablock.cc and c_datablock.h to "put" and "get" new types of grids to the datablock. Successfully done. I still have a problem, though, with how to install the standard library. In addition to the changes to datablock, I have written several modules for cosmosis-standard-library, which do the actual calculations of the galaxy stats. These modules are in C and are correctly interfaced with cosmosis. I thought that after installing the main cosmosis repo, I should clone the standard library Again, thanks in advance. |
That's great on the first issue. On the second, these are the commands to build:
The first step is the equivalent of the setup script, and should be available if everything is built and installed correctly. But you will also need to add the subdirectories containing your new modules to the For example, if your new module has a Makefile in |
I tried to do
perhaps I am in a wrong directory when doing |
Sorry, I had a typo above, it should say |
I actually typed it correctly in my terminal, while above just repeated your type. So the error of One question, on my machine I needed to do pip3 install, since I have both python 2.7 and 3.9, and the default pip is for python 2.7. This shouldnt cause any issue for cosmosis installation, right? Or shall I change something in the setup file to indicate that it should use my python3.9 and not the default python which is python 2.7? |
Ah, okay, in that case can you show me the output of As long as you used pip3 then it should be okay. |
Here it is:
|
Does the Also I notice that you're using the global installation, rather than a virtual environment. I would usually recommend the latter. Finally, can I ask how you're installing dependencies like GSL? |
Thanks for the info. I managed to make some progress. I re-started from scratch, as you suggested installing within a virtual environment. To be more specific, I did the following:
So now with source cosmosis-configure I get the message of As of dependencies, I have everything installed with macports. Without exporting the paths as you described in https://cosmosis.readthedocs.io/en/latest/intro/installation.html, I get all kinds of compilation errors, ex. |
That's great, glad it seems to be working for you! Do the demos work? If you could send me the variables you needed to make MacPorts work I could include them - that would be very handy, thanks! |
I only checked demo1 and demo15 as test cases, which I could successfully run. On a different note, I noticed in demo1.ini that you still have the halofit module listed, but in the new version of the standard-library, the boltzmann module does not include the halofit (and halofit_takahashi). Are they now located in another directory? Here are the variables I had to set (the default installation path of macports is
One last question, if installing on a Linux cluster, where the dependencies are loaded as modules, do I need to do all the exports? In the previous version of the code, you had a |
That's great, glad it's working. In the newest version we just use the halofit versions that are built into camb, instead of a separate module. I should remove the old demo text. The equivalent of the setup-cosmosis script is the Many thanks for the macports options - I will add a flag to use them in the configure script. |
I think that closes this issue, but if you have any more questions please do re-open it. |
Many thanks, yes the issue is totally sorted out. Thanks for the prompt and step-by-step guidance. |
Hi Joe,
I have extended the old version of cosmosis to compute galaxy power spectrum and bispectrum. I wanted to upgrade to the new version, but I noticed that in the new version, the main cosmosis repository is not downloaded. For my extensions of cosmosis, I need to add C functions to read and write to data block specific formats. In the new version, how can I have access to the c_datablock.cc file? Should I just download the main cosmosis repository from github in addition to the cosmosis-standard library? Or is there a developer installation version?
Thanks in advance,
Azadeh
The text was updated successfully, but these errors were encountered: