-
Notifications
You must be signed in to change notification settings - Fork 48
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
Problem reading MILES library #29
Comments
This is odd. For some reason sps_setup is looking for a MILES library at Z=0. (whereas it should be something like Z=0.0008). So it seems like the zlegend values are being truncated. Can you let me know the output of more $SPS_HOME/SPECTRA/MILES/zlegend.dat
ls $SPS_HOME/SPECTRA/MILES/*bin |
lluis:~ lluisgalbany$ more $SPS_HOME/SPECTRA/MILES/zlegend.dat |
While I am able to run the executable 'autosps.exe' in the fsps/src folder (so fsps in fortran runs well), the problem seems to be in the python fsps.StellarPopulation function. |
hmm. well, I'm not sure why this file exists
Can you try adding the following line to WRITE(*, *) z, nzinit, zstype, zlegendinit(z) and then from the command line
and reinstall python-fsps BTW, how did you install python-fsps? pip or a development version? |
It is bizarre that what are your fsps compile flags? |
'imiles_z0..spectra.bin' that was just me trying to check if it was a truncation problem... flags for (fortran) fsps were F90FLAGS = -O3 -march=native -fPIC -cpp and this si what I got wfter reinstalling all: In [2]: import fsps In [3]: sp = fsps.StellarPopulation(compute_vega_mags=False, zcontinuous=1, sfh=0, logzsol=0.0, dust_type=2, dust2=0.2) |
and what is the output when you run autosps.exe? |
it seems to do fine! ./autosps.exe ---> Using IMF 0 Specify SFH [0-2, def:0] ---> Computing an SSP enter metallicity [1-22; def:20]: ---> Using metallicity 20 corresponding to log(Z/Zsol)= 0.00 Include default dust model? [yes/no, def:no] ---> tau1= 0.00, tau2= 0.00 Enter filename [def: "CSP.out"] ---> Output filename: CSP.out
|
Very strange. python-fsps does not touch anything in sps_setup, and indeed uses the compiled fsps/src/sps_setup.o module. All I can think is something has gone very strange in the f2py wrapping and linking process. What version of numpy are you using? |
I run OSX 10.6.4, Homebrew GCC 6.3.0, numpy 1.12.0 and do not have this problem. The only major difference from your setup besides numpy is that I don't use the march=native f90 compile flag. Maybe try without that? |
I have numpy 1.11, but I am trying to update to 1.13. |
ok. and I meant OSX 10.12.4, so similar to your OS. If you till have the problem after upgrading numpy please post the log of the python-fsps install, i.e. the output of python setup.py install. |
It works. I did something more than just updating numpy. I started a new python3.6 environment and installed everything again. It could be due to some stupid conflict in my previous python installation. thank you very much for your help! |
glad it's working! |
Wait! I just created a python2.7 environment AND I HAVE AGAIN THE SAME PROBLEM! Do you use 2.7 or 3.6? |
I use 2.7.13 So weird! |
Oh... at least I can still use fsps with python 3... just to follow up your previous comment, this is the output of python (2.7) setup.py install:
|
you have a number of entries of the form
This indeed looks like a problem with the linking. I'm not sure where it's coming from. I do note that multiple compilers were found during installation, though I think the right one does get used eventually.
You also have the following entry in the install log that I don't see in mine, which might be related?
|
also this near the very beginning seems wrong - why does the python installer think you are on OSX 10.6?
perhaps related to #15. |
with
all warnings went off. Although it still builds in '-10.6-x86_64' There is also at the beginning this warning:
|
I don't think filter_keys.txt is used anymore. Anyway I don't have it, though my install doesn't complain that it's missing. Did you try to install python-fsps using pip at some point? |
yes (to the pip installation), and I have the same problem. |
and did you make sure to pip uninstall? |
sure. |
what about that warning to f2py_size? |
I get the same warning and can't reproduce the error you get. I'm kind of at a loss. Can you do
Also just to confirm, you are still getting the same error after setting the deployment target (but no linker warnings)? |
FWIW here's the travis build script (which passed with all tested numpy and python versions on the last commit in July) |
this is what I get in my python 2.7 environment (the one not working):
and this is what I get in the default python3.6:
|
Yes! still getting the error but with no warnings after the deployment target. |
Any progress on this issue? I'm running into the same problem with python 2.7, Mac 10.13.1, gfortran 7.2.0, and numpy 1.13.3. Thanks. |
sorry no progress yet @johnnygreco. Thanks for the additional datapoint. |
Thanks @johnnygreco! Did you try any versions in between or did you go straight to 6.4.0 from 7.2.0? |
I went straight from 7.2.0 to 6.4.0. |
I do have 7.1.0. I will try downgrading to 6.4.0. |
this is all useful info, thanks. |
OS: EL7 I'm seeing a similar issue trying to use the python-fsps module:
Having done a bit of digging around and trying to execute the
Line 47 of file spec_bin.f90:
|
Hi there, I am not sure if I should start a seperate thread here but I am having a very similar issue as described where the only difference is the metallicity with which the issue seems to exist. SPS_SETUP ERROR: miles spectral library cannot be opened Z=0.0008 I have uninstalled and reinstalled FSPS on my computer as suggestd above however I am unsure if this is an issue with gcc or an update to FSPS that I may have missed. Thank you very much for your help as always! |
I am using a Mac 10.12.6, gcc 7.1.0 (but also tried with v6.3.0), and I am finding a problem when running the first instruction in prospector tutorial:
python prospector.py --param_file=demo_params.py --objid=0 --outfile=demo_obj0
gives the following error:
SPS_SETUP ERROR: miles spectral library cannot be opened Z=0.
It seems that something is being truncated.
The text was updated successfully, but these errors were encountered: