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

Galprop installation
https://galprop.stanford.edu/forum/viewtopic.php?f=6&t=277
Page 1 of 1

Author:  carol_yosh [ Thu May 19, 2022 1:56 pm ]
Post subject:  Galprop installation

Hello!

I'm pretty new here and I need help.
I'm installing the version 57 and it's showing the following error after I give the command:


Code:
./install_galprop.sh
----- Installation of GALPROP cosmic ray propagation code ----
Error: C compiler not found. Please install C compiler!




I checked and I have gcc and g++ installed, but this error keeps showing up.
If someone could help me I'll be very glad. :D

Attachments:
File comment: Here we can see the code with the error
erro galprop.png
erro galprop.png [ 176.36 KiB | Viewed 9139 times ]

Author:  jstvdk [ Thu Jun 02, 2022 6:00 am ]
Post subject:  Re: Galprop installation

You need to write explicit path to all compilers in the "install_galprop.sh" file. There is 5 lines:

#MY_CMAKE=cmake3
#MY_AUTOCONF=autoconf
#MY_CC=/opt/rh/devtoolset-10/root/usr/bin/gcc
#MY_CXX=/opt/rh/devtoolset-10/root/usr/bin/g++
#MY_FC=/opt/rh/devtoolset-10/root/usr/bin/gfortran

You need to uncomment it (delete # sign) and place the respective path to every compiler on your computer. You can check the path to compiler on your computer by using command "which cmake", or "which autoconf" etc.

Author:  carol_yosh [ Thu Jun 02, 2022 12:00 pm ]
Post subject:  Re: Galprop installation

Thanks a lot, but I'm still with some doubts...

I write these lines before or after?
Code:
./install_galprop.sh


And then, it has these instructions (below), where do I put them? (found them on install_galprop.sh)

Attachments:
image (1).png
image (1).png [ 224.35 KiB | Viewed 8753 times ]
image (2).png
image (2).png [ 157.81 KiB | Viewed 8753 times ]

Author:  jstvdk [ Fri Jun 03, 2022 4:11 am ]
Post subject:  Re: Galprop installation

You don't need to use this instructions inside install_galprop.sh manually. You need only to change lines #16-20 in the file install_galprop.sh with the correct path in YOUR system as I explain in previous reply. And then use this file in the bash (./install_galprop.sh). Thats all, don't touch any lines in install_galprop.sh except of lines 16-20 - I wrote in the previous reply how they looks like.

You need to find path to cmake by command "which cmake" and then put the result of this command into this line in the install_galprop.sh:

MY_CMAKE = result of the command "which cmake"

and do it with other 3 compilers, e.g. which gcc, which g++, which gfortran.

Author:  carol_yosh [ Tue Jun 07, 2022 10:35 am ]
Post subject:  Re: Galprop installation

Thanks a lot!
:D

I did what you said but now it's showing the following error.
Code:
- Compile galtoolslib [Error]


What do I have to do?
Sorry if I ask too many questions, I'm pretty new on Linux and Galprop.

Attachments:
Screenshot from 2022-06-07 14-26-08.png
Screenshot from 2022-06-07 14-26-08.png [ 120.23 KiB | Viewed 8412 times ]

Author:  jstvdk [ Wed Jun 08, 2022 6:36 am ]
Post subject:  Re: Galprop installation

I don't know exactly, but I think this error is happens because you have old versions of gcc and g++, e. g. 4.8.x.

Try to use in terminal command "gcc -v" and you will see your version.

So the possible solution here is to update your gcc/g++ version at least to 4.9+. For me it works with version 9.2.

Author:  carol_yosh [ Thu Jun 09, 2022 6:53 am ]
Post subject:  Re: Galprop installation

I updated but still doesn't work..
Anyway, thanks a lot for the help!

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