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

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 24 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: Mac Intel
PostPosted: Fri Jul 18, 2008 5:34 am 
Offline

Joined: Wed May 17, 2006 7:02 am
Posts: 285
Location: MPE Garching
so can you re-put v50p on the 'GALPROP Project' page since I see you have replaced it by v50.1p which apparently has a bug,
or make both available.

_________________
Andy Strong, MPE


Top
 Profile  
 
 Post subject: Re: Mac Intel
PostPosted: Mon Nov 24, 2008 7:42 pm 
Offline

Joined: Fri Oct 31, 2008 3:08 am
Posts: 9
Location: Yonsei university, Seoul
Hello all ~

I'd like to compile GALPROP in Macbook 2.0 ..

Actually I have already tried the previous ways.

but I still could not compile GALPROP..

As I opened 'read_COR.cc' file, I could see #include"fitsio.h".

but I could not find out fitsio.h at all in all GALPROP packages from v41 to v50.1 .

Where in the world is 'fitsio.h' ?

Thanks ~

H.S.Cheon


Top
 Profile  
 
 Post subject: Re: Mac Intel
PostPosted: Tue Nov 25, 2008 1:23 am 
Offline

Joined: Wed May 17, 2006 7:02 am
Posts: 285
Location: MPE Garching
fitsio.h is part of the fitsio package which has to be obtained from HEASARC
http://heasarc.nasa.gov/lheasoft/fitsio/fitsio.html

_________________
Andy Strong, MPE


Top
 Profile  
 
 Post subject: Re: Mac Intel
PostPosted: Thu Nov 27, 2008 8:14 pm 
Offline

Joined: Fri Oct 31, 2008 3:08 am
Posts: 9
Location: Yonsei university, Seoul
Thank you ~

but I still could not compile GALPROP.

I installed cfitsio from http://heasarc.nasa.gov/lheasoft/fitsio/fitsio.html

and then I moved 'fitsio.h' file to GALPROP folder.

but,,

read_COR.cc: In function ‘int read_COR()’:
read_COR.cc:36: error: ‘fits_open_file’ was not declared in this scope
read_COR.cc:38: error: ‘fits_read_key’ was not declared in this scope
read_COR.cc:39: error: ‘fits_read_key’ was not declared in this scope
read_COR.cc:40: error: ‘fits_read_key’ was not declared in this scope
read_COR.cc:41: error: ‘fits_read_key’ was not declared in this scope
read_COR.cc:44: error: ‘fits_read_key’ was not declared in this scope
read_COR.cc:45: error: ‘fits_read_key’ was not declared in this scope
read_COR.cc:47: error: ‘fits_read_key’ was not declared in this scope
read_COR.cc:48: error: ‘fits_read_key’ was not declared in this scope
read_COR.cc:61: error: ‘fits_read_img’ was not declared in this scope
make: *** [read_COR.o] Error 1

How to solve that problem ?

Sorry ~


Top
 Profile  
 
 Post subject: Re: Mac Intel
PostPosted: Fri Nov 28, 2008 1:18 am 
Offline

Joined: Wed May 17, 2006 7:02 am
Posts: 285
Location: MPE Garching
Do any of the other MAC users have a suggestion for this problem ?
Maybe you could mail them to direct attention to it in case they are not watching this forum.

_________________
Andy Strong, MPE


Top
 Profile  
 
 Post subject: Re: Mac Intel
PostPosted: Wed Dec 03, 2008 3:01 am 
Offline

Joined: Wed Dec 20, 2006 1:54 am
Posts: 2
Location: Department of Physics - KTH - AlbaNova University Centre [Stockholm]
Hi,

Sorry to give a late response. I did not connect so often on the Galprop Forum.

HSCheon wrote:
Thank you ~

but I still could not compile GALPROP.

I installed cfitsio from http://heasarc.nasa.gov/lheasoft/fitsio/fitsio.html

and then I moved 'fitsio.h' file to GALPROP folder.

Sorry ~


First, I would say that this is not a Mac problem but a compilation problem. I will suggest you to use the make command to compile GALPROP, then, you can define some compilation parameters into your Makefile. With this method, it is not necessary to move all the *.h file from the cfitsio package to the GALPROP source directory (and I will not recommend you to do it, even you used directly g++ and fc90 shell commands to compile GALPROP).

To compile GALPROP properly, you have to set your Makefile deppending on your system. In your case, to solve the problem related to the cfitsio library, you have to specify the include and lib directories of the cfitsio library.

Here, an example of Makefile (it is a copy of my make file. It could be not perfect, but it work for me). You have to change some parameters depending on your system.
Code:
CFITSIO_INC = ${CFITSIOSYS}/include                                     #  PATH where *.h file from the cfistio package has been installed
FC =gfortran-gnu-4.3.1                                                  # The name of your Fortran compiler
FFLAGS =  -O6 -fno-second-underscore -fbounds-check                     #  Some fortran flag for compilation
CPPFLAGS = -O6 -Wno-deprecated -fast -floop-optimize2  -fforce-addr -I{CFITSIO_INC}        #  Some c++ flag for compilation.
                                                                                          #  -I{CFITSIO_INC} Explicitly indicate where the .h
                                                                                          #  of the cfitsio library were installed
LIBS = -lm -Wl -lcfitsio -lgcc -lg2c  -lgfortran                       #  Some flag to load library needed to compile GALPROP.
                                                                       #  note that -lcfitsio link to the cfitsio library
LDFLAGS = $(LIBS) -L${CFITSIOSYS}/lib -L/usr/src/gcc-gnu/lib           #  Explicit path of libraries if they are not installed
                                                                       #  into the usual directory. Note that ${CFITSIOSYS}/lib
                                                                       #  link to the path where libcfitsio.a, libcfitsio.dylib and others were installed
FOBJS := $(patsubst %.f,%.o,$(wildcard *.f))
CCOBJS := $(patsubst %.cc,%.o,$(wildcard *.cc))
galprop: ${FOBJS} ${CCOBJS}                                            #  COMPILE and BUILD the GALPROP executable
   $(CXX) *.o -o /PATH_of_the_GALPROP.EXE/NAME_of_the_GALPROP.EXE ${LDFLAGS}


In this make file, I used the ${CFITSIOSYS} variables which is the absolute path where I installed the cfitsio library (in my case /SCIENCE/CFITSIO/v3.100). On bash shell, you can define it by the following line:
Code:
export CFITSIOSYS=ABSLUTE_PATH_OF_CFITSIO_LIBRARY


You can do it automatically by adding this line into your .bash_profile file or you can do it on a shell command - in the latest case, you will have to do it each time before you compile GALPROP.
If it still does not work, it is due to your installation of the cfitsio library. Check that cfitsio library has been properly installed.


Top
 Profile  
 
 Post subject: Re: Mac Intel
PostPosted: Fri Jan 02, 2009 4:36 am 
Offline

Joined: Fri Oct 31, 2008 3:08 am
Posts: 9
Location: Yonsei university, Seoul
Thank you very much for your very kind reply ~ .

But I have still not succeeded in compile GALPROP. Sorry ~

Maybe I think cfitsio problems was solved by your kind way.

but

galprop.h:147: error: ‘Configure’ does not name a type
galprop.h:148: error: ‘Galdef’ does not name a type
galprop.h:151: error: ‘Galaxy’ does not name a type


Sorry, I could not solve these problems..

Just myself I have tried to solve that problem continuously through several ways, but I'm fail

What is my problem? Could you help me ?


Top
 Profile  
 
 Post subject: Re: Mac Intel
PostPosted: Sun Feb 15, 2009 4:02 pm 
Offline

Joined: Sun Dec 14, 2008 7:55 am
Posts: 1
Location: Virginia Tech
The reason why GALPROP does not compile properly on a Mac is the following:

First, download the file v50.1p.tgz from the GALPROP website. Before unzipping it, open a terminal window and type

tar -tf v50.1p.tgz

to list the files that are included in this archive. If you scroll down the list, you will find the following entries:

galprop.cc
Galprop.cc
galprop_classes.h
galprop.h
Galprop.h

Notice that there two pairs of files whose filenames only differ by the case of their initial letters: galprop.cc and Galprop.cc, and galprop.h and Galprop.h. Now, though these pairs have very similar filenames, their contents are completely different and you need all four of them for GALPROP to compile properly. Now go ahead and unzip the archive. You will get a new folder called v50.1p but if you look into it, two things could have happened depending on how your Mac is setup:

1) The files galprop.cc and galprop.h are missing.
Your Mac decompresses the files in the archive in the order their names appear in the list and puts them into the v50.1p folder one by one.
But because Mac OS X does not distinguish between lower and uppercase letters, it has overwritten the lowercase named files with the uppercase named files in this process. So you have lost the two files. :(

2) The files Galprop.cc and Galprop.h are missing, but you have files named Galprop.1.cc and Galprop.1.h instead.
This will happen if your Mac is setup to put version numbers on files with the same name to distinguish among them.

If 2) has happened, the cure is easy. :D
Galprop.cc does not care what it is called so just leave it as Galprop.1.cc.
The only place where the header file Galprop.h is included is in the file galprop_classes.h. Edit this file so that its 17th line reads

#include "Galprop.1.h" // AWS20050816

instead of

#include "Galprop.h" // AWS20050816

Then just type in "make" and the compilation should go smoothly. (If it doesn't, see below.)
If 1) has happened, first rename Galprop.cc and Galprop.h to something else and edit galprop_classes.h accordingly.
Then, extract the files galprop.cc and galprop.h from the archive one by one by typing

tar -xzf v50.1p.tgz galprop.cc
tar -xzf v50.1p.tgz galprop.h

and place them in the v50.1p folder. Then type "make".

If you get error messages, you will have to edit the file "makefile".
If you have g++ and gfortran installed on your Mac, uncomment the first two lines and change g77 to gfortran in the second line so that they read

CXX = g++
FC = gfortran

This tells "make" which compliers to use. If you installed the CFITSIO library using fink, change the third line to

CFITSIO = /sw

since that is the directory in which fink has installed the lib and include files for CFITSIO.
Also change the 6th line to

LIBS = -lm -lg2c -L/sw/lib/gcc4.3/lib -lgfortran

The extra info tells "make" where the gfortran library is. If it's not there, look for a file called "libgfortran.a" with your finder and setup the path accordingly.

Let me know if this doesn't work.
Good luck!


Last edited by tatsutakeuchi on Mon Feb 23, 2009 5:35 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Mac Intel
PostPosted: Wed Feb 18, 2009 7:04 am 
Offline

Joined: Fri Oct 31, 2008 3:08 am
Posts: 9
Location: Yonsei university, Seoul
Thank you very much tatsutakeuchi ~

At last I succeed to install GALPROP.

How to find out that problem in Mac ? You are really great ~

Thank you very much again ~ :D


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

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