Comments (9)
Update: apparently, the problem happens when mspectrum starts to calculate emission lines. If I calculate only the continuum, then the calculations are faster. But if I set DoLines = True the routine takes every available core.
from chiantipy.
Hi Rogelio,
in mspectrum you can set the keyword argument proc = 2, or whatever number of cores you want it to use. The current default value is 3.
hope this helps,
Ken
from chiantipy.
This happens even if I set to 2 the number of cores. Does the keyword argument proc refers to the physical processors of the machine? Or is meant to be the total number of available cpus? When I run the routine in a machine with 48 cpus and I set proc = 10, this happens, again only when I set Dolines = True. If I only calculate the continuum, the mspectrum respects the maximum number of processes I set with the proc argument.
-Rogelio.
from chiantipy.
It should set the number of cores that you want to use.
Ken
from chiantipy.
@Rogerthatx What happens if you compute the intensity for a single ion, ie without using the mspectrum
class? I think it may be that the NumPy linalg.solve
call used for the level populations may implicitly use all available cores depending on how you've installed NumPy. As such, you would see all cores being used independent of what option you're passing to nproc
from chiantipy.
When I calculate the intensity for a single ion with ch.ion, it does not change the cpu load, the calculations are done instantly. I did another test,first I calculated the intensity, and then I calculated the spectrum of a single ion with my_ion.spectrum(wvl). The calculations are done almost instantly but this function seem to be taking all the cores for a moment to do the calculations.
from chiantipy.
I checked whether setting proc is effective and it seems that it is now working correctly. On my cpu, setting proc=4 and all 6 cores are used.
I am looking into this.
from chiantipy.
also, if you only calculate the line radiations (doLine = False), the only a single core is involved.
still checking
from chiantipy.
I have been looking into the matter and doing some testing. It seems that it is not possible to limit the multiprocessing queues to a single core. Also, sometimes you do not get increased speed for some problems. You might want to time the single processor spectrum vs. mspectrum for a small problems (set minAbund = 1.e-4, a small number of wavelengths ...) and see which is faster etc.
There is a bug in mspectrum and will try to chase that down
Ken
from chiantipy.
Related Issues (20)
- Error on running provided jupyter notebooks in the repo HOT 3
- line identifications in spectrum plot HOT 13
- Ability to give custom abundance files HOT 8
- Error while using spectrum with elementList only when all the ions are not present in the masterlist HOT 7
- Unexpected behavior when setting minAbund lower than lowest abund HOT 3
- Error when giving "Zn" in elementlist HOT 2
- How much memory does the mspectrum process consumes? HOT 1
- Chianti is taking more threads than specified HOT 2
- Clarify emission measure units in the function documentations. HOT 2
- Question: Support for photons/keV completed? HOT 10
- Getting spectrum from Ch.spectrum without smoothing/filtering HOT 4
- IDL and ChiantiPy gives different results. HOT 4
- Possible typo in function's documentation HOT 1
- NaNs generated when calculating spectra under certain conditions HOT 9
- Upload 0.15.1 to PyPI HOT 3
- Non-ionization equilibrium? HOT 2
- Unable to load ioneq HOT 10
- Two-photon calculation? HOT 1
- Unable to import ChiantiPy.core as ch HOT 2
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 chiantipy.