Coder Social home page Coder Social logo

cosmo-ethz / cosmohammer Goto Github PK

View Code? Open in Web Editor NEW
17.0 17.0 11.0 1.62 MB

Cosmological parameter estimation with the MCMC Hammer, please use https://cosmo-gitlab.phys.ethz.ch/cosmo/CosmoHammer, this repository is outdated ! Docs at http://cosmo-docs.phys.ethz.ch/cosmoHammer/

License: GNU General Public License v3.0

Makefile 1.35% Python 98.65%
cosmology eth-zurich markov-chains outdated

cosmohammer's People

Contributors

cosmo-ethz avatar jakeret avatar sibirrer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cosmohammer's Issues

How to resume sampling to make the chain longer?

My machine runs into a memory limit exceeded error when trying to run the sampler for a long number of iteration with lots of walkers. I looked at the code for the source of the error and it looks like Emcee needs to create the entire array with dimension (nwalker, niteration, ndim) at initiation and then concatenates that array to some other array which requires twice the amount of memory needed to store the entire chain. I am thinking to circumvent this issue by running the chain for smaller number of iterations, then storing the chain into hard disk, then resuming sampling from last iteration state, and doing this repetitively until the desired chain length is achieved. Is it possible to resume sampling from the last iteration state and automatically save the newly sampled states at the end of the already saved output files? If so, how can this be done?

Pickling error in Python 3 with MPI

Below is the error that I received (Python: 3.6.1, openmpi: 1.4).

Traceback (most recent call last):
  File "/u/home/a/ajshajib/mybin/lenstronomy/lenstronomy/Sampling/sampler.py", line 67, in pso
    for swarm in pso.sample(n_iterations):
  File "/u/home/a/ajshajib/mybin/CosmoHammer/cosmoHammer/pso/ParticleSwarmOptimizer.py", line 78, in sample
    self._get_fitness(self.swarm)
  File "/u/home/a/ajshajib/mybin/CosmoHammer/cosmoHammer/pso/MpiParticleSwarmOptimizer.py", line 51, in _get_fitness
    results =  mapFunction(self.func, pos)
  File "/u/home/a/ajshajib/mybin/CosmoHammer/cosmoHammer/util/MpiUtil.py", line 43, in map
    self.mapFunction(function, splitList(sequence,size)[rank])))
  File "mpi4py/MPI/Comm.pyx", line 1272, in mpi4py.MPI.Comm.allgather
  File "mpi4py/MPI/msgpickle.pxi", line 770, in mpi4py.MPI.PyMPI_allgather
  File "mpi4py/MPI/msgpickle.pxi", line 104, in mpi4py.MPI.Pickle.dump
  File "mpi4py/MPI/msgpickle.pxi", line 91, in mpi4py.MPI.Pickle.cdumps
TypeError: can't pickle module objects

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.