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

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

Author:  ellis.owen2 [ Tue Oct 06, 2015 8:21 am ]
Post subject:  Compiling problems

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

Author:  strong [ Tue Oct 06, 2015 8:26 am ]
Post subject:  Re: Compiling problems

which GALPROP version are you using?
https://sourceforge.net/projects/galprop
has updates for more recent Healpix releases, which are preferred.

Author:  ellis.owen2 [ Tue Oct 06, 2015 8:55 am ]
Post subject:  Re: Compiling problems

Galprop version 54.1.984

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

Author:  strong [ Tue Oct 06, 2015 8:57 am ]
Post subject:  Re: Compiling problems

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.

Author:  ellis.owen2 [ Tue Oct 06, 2015 9:13 am ]
Post subject:  Re: Compiling problems

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.

Author:  strong [ Tue Oct 06, 2015 9:20 am ]
Post subject:  Re: Compiling problems

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.

Author:  gudlaugu [ Tue Oct 06, 2015 9:24 am ]
Post subject:  Re: Compiling problems

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

Author:  ellis.owen2 [ Tue Oct 06, 2015 9:28 am ]
Post subject:  Re: Compiling problems

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?

Author:  gudlaugu [ Tue Oct 06, 2015 9:32 am ]
Post subject:  Re: Compiling problems

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.

Author:  strong [ Tue Oct 06, 2015 9:36 am ]
Post subject:  Re: Compiling problems

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.

Author:  ellis.owen2 [ Tue Oct 06, 2015 12:06 pm ]
Post subject:  Re: Compiling problems

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

Author:  strong [ Tue Oct 06, 2015 12:12 pm ]
Post subject:  Re: Compiling problems

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.

Author:  gudlaugu [ Tue Oct 06, 2015 12:49 pm ]
Post subject:  Re: Compiling problems

You are using gcc to compile c++ code. I am surprised that you got this far. You should set CXX=g++.

Author:  ellis.owen2 [ Tue Oct 06, 2015 2:15 pm ]
Post subject:  Re: Compiling problems

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.

Author:  strong [ Tue Oct 06, 2015 10:57 pm ]
Post subject:  Re: Compiling problems

gcc includes g++ in fact

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