GALPROP
https://galprop.stanford.edu/forum/

problems when compiling
https://galprop.stanford.edu/forum/viewtopic.php?f=6&t=194
Page 1 of 2

Author:  grbzxh [ Wed Jan 07, 2015 2:18 am ]
Post subject:  problems when compiling

Hi,
I am having two problems when I compile GALPROP 54. First, when I run "./configure", I got the warning that no galdef and fitsdata are found. How can I get them?
".........
checking for galdef... no
checking for fitsdata... no
configure: creating ./config.status
config.status: creating Makefile
config.status: creating source/Makefile
config.status: creating galprop-config
config.status: WARNING: 'galprop-config.in' seems to ignore the --datarootdir setting
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
config.status: executing libtool commands
configure: Optional packages not found or deactivated on this system:
configure: GALDEF FITSDATA"



Second, when I run 'sudo make' , there's an error:
"...
make[1]: entering the directory `/home/zxh/Downloads/galprop/galprop-54.0.509/source'
f77 -O3 -Wall -c -o WNEWTR_FUNC_aws.o WNEWTR_FUNC_aws.f
set_sigma:
Error on line 45: Declaration error length must be a positive integer constant
wsigma:
sectotal:
wdecay:
sigma:
Warning on line 498: local variable i never used
Warning on line 498: local variable j never used
Warning on line 498: local variable k never used
sighe:
edep:
/usr/bin/f77: aborting compilation
..."
I opened the file "WNEWTR_FUNC_aws.f" and found the defination of "CHARACTER*(FNLENGTH) FILENAME" in line 45 doesn't work in in f77. I don't how to revise it in f77 format. Can anyone help me?

Thanks.

Xiaohong

Author:  strong [ Wed Jan 07, 2015 2:29 am ]
Post subject:  Re: problems when compiling

What was your full ./configure command?
Can you say which revision you are using, see http://sourceforge.net/projects/galprop/
The README has updated instructions.
The f77 problem seems new, I never encountered it before. I has been working since the last change in 2002.

Author:  gudlaugu [ Wed Jan 07, 2015 3:27 am ]
Post subject:  Re: problems when compiling

grbzxh wrote:
Hi,
I am having two problems when I compile GALPROP 54. First, when I run "./configure", I got the warning that no galdef and fitsdata are found. How can I get them?
".........
configure: Optional packages not found or deactivated on this system:
configure: GALDEF FITSDATA"

You can ignore these messages. The GALDEF and FITSDATA are not really packages. These pseudo packages can be used to point galprop to the default GALDEF directory containing your galdef files and the default FITSDATA directory containing the gasmaps and isrf files. You can specify those using the switches --with-galdef=/path/to/GALDEF and --with-fitsdata=/path/to/FITS. The default values are ../FITS and ../GALDEF and they can be overridden on the galprop command line with the -f and -g switches.

grbzxh wrote:
Second, when I run 'sudo make' , there's an error:
"...
make[1]: entering the directory `/home/zxh/Downloads/galprop/galprop-54.0.509/source'
f77 -O3 -Wall -c -o WNEWTR_FUNC_aws.o WNEWTR_FUNC_aws.f
set_sigma:
Error on line 45: Declaration error length must be a positive integer constant
/usr/bin/f77: aborting compilation
..."
I opened the file "WNEWTR_FUNC_aws.f" and found the defination of "CHARACTER*(FNLENGTH) FILENAME" in line 45 doesn't work in in f77. I don't how to revise it in f77 format. Can anyone help me?

This seems to be an issue with your f77 compiler. We only support recent versions (within 5 years or so) of the intel and gcc compilers. If there is no way for you to use another compiler, you can modify the function and hardcode the string length of FILENAME. Make sure you choose a size that is large enough to contain the full path to the data files. Using 1000 should be safe on most systems. Line 45 would then read " CHARACTER*(1000) FILENAME".

Author:  strong [ Wed Jan 07, 2015 3:34 am ]
Post subject:  Re: problems when compiling

indeed, this has been running under f77 compilers for at least ten years, so is certainly standard. if using gnu compilers, then gfortran is the one to use, which can be specified via ./configure: F77=gfortran

Author:  grbzxh [ Wed Jan 07, 2015 6:36 pm ]
Post subject:  Re: problems when compiling

strong wrote:
What was your full ./configure command?
Can you say which revision you are using, see http://sourceforge.net/projects/galprop/
The README has updated instructions.
The f77 problem seems new, I never encountered it before. I has been working since the last change in 2002.


I just used "sudo ./configure" without any parameter. It seems the problem is from the old version of f77.

Author:  grbzxh [ Wed Jan 07, 2015 6:57 pm ]
Post subject:  Re: problems when compiling

gudlaugu wrote:
grbzxh wrote:
Hi,
I am having two problems when I compile GALPROP 54. First, when I run "./configure", I got the warning that no galdef and fitsdata are found. How can I get them?
".........
configure: Optional packages not found or deactivated on this system:
configure: GALDEF FITSDATA"

You can ignore these messages. The GALDEF and FITSDATA are not really packages. These pseudo packages can be used to point galprop to the default GALDEF directory containing your galdef files and the default FITSDATA directory containing the gasmaps and isrf files. You can specify those using the switches --with-galdef=/path/to/GALDEF and --with-fitsdata=/path/to/FITS. The default values are ../FITS and ../GALDEF and they can be overridden on the galprop command line with the -f and -g switches.

I can't find the GALDEF directories. There is only a "FITS" directory containing a "ISRF" file and several fits files with the name of "rbands..." after galprop-54_data_042611.tar.gz and galprop-54_data_111612_addon.tar.gz are uncompressed. Do you mean GALDEF and FITSDATA will be generated when correctly compiling?

grbzxh wrote:
Second, when I run 'sudo make' , there's an error:
"...
make[1]: entering the directory `/home/zxh/Downloads/galprop/galprop-54.0.509/source'
f77 -O3 -Wall -c -o WNEWTR_FUNC_aws.o WNEWTR_FUNC_aws.f
set_sigma:
Error on line 45: Declaration error length must be a positive integer constant
/usr/bin/f77: aborting compilation
..."
I opened the file "WNEWTR_FUNC_aws.f" and found the defination of "CHARACTER*(FNLENGTH) FILENAME" in line 45 doesn't work in in f77. I don't how to revise it in f77 format. Can anyone help me?

This seems to be an issue with your f77 compiler. We only support recent versions (within 5 years or so) of the intel and gcc compilers. If there is no way for you to use another compiler, you can modify the function and hardcode the string length of FILENAME. Make sure you choose a size that is large enough to contain the full path to the data files. Using 1000 should be safe on most systems. Line 45 would then read " CHARACTER*(1000) FILENAME".


Got it. I can use other compilers, such as ifort and gfortran but I didn't know I can choose different compilers. Thanks.

Author:  grbzxh [ Wed Jan 07, 2015 7:17 pm ]
Post subject:  Re: problems when compiling

strong wrote:
indeed, this has been running under f77 compilers for at least ten years, so is certainly standard. if using gnu compilers, then gfortran is the one to use, which can be specified via ./configure: F77=gfortran


Thanks. It works now by specifying compiler, but there are other errors like "HealpixBaseExtended.cc:8: error: too few template-parameter-lists". Does it mean Healpix is not installed correctly?

Author:  gudlaugu [ Thu Jan 08, 2015 5:02 am ]
Post subject:  Re: problems when compiling

grbzxh wrote:
Thanks. It works now by specifying compiler, but there are other errors like "HealpixBaseExtended.cc:8: error: too few template-parameter-lists". Does it mean Healpix is not installed correctly?


Version 54 has not been updated to use Healpix v3. You can safely comment out the function "int Healpix_Base::ring_above (double z) const" in that file.

Author:  grbzxh [ Fri Jan 09, 2015 1:23 am ]
Post subject:  Re: problems when compiling

gudlaugu wrote:
grbzxh wrote:
Thanks. It works now by specifying compiler, but there are other errors like "HealpixBaseExtended.cc:8: error: too few template-parameter-lists". Does it mean Healpix is not installed correctly?


Version 54 has not been updated to use Healpix v3. You can safely comment out the function "int Healpix_Base::ring_above (double z) const" in that file.


I installed Healpix 2.20a. I commented out this function,but still failed to compile. An error seems from gcc. So I reinstalled gcc and reconfigure, this error appeared:
"...
checking whether the C compiler works... no
configure: error: in `/home/zxh/Downloads/galprop/galprop-54.0.572':
configure: error: C compiler cannot create executables
See `config.log' for more details
...
"
I tried several versions of gcc, such as 4.4,4.6, 4.7 and 4.9, the same errors remained. I opened the config.log and found these seems to be related:
"...
Target: i686-linux-gnu
79 Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.6.4-1ubuntu1~12.04' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c
80 Thread model: posix
81 gcc version 4.6.4 (Ubuntu/Linaro 4.6.4-1ubuntu1~12.04)
82 configure:3697: $? = 0
83 configure:3686: gcc -V >&5
84 gcc: error: unrecognized option '-V'
85 gcc: fatal error: no input files
86 compilation terminated.
87 configure:3697: $? = 4
88 configure:3686: gcc -qversion >&5
89 gcc: error: unrecognized option '-qversion'
90 gcc: fatal error: no input files
91 compilation terminated.
92 configure:3697: $? = 4
93 configure:3717: checking whether the C compiler works
94 configure:3739: gcc conftest.c >&5
95 /usr/bin/ld: 1: /usr/bin/ld: Syntax error: "(" unexpected
96 collect2: ld returned 2 exit status
97 configure:3743: $? = 1
98 configure:3781: result: no
99 configure: failed program was:
100 | /* confdefs.h */
101 | #define PACKAGE_NAME "GalProp"
102 | #define PACKAGE_TARNAME "galprop"
103 | #define PACKAGE_VERSION "54.0.572"
104 | #define PACKAGE_STRING "GalProp 54.0.572"
105 | #define PACKAGE_BUGREPORT ""
106 | #define PACKAGE_URL ""
107 | #define PACKAGE "galprop"
108 | #define VERSION "54.0.572"
109 | /* end confdefs.h. */
110 |
111 | int
112 | main ()
113 | {
114 |
115 | ;
116 | return 0;
117 | }
118 configure:3786: error: in `/home/zxh/Downloads/galprop/galprop-54.0.572':
119 configure:3788: error: C compiler cannot create executables
120 See `config.log' for more details
..."

What's the problem? Thank you.

Author:  gudlaugu [ Fri Jan 09, 2015 3:53 am ]
Post subject:  Re: problems when compiling

I have never seen this issue before. This is also in the part of the configuration that is doing basic checks for the compiler and is standard autoconf. The stop is much sooner than you reached before and indicates that the compiler you are using does not work properly.

I suggest you start from scratch with a freshly untarred galprop using the Healpix 2.20a library. From your error message it seems you are using ubuntu. The gcc compiler that comes by default with the ubuntu installation should work, just make sure you set F77 to point to the gfortran compiler.

Author:  grbzxh [ Mon Jan 12, 2015 1:41 am ]
Post subject:  Re: problems when compiling

gudlaugu wrote:
I have never seen this issue before. This is also in the part of the configuration that is doing basic checks for the compiler and is standard autoconf. The stop is much sooner than you reached before and indicates that the compiler you are using does not work properly.

I suggest you start from scratch with a freshly untarred galprop using the Healpix 2.20a library. From your error message it seems you are using ubuntu. The gcc compiler that comes by default with the ubuntu installation should work, just make sure you set F77 to point to the gfortran compiler.


Thank you. I understand this should be the problem of c or c++ compiler. It is strange all the solutions of the error in the internet didn't work to my ubuntu system. I have tried several versions of the galprop code. The error remained. Crazy.

Author:  strong [ Mon Jan 12, 2015 1:49 am ]
Post subject:  Re: problems when compiling

the current release is compatible with Healpix 3.11
http://sourceforge.net/projects/galprop/

Author:  grbzxh [ Wed Jan 14, 2015 12:13 am ]
Post subject:  Re: problems when compiling

strong wrote:
the current release is compatible with Healpix 3.11
http://sourceforge.net/projects/galprop/


Thank you! I have installed galprop_54_r2504 by updating the system from 12.04 to ubuntu 14.04 and nearly all the weird errors disappeared. I also thank Gudlaugur Johannesson for help!

Author:  strong [ Wed Jan 14, 2015 12:33 am ]
Post subject:  Re: problems when compiling

good, and thanks for your feedback, it is very useful for us.

Author:  grbzxh [ Wed Jan 14, 2015 7:10 pm ]
Post subject:  Re: problems when compiling

strong wrote:
good, and thanks for your feedback, it is very useful for us.


To test the code, I executed ./source/galprop -r reltest19, but an error is "Failed to open skymap "/home/zxh/Downloads/galprop/galprop_54_r2504/FITS/rbands_hi12_v2_qdeg_zmax1_Ts125_EBV2.0_localring_4.fits". I checked the directory and found there are "rbands_co10mm_v3_2001_hdeg.fits.gz", "rbands_hi12_v2_qdeg_zmax1_Ts150_EBV_mag2_limit.fits.gz", "rbands_hi12_v2_qdeg_zmax1_Ts150_EBV_mag5_limit.fits.gz", "rbands_hi12_v2_qdeg_zmax1_Ts100000_EBV_mag2_limit.fits.gz", "rbands_hi12_v2_qdeg_zmax1_Ts100000_EBV_mag5_limit.fits.gz" and "rbands_hi12_v5_hdeg_zmax1_Ts125.fits.gz" and NO "rbands_hi12_v2_qdeg_zmax1_Ts125_EBV2.0_localring_4.fits". Is the file "rbands_hi12_v2_qdeg_zmax1_Ts125_EBV2.0_localring_4.fits" a latest skymap file? How can I get it?

Page 1 of 2 All times are UTC - 8 hours [ DST ]
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/