[...]
OpenBLAS blas_thread_init: pthread_create: Resource temporarily unavailableOpenBLAS blas_thread_init: RLIMIT_NPROC 4096 current, 515238 maxTraceback (most recent call last):File "/cm/shared/apps/anaconda2/lib/python2.7/site-packages/emcee/ensemble.py", line 519, in __call__return self.f(x, *self.args, **self.kwargs)File "/cm/shared/apps/anaconda2/lib/python2.7/site-packages/lmfit/minimizer.py", line 1739, in _lnpostout = userfcn(params, *userargs, **userkwargs)File "/home/metz/graphene/mc3.py", line 36, in pdf_lnprobresid = ref.objective_function(p) # get residual / recalc G_rFile "/home/metz/graphene/model.py", line 168, in objective_functionself.phase_composite(self.phases, dat, recalc=True) # get new G(r)File "/cm/shared/apps/anaconda2/pkgs/mstack_0.12.1/mstack/pairdistributionfunction.py", line 735, in phase_compositegr = self.model_composite(phase, data) # <--- weighted phase PDFFile "/cm/shared/apps/anaconda2/pkgs/mstack_0.12.1/mstack/pairdistributionfunction.py", line 684, in model_compositephase.to_models()File "/cm/shared/apps/anaconda2/pkgs/mstack_0.12.1/mstack/pairdistributionfunction.py", line 371, in to_modelsself.inter = Interface(self.phase, self.mno)File "/cm/shared/apps/anaconda2/pkgs/mstack_0.12.1/mstack/interface.py", line 251, in __init__self.update_phases(phases)File "/cm/shared/apps/anaconda2/pkgs/mstack_0.12.1/mstack/interface.py", line 228, in update_phasesself._get_lattices() # reconstruct lattice dict with new phaseFile "/cm/shared/apps/anaconda2/pkgs/mstack_0.12.1/mstack/interface.py", line 50, in _get_latticesgetattr(self.phases[p], s)))})
File "/cm/shared/apps/anaconda2/lib/python2.7/site-packages/diffpy.Structure-1.3.5-py2.7.egg/diffpy/Structure/lattice.py", line 143, in __init__self.setLatPar(a, b, c, alpha, beta, gamma, baserot=baserot)File "/cm/shared/apps/anaconda2/lib/python2.7/site-packages/diffpy.Structure-1.3.5-py2.7.egg/diffpy/Structure/lattice.py", line 201, in setLatParself.recbase = numalg.inv(self.base)File "/cm/shared/apps/anaconda2/lib/python2.7/site-packages/numpy/linalg/linalg.py", line 513, in invainv = _umath_linalg.inv(a, signature=signature, extobj=extobj)KeyboardInterruptProcess PoolWorker-102:Traceback (most recent call last):File "/cm/shared/apps/anaconda2/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrapself.run()File "/cm/shared/apps/anaconda2/lib/python2.7/multiprocessing/process.py", line 114, in runself._target(*self._args, **self._kwargs)File "/cm/shared/apps/anaconda2/lib/python2.7/multiprocessing/pool.py", line 113, in workerresult = (True, func(*args, **kwds))File "/cm/shared/apps/anaconda2/lib/python2.7/multiprocessing/pool.py", line 65, in mapstarreturn map(*args)File "/cm/shared/apps/anaconda2/lib/python2.7/site-packages/emcee/ensemble.py", line 519, in __call__return self.f(x, *self.args, **self.kwargs)File "/cm/shared/apps/anaconda2/lib/python2.7/site-packages/lmfit/minimizer.py", line 1739, in _lnpostout = userfcn(params, *userargs, **userkwargs)File "/home/metz/graphene/mc3.py", line 36, in pdf_lnprobresid = ref.objective_function(p) # get residual / recalc G_rFile "/home/metz/graphene/model.py", line 168, in objective_functionself.phase_composite(self.phases, dat, recalc=True) # get new G(r)File "/cm/shared/apps/anaconda2/pkgs/mstack_0.12.1/mstack/pairdistributionfunction.py", line 735, in phase_compositegr = self.model_composite(phase, data) # <--- weighted phase PDFFile "/cm/shared/apps/anaconda2/pkgs/mstack_0.12.1/mstack/pairdistributionfunction.py", line 684, in model_compositephase.to_models()File "/cm/shared/apps/anaconda2/pkgs/mstack_0.12.1/mstack/pairdistributionfunction.py", line 371, in to_modelsself.inter = Interface(self.phase, self.mno)File "/cm/shared/apps/anaconda2/pkgs/mstack_0.12.1/mstack/interface.py", line 251, in __init__self.update_phases(phases)File "/cm/shared/apps/anaconda2/pkgs/mstack_0.12.1/mstack/interface.py", line 228, in update_phasesself._get_lattices() # reconstruct lattice dict with new phaseFile "/cm/shared/apps/anaconda2/pkgs/mstack_0.12.1/mstack/interface.py", line 50, in _get_latticesgetattr(self.phases[p], s)))})File "/cm/shared/apps/anaconda2/lib/python2.7/site-packages/diffpy.Structure-1.3.5-py2.7.egg/diffpy/Structure/lattice.py", line 143, in __init__self.setLatPar(a, b, c, alpha, beta, gamma, baserot=baserot)File "/cm/shared/apps/anaconda2/lib/python2.7/site-packages/diffpy.Structure-1.3.5-py2.7.egg/diffpy/Structure/lattice.py", line 201, in setLatParself.recbase = numalg.inv(self.base)File "/cm/shared/apps/anaconda2/lib/python2.7/site-packages/numpy/linalg/linalg.py", line 513, in invainv = _umath_linalg.inv(a, signature=signature, extobj=extobj)
def pdf_lnprob(p, ref, dat):
# get model componentsresid = ref.objective_function(p) # get residual / recalc G_rmodel = ref.composite[dat.name] # get computed G_r# evaluate log likelihood functionlnf = ref.params['lnf'].valueinv_sigma2 = 1. / (model[:, 1] ** 2 * np.exp(2 * lnf)) # weightingrv = -1./2. * np.sum(resid ** 2 * inv_sigma2 - np.log(inv_sigma2))return rv
#!/bin/sh#SBATCH -N 4#SBATCH -n 40#SBATCH -t 24:00:00#SBATCH -J pmetz%j#SBATCH -o pmetz100.out#SBATCH -e pmetz100.err# mpiexec ipython disordered_constrained_fit.py # <-- this was a mistake, calling mpiexec with a python MPI pool messes things uppython mc100core.py # <--- script containing the above code snippets
Hi Matt,
That's how I'm reading it as well.
I've run another test case with a simpler objective function and noted that I can extend beyond 99 cpu.
I think perhaps this is a memory allocation issue? Either way, I think you're correct and it is not a restriction on the emcee / lmfit side, which you have helpfully confirmed.
I'll summarize the solution here for posterity if I come up with something.