It is currently Sun Nov 28, 2021 5:38 pm

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 21 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: problems when compiling
PostPosted: Wed Jan 07, 2015 2:18 am 
Offline

Joined: Wed Dec 31, 2014 1:31 am
Posts: 10
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


Top
 Profile  
 
PostPosted: Wed Jan 07, 2015 2:29 am 
Offline

Joined: Wed May 17, 2006 7:02 am
Posts: 285
Location: MPE Garching
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.

_________________
Andy Strong, MPE


Top
 Profile  
 
PostPosted: Wed Jan 07, 2015 3:27 am 
Offline
Site Admin

Joined: Fri Jul 18, 2008 3:04 pm
Posts: 60
Location: Stanford
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".

_________________
Gudlaugur Johannesson, GALPROP developer


Top
 Profile  
 
PostPosted: Wed Jan 07, 2015 3:34 am 
Offline

Joined: Wed May 17, 2006 7:02 am
Posts: 285
Location: MPE Garching
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

_________________
Andy Strong, MPE


Top
 Profile  
 
PostPosted: Wed Jan 07, 2015 6:36 pm 
Offline

Joined: Wed Dec 31, 2014 1:31 am
Posts: 10
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.


Top
 Profile  
 
PostPosted: Wed Jan 07, 2015 6:57 pm 
Offline

Joined: Wed Dec 31, 2014 1:31 am
Posts: 10
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.


Top
 Profile  
 
PostPosted: Wed Jan 07, 2015 7:17 pm 
Offline

Joined: Wed Dec 31, 2014 1:31 am
Posts: 10
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?


Top
 Profile  
 
PostPosted: Thu Jan 08, 2015 5:02 am 
Offline
Site Admin

Joined: Fri Jul 18, 2008 3:04 pm
Posts: 60
Location: Stanford
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.

_________________
Gudlaugur Johannesson, GALPROP developer


Top
 Profile  
 
PostPosted: Fri Jan 09, 2015 1:23 am 
Offline

Joined: Wed Dec 31, 2014 1:31 am
Posts: 10
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.


Top
 Profile  
 
PostPosted: Fri Jan 09, 2015 3:53 am 
Offline
Site Admin

Joined: Fri Jul 18, 2008 3:04 pm
Posts: 60
Location: Stanford
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.

_________________
Gudlaugur Johannesson, GALPROP developer


Top
 Profile  
 
PostPosted: Mon Jan 12, 2015 1:41 am 
Offline

Joined: Wed Dec 31, 2014 1:31 am
Posts: 10
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.


Top
 Profile  
 
PostPosted: Mon Jan 12, 2015 1:49 am 
Offline

Joined: Wed May 17, 2006 7:02 am
Posts: 285
Location: MPE Garching
the current release is compatible with Healpix 3.11
http://sourceforge.net/projects/galprop/

_________________
Andy Strong, MPE


Top
 Profile  
 
PostPosted: Wed Jan 14, 2015 12:13 am 
Offline

Joined: Wed Dec 31, 2014 1:31 am
Posts: 10
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!


Top
 Profile  
 
PostPosted: Wed Jan 14, 2015 12:33 am 
Offline

Joined: Wed May 17, 2006 7:02 am
Posts: 285
Location: MPE Garching
good, and thanks for your feedback, it is very useful for us.

_________________
Andy Strong, MPE


Top
 Profile  
 
PostPosted: Wed Jan 14, 2015 7:10 pm 
Offline

Joined: Wed Dec 31, 2014 1:31 am
Posts: 10
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?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 21 posts ]  Go to page 1, 2  Next

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group