It is currently Sun Nov 28, 2021 4:15 pm

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 22 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Compiling problems
PostPosted: Tue Oct 06, 2015 8:21 am 
Offline

Joined: Mon Aug 10, 2015 10:26 am
Posts: 11
Hi,

I've been trying to install Galprop, but keep running into the same problem, that there is a missing file called 'healpix_base.h'.

I first run
Code:
autoreconf -i -v -f


then I configure with the following options:

Code:
./configure --with-cfitsio=<cfitsio_directory> --with-clhep=<clhep_directory> --with-gsl=<gsl_directory> --with-healpix=<healpix_directory>/src/generic_gcc --with-ccfits=<ccfits_directory> CXX=gcc F77=gfortran CXXFLAGS="-fopenmp -Wno-unused-function" FFLAGS="-fopenmp"


then I run
Code:
make


which gives the error message:
Code:
In file included from Skymap.h:13:0,
                 from Galaxy.h:11,
                 from galprop_classes.h:14,
                 from D_pp.cc:15:
HealpixBaseExtended.h:10:26: fatal error: healpix_base.h: No such file or directory
 #include "healpix_base.h"
                          ^
compilation terminated.



I think all the dependencies (CCfits, GSL, Healpix, etc...) are installed OK, and I am using Healpix 2.20a as I understand there are compatability problems between later versions of Healpix & Galprop(?).

I've tried installing on systems running Red Hat, Ubuntu and Mac (Yosemite), and all end up giving me the same error message, so I am probably making the same mistake when trying to install each time. Just wondered if anyone had any ideas as to what I am doing wrong?

Thanks,

Ellis


Top
 Profile  
 
 Post subject: Re: Compiling problems
PostPosted: Tue Oct 06, 2015 8:26 am 
Offline

Joined: Wed May 17, 2006 7:02 am
Posts: 285
Location: MPE Garching
which GALPROP version are you using?
https://sourceforge.net/projects/galprop
has updates for more recent Healpix releases, which are preferred.

_________________
Andy Strong, MPE


Top
 Profile  
 
 Post subject: Re: Compiling problems
PostPosted: Tue Oct 06, 2015 8:55 am 
Offline

Joined: Mon Aug 10, 2015 10:26 am
Posts: 11
Galprop version 54.1.984

Just tried with Healpix 3.20 - I get the same error.


Top
 Profile  
 
 Post subject: Re: Compiling problems
PostPosted: Tue Oct 06, 2015 8:57 am 
Offline

Joined: Wed May 17, 2006 7:02 am
Posts: 285
Location: MPE Garching
984 will not work with current Healpix versions.
try the GALPROP version mentioned above, it certainly works with current Healpix.
plus bugfixes and many enhancements.

_________________
Andy Strong, MPE


Top
 Profile  
 
 Post subject: Re: Compiling problems
PostPosted: Tue Oct 06, 2015 9:13 am 
Offline

Joined: Mon Aug 10, 2015 10:26 am
Posts: 11
OK, I just tried with galprop_54_r2766 and Healpix 3.20, but I still get the same problem, even with a complete re-install of Healpix.


Top
 Profile  
 
 Post subject: Re: Compiling problems
PostPosted: Tue Oct 06, 2015 9:20 am 
Offline

Joined: Wed May 17, 2006 7:02 am
Posts: 285
Location: MPE Garching
the configure example in README looks more like (an example)
--with-healpix=/afs/ipp-garching.mpg.de/home/a/aws/Healpix/Healpix_3.11/src/cxx/generic_gcc

while you seem to point just to src/generic_gcc without cxx
I don't know if that is the problem though.

_________________
Andy Strong, MPE


Top
 Profile  
 
 Post subject: Re: Compiling problems
PostPosted: Tue Oct 06, 2015 9:24 am 
Offline
Site Admin

Joined: Fri Jul 18, 2008 3:04 pm
Posts: 60
Location: Stanford
Make sure that you are pointing the configure script to the correct install path for HEALPix. The script is not very smart and assumes that if you give it a path that it is the correct one. If you used a standard compilation of healpix with generic_gcc the path should be
/path/to/healpix/base/directory/src/cxx/generic_gcc
If you used another configuration you will need to change the last part of the path.

It seems that you are missing the 'cxx' part in the path

_________________
Gudlaugur Johannesson, GALPROP developer


Top
 Profile  
 
 Post subject: Re: Compiling problems
PostPosted: Tue Oct 06, 2015 9:28 am 
Offline

Joined: Mon Aug 10, 2015 10:26 am
Posts: 11
Ah, yes that helps me get a bit further - thanks. Though now I am getting a different error:

Code:
.deps/D_pp.Tpo -c -o D_pp.o D_pp.cc
In file included from Galaxy.h:11:0,
                 from galprop_classes.h:14,
                 from D_pp.cc:15:
Skymap.h:21:25: fatal error: CCfits/CCfits: No such file or directory
 #include <CCfits/CCfits>
                         ^
compilation terminated.


Does CCfits need to be installed in a specific directory or something, rather than just putting the path in the --with-ccfits=<path> flag when compiling galprop?


Top
 Profile  
 
 Post subject: Re: Compiling problems
PostPosted: Tue Oct 06, 2015 9:32 am 
Offline
Site Admin

Joined: Fri Jul 18, 2008 3:04 pm
Posts: 60
Location: Stanford
You need to do a `make install` for CCfits and give the prefix directory you used in the configuration of CCfits to the galprop configure script. It is not enough to do only make and point to the build directory. The same goes for gsl and clhep.

_________________
Gudlaugur Johannesson, GALPROP developer


Top
 Profile  
 
 Post subject: Re: Compiling problems
PostPosted: Tue Oct 06, 2015 9:36 am 
Offline

Joined: Wed May 17, 2006 7:02 am
Posts: 285
Location: MPE Garching
it does not have to be specific
the directory pointed to contains
bin/ include/ lib/
which indeed is generated by CCfits make install as Gulli says.

_________________
Andy Strong, MPE


Top
 Profile  
 
 Post subject: Re: Compiling problems
PostPosted: Tue Oct 06, 2015 12:06 pm 
Offline

Joined: Mon Aug 10, 2015 10:26 am
Posts: 11
Thanks again!

It got further in the compilation this time, with error messages being thrown up by 'RadiationField.cc'. Any idea what might be causing this?

Example error message:

Code:
RadiationField.cc: In member function ‘void rf::RadiationField::ClearData()’:
RadiationField.cc:827:50: error: request for member ‘size’ in ‘((rf::RadiationField*)this)->rf::RadiationField::fPositionData’, which is of non-class type ‘int’
       for (unsigned int i = 0; i < fPositionData.size(); ++i) {
                                                  ^
RadiationField.cc:829:17: error: invalid types ‘int[unsigned int]’ for array subscript
  fPositionData[i].clear();
                 ^
RadiationField.cc:830:14: error: invalid types ‘int[unsigned int]’ for array subscript
  fRangeData[i].clear();
              ^


There are many others, all relating to RadiationField.cc - I can post these if needed too (but they are quite long).

Thanks,

Ellis


Top
 Profile  
 
 Post subject: Re: Compiling problems
PostPosted: Tue Oct 06, 2015 12:12 pm 
Offline

Joined: Wed May 17, 2006 7:02 am
Posts: 285
Location: MPE Garching
at first sight I have no idea, and have never come across anything like it.
But this feedback is important, so stay tuned.
What compiler are you using? I use g++ and intel, neither have that problem. I see you have gcc, so should not be the problem.
Does it happen on all the OS you are using? I know it works on RHEL and SLES.

_________________
Andy Strong, MPE


Top
 Profile  
 
 Post subject: Re: Compiling problems
PostPosted: Tue Oct 06, 2015 12:49 pm 
Offline
Site Admin

Joined: Fri Jul 18, 2008 3:04 pm
Posts: 60
Location: Stanford
You are using gcc to compile c++ code. I am surprised that you got this far. You should set CXX=g++.

_________________
Gudlaugur Johannesson, GALPROP developer


Top
 Profile  
 
 Post subject: Re: Compiling problems
PostPosted: Tue Oct 06, 2015 2:15 pm 
Offline

Joined: Mon Aug 10, 2015 10:26 am
Posts: 11
Putting CXX=g++ made no difference - still the same bunch of errors coming up.

I haven't tried on Mac or Red Hat yet - will do so tomorrow mornign & get back to you. Thanks for looking into this.


Top
 Profile  
 
 Post subject: Re: Compiling problems
PostPosted: Tue Oct 06, 2015 10:57 pm 
Offline

Joined: Wed May 17, 2006 7:02 am
Posts: 285
Location: MPE Garching
gcc includes g++ in fact

_________________
Andy Strong, MPE


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 22 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