Comments (3)
Hi Vivian,
As you say, it looks like PolyChord is not talking to Python's MPI properly (even though Python's MPI itself is working). Most likely, the proper MPI libraries were not loaded at the time PolyChord was compiled.
I suggest the following diagnosis and possible fix:
- Perform the MPI test at https://cobaya.readthedocs.io/en/latest/installation.html (this is important to check that Python's MPI has been loaded at this moment).
- Go to the PolyChord installation folder under
[your_modules]/code/PolyChord
and re-compile it:make veryclean; make; python setup.py install --user
(omit the--user
flag if using Anaconda). - Clear the chains folder with
rm -rf chains/*
, runpython run_PyPolyChord.py
and check that it does not fail. - Repeat the last step, now with
mpirun -n [X>1]
.
Did it work? If it did, would you try to run your case again? Otherwise, let me know.
from cobaya.
After a second look, I am more inclined to think that this is a race condition, so if the 1st solution does not work (please, check it out anyway), try the following: substitute the 1st 4 lines of code in the run_polychord
function in PolyChord/PyPolychord/__init__.py
with
try:
from mpi4py import MPI
comm = MPI.COMM_WORLD
rank = comm.Get_rank()
except ImportError:
rank = 0
if not os.path.exists(settings.base_dir) and rank == 0:
os.makedirs(settings.base_dir)
if not os.path.exists(settings.cluster_dir) and rank == 0:
os.makedirs(settings.cluster_dir)
I am going to submit an issue to the official PolyChord repo.
from cobaya.
It is indeed a race condition...your change of code fixed!
from cobaya.
Related Issues (20)
- Backward Compatibility with python 3.9 HOT 4
- "The sum of logpriors in the sample is not consistent." when resuming chains HOT 3
- Something went wrong when looking for a covmat HOT 1
- Script invocation is broken on Python 3.9 HOT 4
- Python invocation not doing anything HOT 4
- FutureWarning
- Interpolation error creating a delta chi2 = 20 on DESI likelihood HOT 7
- Installing DESI data: could not be found error HOT 4
- cobaya-install cannot name '__obsolete__' from 'cobaya' (unknown location) HOT 4
- cobaya-install planck_2018_highl_plik.TTTEEE fails HOT 2
- bao.generic likelihood not working for the distances of type Dv_over_rs HOT 6
- Error with the .yaml file generated from cosmo generator HOT 3
- *ERROR* Requested fast/slow separation, but all parameters have the same speed HOT 3
- NPIPE likelihood HOT 2
- Cobaya 3.5.1 and ACT HOT 2
- Sampling over HMCode params HOT 2
- module 'clik' has no attribute 'lkl' HOT 5
- pytest-forked HOT 2
- numpy 2 in tests HOT 1
- Github actions
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cobaya.