CAMB Undefined Reference
CAMB Undefined Reference
Hi,
I have modified w_lam and cs2_lam to vary with a in equations.f90, but even though that file compiles fine, I get the following errors when I run make :
ipo: remark #11005: generating object file /tmp/ipo_ifortutcANT.o
/tmp/ipo_ifortutcANT.o: In function `gaugeinterface_mp_derivs_':
ipo_out.f:(.text+0x110e0): undefined reference to `w_lam_'
ipo_out.f:(.text+0x11114): undefined reference to `w_lam_'
ipo_out.f:(.text+0x11482): undefined reference to `w_lam_'
ipo_out.f:(.text+0x1150b): undefined reference to `w_lam_'
ipo_out.f:(.text+0x118d5): undefined reference to `w_lam_'
/tmp/ipo_ifortutcANT.o:ipo_out.f:(.text+0x1335c): more undefined references to `w_lam_' follow
/tmp/ipo_ifortutcANT.o: In function `gaugeinterface_mp_derivs_':
ipo_out.f:(.text+0x136a7): undefined reference to `cs2_lam_'
ipo_out.f:(.text+0x136dd): undefined reference to `w_lam_'
ipo_out.f:(.text+0x13712): undefined reference to `w_lam_'
ipo_out.f:(.text+0x13748): undefined reference to `w_lam_'
ipo_out.f:(.text+0x1377e): undefined reference to `w_lam_'
ipo_out.f:(.text+0x13859): undefined reference to `cs2_lam_'
ipo_out.f:(.text+0x1388f): undefined reference to `cs2_lam_'
ipo_out.f:(.text+0x138c4): undefined reference to `w_lam_'
/tmp/ipo_ifortutcANT.o: In function `gaugeinterface_mp_copyscalarvariablearray_':
ipo_out.f:(.text+0x15c18): undefined reference to `w_lam_'
/tmp/ipo_ifortutcANT.o: In function `gaugeinterface_mp_setupscalararrayindices_':
ipo_out.f:(.text+0x162a4): undefined reference to `w_lam_'
make: *** [camb] Error 1
Do I need to make any changes to any other files for this to work?
Thanks in advance,
Joel
I have modified w_lam and cs2_lam to vary with a in equations.f90, but even though that file compiles fine, I get the following errors when I run make :
ipo: remark #11005: generating object file /tmp/ipo_ifortutcANT.o
/tmp/ipo_ifortutcANT.o: In function `gaugeinterface_mp_derivs_':
ipo_out.f:(.text+0x110e0): undefined reference to `w_lam_'
ipo_out.f:(.text+0x11114): undefined reference to `w_lam_'
ipo_out.f:(.text+0x11482): undefined reference to `w_lam_'
ipo_out.f:(.text+0x1150b): undefined reference to `w_lam_'
ipo_out.f:(.text+0x118d5): undefined reference to `w_lam_'
/tmp/ipo_ifortutcANT.o:ipo_out.f:(.text+0x1335c): more undefined references to `w_lam_' follow
/tmp/ipo_ifortutcANT.o: In function `gaugeinterface_mp_derivs_':
ipo_out.f:(.text+0x136a7): undefined reference to `cs2_lam_'
ipo_out.f:(.text+0x136dd): undefined reference to `w_lam_'
ipo_out.f:(.text+0x13712): undefined reference to `w_lam_'
ipo_out.f:(.text+0x13748): undefined reference to `w_lam_'
ipo_out.f:(.text+0x1377e): undefined reference to `w_lam_'
ipo_out.f:(.text+0x13859): undefined reference to `cs2_lam_'
ipo_out.f:(.text+0x1388f): undefined reference to `cs2_lam_'
ipo_out.f:(.text+0x138c4): undefined reference to `w_lam_'
/tmp/ipo_ifortutcANT.o: In function `gaugeinterface_mp_copyscalarvariablearray_':
ipo_out.f:(.text+0x15c18): undefined reference to `w_lam_'
/tmp/ipo_ifortutcANT.o: In function `gaugeinterface_mp_setupscalararrayindices_':
ipo_out.f:(.text+0x162a4): undefined reference to `w_lam_'
make: *** [camb] Error 1
Do I need to make any changes to any other files for this to work?
Thanks in advance,
Joel
-
- Posts: 1951
- Joined: September 23 2004
- Affiliation: University of Sussex
- Contact:
Re: CAMB Undefined Reference
turn off compiler optimization and turn on compiler debugging options for diagnostics.
CAMB Undefined Reference
Thanks! I ended up needing to make a separate function for w_lam instead of including a definition in the module LambdaGeneral.
Now, however, I had been getting an ambiguous segmentation error, depending on the form of w_lam that I enter (for forms that require less calculation, there is no error). I then used a debugging option and took off optimization to see the detailed errors when running ./camb params.ini to generate Cls:
Age of universe/GYr = NaN
Reion redshift = 10.680
Om_b h^2 = 0.022600
Om_c h^2 = 0.112000
Om_nu h^2 = 0.000000
Om_Lambda = 0.725306
Om_K = 0.000000
Om_m (1-Om_K-Om_L) = 0.274694
100 theta (CosmoMC) = 1.025556
forrtl: severe (408): fort: (3): Subscript #1 of the array XREC has value -2147483647 which is less than the lower bound of 1
Image PC Routine Line Source
camb 00000000006A28CD Unknown Unknown Unknown
camb 00000000006A13D5 Unknown Unknown Unknown
camb 0000000000647A20 Unknown Unknown Unknown
camb 00000000005FAB6F Unknown Unknown Unknown
camb 00000000005FAF72 Unknown Unknown Unknown
camb 0000000000456D3B recombination_mp_ 443 recfast.f90
camb 00000000004A3131 thermodata_mp_ini 2269 modules.f90
camb 000000000059B59E cambmain_mp_initv 623 cmbmain.f90
camb 0000000000593905 cambmain_mp_cmbma 159 cmbmain.f90
camb 00000000005EFD62 camb_mp_camb_getr 122 camb.f90
camb 00000000005F79D5 MAIN__ 303 inidriver.F90
camb 000000000040384C Unknown Unknown Unknown
libc.so.6 0000003EAA61D994 Unknown Unknown Unknown
camb 0000000000403759 Unknown Unknown Unknown
I then changed the integration step number from an integer to a double, only to get this:
Age of universe/GYr = NaN
Reion redshift = 10.680
Om_b h^2 = 0.022600
Om_c h^2 = 0.112000
Om_nu h^2 = 0.000000
Om_Lambda = 0.725306
Om_K = 0.000000
Om_m (1-Om_K-Om_L) = 0.274694
100 theta (CosmoMC) = 1.025556
forrtl: severe (408): fort: (2): Subscript #1 of the array Y2 has value 1 which is greater than the upper bound of 0
Image PC Routine Line Source
camb 00000000006A28CD Unknown Unknown Unknown
camb 00000000006A13D5 Unknown Unknown Unknown
camb 0000000000647A20 Unknown Unknown Unknown
camb 00000000005FAB6F Unknown Unknown Unknown
camb 00000000005FAF72 Unknown Unknown Unknown
camb 0000000000439BAD spline_ 266 subroutines.f90
camb 0000000000459663 recombination_mp_ 706 recfast.f90
camb 00000000004A1799 thermodata_mp_ini 2184 modules.f90
camb 000000000059B59E cambmain_mp_initv 623 cmbmain.f90
camb 0000000000593905 cambmain_mp_cmbma 159 cmbmain.f90
camb 00000000005EFD62 camb_mp_camb_getr 122 camb.f90
camb 00000000005F79D5 MAIN__ 303 inidriver.F90
camb 000000000040384C Unknown Unknown Unknown
libc.so.6 0000003EAA61D994 Unknown Unknown Unknown
camb 0000000000403759 Unknown Unknown Unknown
Y2 is the output for a second derivative calculation in recfast, but I'm puzzled as to how to actually fix this one.
Now, however, I had been getting an ambiguous segmentation error, depending on the form of w_lam that I enter (for forms that require less calculation, there is no error). I then used a debugging option and took off optimization to see the detailed errors when running ./camb params.ini to generate Cls:
Age of universe/GYr = NaN
Reion redshift = 10.680
Om_b h^2 = 0.022600
Om_c h^2 = 0.112000
Om_nu h^2 = 0.000000
Om_Lambda = 0.725306
Om_K = 0.000000
Om_m (1-Om_K-Om_L) = 0.274694
100 theta (CosmoMC) = 1.025556
forrtl: severe (408): fort: (3): Subscript #1 of the array XREC has value -2147483647 which is less than the lower bound of 1
Image PC Routine Line Source
camb 00000000006A28CD Unknown Unknown Unknown
camb 00000000006A13D5 Unknown Unknown Unknown
camb 0000000000647A20 Unknown Unknown Unknown
camb 00000000005FAB6F Unknown Unknown Unknown
camb 00000000005FAF72 Unknown Unknown Unknown
camb 0000000000456D3B recombination_mp_ 443 recfast.f90
camb 00000000004A3131 thermodata_mp_ini 2269 modules.f90
camb 000000000059B59E cambmain_mp_initv 623 cmbmain.f90
camb 0000000000593905 cambmain_mp_cmbma 159 cmbmain.f90
camb 00000000005EFD62 camb_mp_camb_getr 122 camb.f90
camb 00000000005F79D5 MAIN__ 303 inidriver.F90
camb 000000000040384C Unknown Unknown Unknown
libc.so.6 0000003EAA61D994 Unknown Unknown Unknown
camb 0000000000403759 Unknown Unknown Unknown
I then changed the integration step number from an integer to a double, only to get this:
Age of universe/GYr = NaN
Reion redshift = 10.680
Om_b h^2 = 0.022600
Om_c h^2 = 0.112000
Om_nu h^2 = 0.000000
Om_Lambda = 0.725306
Om_K = 0.000000
Om_m (1-Om_K-Om_L) = 0.274694
100 theta (CosmoMC) = 1.025556
forrtl: severe (408): fort: (2): Subscript #1 of the array Y2 has value 1 which is greater than the upper bound of 0
Image PC Routine Line Source
camb 00000000006A28CD Unknown Unknown Unknown
camb 00000000006A13D5 Unknown Unknown Unknown
camb 0000000000647A20 Unknown Unknown Unknown
camb 00000000005FAB6F Unknown Unknown Unknown
camb 00000000005FAF72 Unknown Unknown Unknown
camb 0000000000439BAD spline_ 266 subroutines.f90
camb 0000000000459663 recombination_mp_ 706 recfast.f90
camb 00000000004A1799 thermodata_mp_ini 2184 modules.f90
camb 000000000059B59E cambmain_mp_initv 623 cmbmain.f90
camb 0000000000593905 cambmain_mp_cmbma 159 cmbmain.f90
camb 00000000005EFD62 camb_mp_camb_getr 122 camb.f90
camb 00000000005F79D5 MAIN__ 303 inidriver.F90
camb 000000000040384C Unknown Unknown Unknown
libc.so.6 0000003EAA61D994 Unknown Unknown Unknown
camb 0000000000403759 Unknown Unknown Unknown
Y2 is the output for a second derivative calculation in recfast, but I'm puzzled as to how to actually fix this one.
Re: CAMB Undefined Reference
camb 0000000000439BAD spline_ 266 subroutines.f90
camb 0000000000459663 recombination_mp_ 706 recfast.f90
camb 00000000004A1799 thermodata_mp_ini 2184 modules.f90
camb 000000000059B59E cambmain_mp_initv 623 cmbmain.f90
camb 0000000000593905 cambmain_mp_cmbma 159 cmbmain.f90
camb 00000000005EFD62 camb_mp_camb_getr 122 camb.f90
camb 00000000005F79D5 MAIN__ 303 inidriver.F90
camb 000000000040384C Unknown Unknown Unknown
libc.so.6 0000003EAA61D994 Unknown Unknown Unknown
camb 0000000000403759 Unknown Unknown Unknown
Y2 is the output for a second derivative calculation in recfast, but I'm puzzled as to how to actually fix this one.
Dont know if you introduced Y2 (I suppose not).
You can look for the line_numbers in each file, which are indicated from debug above. Then check if Y2 has been allocated correctly.
But obviously your modification or new variables you introduced caused defunction of subroutine_spine in file subroutines.f90.
So then check your variables or modifications.
Good luck,
CAMB Undefined Reference
In my opinion, you should define functions of w and c^{2}_{s} and do more modifications.