dgrin1 / axionCAMB

MIT License
19 stars 7 forks source link

Segmentation Fault #4

Closed suniverse closed 1 year ago

suniverse commented 6 years ago

Hi, I compile the code with gfortran successfully. When I run it, I got the segmentation fault error after the following info. I guess there is some bug there.

1 nu, g= 1.0133 m_nu*c^2/k_B/T_nu0= 332.50 (m_nu= 0.056 eV)

Program received signal SIGSEGV: Segmentation fault - invalid memory reference.

dgrin1 commented 6 years ago

Am you elaborate how you are compiling it and send me your ini file please ?

On Thursday, November 2, 2017, suniverse notifications@github.com wrote:

Hi, I compile the code with gfortran successfully. When I run it, I got the segmentation fault error after the following info. I guess there is some bug there.

1 nu, g= 1.0133 m_nu*c^2/k_B/T_nu0= 332.50 (m_nu= 0.056 eV)

Program received signal SIGSEGV: Segmentation fault - invalid memory reference.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/dgrin1/axionCAMB/issues/4, or mute the thread https://github.com/notifications/unsubscribe-auth/ANdnDokn-UgvZbm-BZGQOLDfxY-SEjwlks5syeQLgaJpZM4QP58Z .

suniverse commented 6 years ago

I did not do anything special. For compiling, I just changed the Makefile and uncomment the gfortran part with gfortran -ffast-math and -O2. The param.ini is the default one in the folder. My gcc version is 7.2 and I have no problem running CAMB.

dgrin1 commented 6 years ago

I am traveling today but will look into this over the weekend. Have not seen this proble before --but the code was recently updated so perhaps something is awry. Stay tuned

On Thursday, November 2, 2017, suniverse notifications@github.com wrote:

I did not do anything special. For compiling, I just changed the Makefile and uncomment the gfortran part with gfortran -ffast-math and -O2. The param.ini is the default one in the folder. My gcc version is 7.2 and I have no problem running CAMB.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/dgrin1/axionCAMB/issues/4#issuecomment-341466629, or mute the thread https://github.com/notifications/unsubscribe-auth/ANdnDjBNUy0tUf8t-b7iTpMv4k0RBDySks5syeUMgaJpZM4QP58Z .

dgrin1 commented 6 years ago

Can you clarify if you are using Gcc or gfortran ?

On Thursday, November 2, 2017, Daniel Grin dgrin@haverford.edu wrote:

I am traveling today but will look into this over the weekend. Have not seen this proble before --but the code was recently updated so perhaps something is awry. Stay tuned

On Thursday, November 2, 2017, suniverse <notifications@github.com javascript:_e(%7B%7D,'cvml','notifications@github.com');> wrote:

I did not do anything special. For compiling, I just changed the Makefile and uncomment the gfortran part with gfortran -ffast-math and -O2. The param.ini is the default one in the folder. My gcc version is 7.2 and I have no problem running CAMB.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/dgrin1/axionCAMB/issues/4#issuecomment-341466629, or mute the thread https://github.com/notifications/unsubscribe-auth/ANdnDjBNUy0tUf8t-b7iTpMv4k0RBDySks5syeUMgaJpZM4QP58Z .

suniverse commented 6 years ago

I am using gfortran for compiling.

dgrin1 commented 6 years ago

What is the exact name of the iNi file you are using

On Thursday, November 2, 2017, suniverse notifications@github.com wrote:

I am using gfortran for compiling.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/dgrin1/axionCAMB/issues/4#issuecomment-341467908, or mute the thread https://github.com/notifications/unsubscribe-auth/ANdnDsGzaaVfn8pGAzWY3j447iLyU5Vqks5syeXxgaJpZM4QP58Z .

suniverse commented 6 years ago

I just tried ./camb param.ini to test after compiling. Everything is provided by the repository.

dgrin1 commented 6 years ago

Greetings. Sorry for my slow reply file. I just did a fresh download and was able to get it to compile and run (without the error you mention) in both gfortran and ifort.

Try compiling without -ffast-math and -O2, which case problems on some machines.

Also, what is your gfortran g95 implementation (not just gcc)? Are you running on a mac or linux box?

Some of these issues have more to do with the base version of camb (November 2012) rather than any axionic modifications.

Sorry for my late reply but hope we can figure this out together if you've not yet gotten it working.

Best wishes, Dan

On Thu, Nov 2, 2017 at 11:59 AM, suniverse notifications@github.com wrote:

I just tried ./camb param.ini to test after compiling. Everything is provided by the repository.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/dgrin1/axionCAMB/issues/4#issuecomment-341469261, or mute the thread https://github.com/notifications/unsubscribe-auth/ANdnDl2KKJx2b9yUowMensWaNDYD0IJjks5syebUgaJpZM4QP58Z .

On Thu, Nov 2, 2017 at 11:56 AM, Daniel Grin dgrin@haverford.edu wrote:

What is the exact name of the iNi file you are using

On Thursday, November 2, 2017, suniverse notifications@github.com wrote:

I am using gfortran for compiling.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/dgrin1/axionCAMB/issues/4#issuecomment-341467908, or mute the thread https://github.com/notifications/unsubscribe-auth/ANdnDsGzaaVfn8pGAzWY3j447iLyU5Vqks5syeXxgaJpZM4QP58Z .

suniverse commented 6 years ago

Hi, my gfortran version is 7.2.0 and I am running on a mac. I don't get the segmentation fault after compiling without -ffast-math and -O2, but get the warning: Note: The following floating-point exceptions are signalling: IEEE_INVALID_FLAG IEEE_DIVIDE_BY_ZERO IEEE_UNDERFLOW_FLAG IEEE_DENORMAL after the result of sigma8. Is this normal? I am running $./camb params.ini with the default params.ini Thx

dgrin1 commented 6 years ago

The warning is par for the course (regular camb of that version generates that warning too but runs fine). What value of sigma8 does it output [there might be one sensitive flag there]?

DAn

On Fri, Nov 24, 2017 at 3:14 PM, suniverse notifications@github.com wrote:

Hi, my gfortran version is 7.2.0 and I am running on a mac. I don't get the segmentation fault after compiling without -ffast-math and -O2, but get the warning: Note: The following floating-point exceptions are signalling: IEEE_INVALID_FLAG IEEE_DIVIDE_BY_ZERO IEEE_UNDERFLOW_FLAG IEEE_DENORMAL after the result of sigma8. Is this normal? I am running $./camb params.ini with the default params.ini Thx

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/dgrin1/axionCAMB/issues/4#issuecomment-346891282, or mute the thread https://github.com/notifications/unsubscribe-auth/ANdnDozsEdsrSTUpcz4gc1hduePMvjcnks5s5yOtgaJpZM4QP58Z .

suniverse commented 6 years ago

I got
at z = 0.00000000 sigma8 (all matter)= 0.830405176 which sounds reasonable. By the way is there any python wrapper to use just like CAMB?

DoddyPhysics commented 6 years ago

I have had seg faults before using older versions of gfortran. Check which you are using? Version 5 with Mac ports works fine I think.

For python, we have not made axionCAMB work with pycamb yet but it would be very nice if we did.

On 24 Nov 2017 21:18, "suniverse" notifications@github.com wrote:

I got at z = 0.00000000 sigma8 (all matter)= 0.830405176 which sounds reasonable. By the way is there any python wrapper to use just like CAMB?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/dgrin1/axionCAMB/issues/4#issuecomment-346891690, or mute the thread https://github.com/notifications/unsubscribe-auth/ARTrO1oHXMemdp6Po8a23oAtTkeANDeeks5s5ySvgaJpZM4QP58Z .

dgrin1 commented 6 years ago

I think we sorted it out. She just had to change some compiler flags

On Monday, November 27, 2017, David J. E. Marsh notifications@github.com wrote:

I have had seg faults before using older versions of gfortran. Check which you are using? Version 5 with Mac ports works fine I think.

For python, we have not made axionCAMB work with pycamb yet but it would be very nice if we did.

On 24 Nov 2017 21:18, "suniverse" <notifications@github.com javascript:_e(%7B%7D,'cvml','notifications@github.com');> wrote:

I got at z = 0.00000000 sigma8 (all matter)= 0.830405176 which sounds reasonable. By the way is there any python wrapper to use just like CAMB?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/dgrin1/axionCAMB/issues/4#issuecomment-346891690, or mute the thread https://github.com/notifications/unsubscribe-auth/ ARTrO1oHXMemdp6Po8a23oAtTkeANDeeks5s5ySvgaJpZM4QP58Z .

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/dgrin1/axionCAMB/issues/4#issuecomment-347100071, or mute the thread https://github.com/notifications/unsubscribe-auth/ANdnDptIM1bhlTf5drovPeZhwtZspeOdks5s6mWTgaJpZM4QP58Z .

kangjg commented 5 years ago

Hi, how to install axionCAMB .please tell me steps in details ? thank you very much,BW!

DoddyPhysics commented 5 years ago

Hi,

There is no need to install. The fortran code runs from source after compilation. This is just as the original CAMB code is (Fortran version). There is probably detailed legacy advice for this. See the Fortran documentation on https://camb.info/

Compile using "make" inside the main folder. You must edit the Makefile and Makefile_main to have the correct Fortran compilers and flags for your system. Probably the best flag configuration is -O3 and no others. This avoids faults on newer systems and with some compilers like ifort. You run the code after using "make" as normal Fortran code: "./camb [myfile].ini" where [myfile] is you params.ini file. See the example versions.

D

On Wed, Jul 3, 2019 at 2:19 PM kangjg notifications@github.com wrote:

Hi, how to install axionCAMB .please tell me steps in details ? thank you very much,BW!

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/dgrin1/axionCAMB/issues/4?email_source=notifications&email_token=AEKOWO3CGEFDJ6UMCDHBT3TP5SKO7A5CNFSM4EB7T4M2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZEIKRY#issuecomment-508069191, or mute the thread https://github.com/notifications/unsubscribe-auth/AEKOWO3MNJTUDTSM3F5SJRLP5SKO7ANCNFSM4EB7T4MQ .

kangjg commented 5 years ago

Thank you very much, if I add axion dark matter parameters to compute cmb power spectrum cl, or matter spectrum P(k), eg. axion mass in , how to edit camb ? BW, kang,

在2019-07-29 16:18:14,David J. E. Marshnotifications@github.com写道:

Hi,

There is no need to install. The fortran code runs from source after compilation. This is just as the original CAMB code is (Fortran version). There is probably detailed legacy advice for this. See the Fortran documentation on https://camb.info/

Compile using "make" inside the main folder. You must edit the Makefile and Makefile_main to have the correct Fortran compilers and flags for your system. Probably the best flag configuration is -O3 and no others. This avoids faults on newer systems and with some compilers like ifort. You run the code after using "make" as normal Fortran code: "./camb [myfile].ini" where [myfile] is you params.ini file. See the example versions.

D

On Wed, Jul 3, 2019 at 2:19 PM kangjg notifications@github.com wrote:

Hi, how to install axionCAMB .please tell me steps in details ? thank you very much,BW!

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/dgrin1/axionCAMB/issues/4?email_source=notifications&email_token=AEKOWO3CGEFDJ6UMCDHBT3TP5SKO7A5CNFSM4EB7T4M2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZEIKRY#issuecomment-508069191, or mute the thread https://github.com/notifications/unsubscribe-auth/AEKOWO3MNJTUDTSM3F5SJRLP5SKO7ANCNFSM4EB7T4MQ .

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

DoddyPhysics commented 5 years ago

The parameters are in the params.ini file examples. For example, the axion density, mass, and isocurvature amplitude (given by Hubble during inflation).

On Mon, Jul 29, 2019 at 10:47 AM kangjg notifications@github.com wrote:

Thank you very much, if I add axion dark matter parameters to compute cmb power spectrum cl, or matter spectrum P(k), eg. axion mass in , how to edit camb ? BW, kang,

在2019-07-29 16:18:14,David J. E. Marshnotifications@github.com写道:

Hi,

There is no need to install. The fortran code runs from source after compilation. This is just as the original CAMB code is (Fortran version). There is probably detailed legacy advice for this. See the Fortran documentation on https://camb.info/

Compile using "make" inside the main folder. You must edit the Makefile and Makefile_main to have the correct Fortran compilers and flags for your system. Probably the best flag configuration is -O3 and no others. This avoids faults on newer systems and with some compilers like ifort. You run the code after using "make" as normal Fortran code: "./camb [myfile].ini" where [myfile] is you params.ini file. See the example versions.

D

On Wed, Jul 3, 2019 at 2:19 PM kangjg notifications@github.com wrote:

Hi, how to install axionCAMB .please tell me steps in details ? thank you very much,BW!

— You are receiving this because you commented. Reply to this email directly, view it on GitHub < https://github.com/dgrin1/axionCAMB/issues/4?email_source=notifications&email_token=AEKOWO3CGEFDJ6UMCDHBT3TP5SKO7A5CNFSM4EB7T4M2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZEIKRY#issuecomment-508069191 , or mute the thread < https://github.com/notifications/unsubscribe-auth/AEKOWO3MNJTUDTSM3F5SJRLP5SKO7ANCNFSM4EB7T4MQ

.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/dgrin1/axionCAMB/issues/4?email_source=notifications&email_token=AEKOWO4NPARF2GNA5YLJNKTQB2VATA5CNFSM4EB7T4M2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3ABA7I#issuecomment-515903613, or mute the thread https://github.com/notifications/unsubscribe-auth/AEKOWO7KELKW7U4BZSU5KN3QB2VATANCNFSM4EB7T4MQ .