Model installation error

Asked by Ram Chand on 2021-03-07

Dear Developers!
I have issue with installation of MSSM model. Fortran is installed correctly and working, here is error message:

ramchand@MacBook-Pro MSSM_10.14 % make
./getFlags
MAKE= gmake
UNIX Darwin
C compiler detected
: shared liblary generation OK
Fortran compiler is detected
Fatal problem in fortran compiler
make: *** [all] Error 1

Please solve my issue, thank you very much
Ram

Question information

Language:
English Edit question
Status:
Answered
For:
CalcHEP Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Alexander Belyaev (alexander.belyaev) said :
#1

Hello Ram,

which fortram compiler and which version of it do you have?
For example for gfortran compiler
gfortran --version
gives its version number.

Just in case could you give us information about FC variable
--just type

echo $FC

in the terminal and let me know what it returns.
if it is defined.

Thanks,
Alexander

On 07/03/2021 07:11, Ram Chand wrote:
> New question #695897 on CalcHEP:
> https://answers.launchpad.net/calchep/+question/695897
>
> Dear Developers!
> I have issue with installation of MSSM model. Fortran is installed correctly and working, here is error message:
>
> ramchand@MacBook-Pro MSSM_10.14 % make
> ./getFlags
> MAKE= gmake
> UNIX Darwin
> C compiler detected
> : shared liblary generation OK
> Fortran compiler is detected
> Fatal problem in fortran compiler
> make: *** [all] Error 1
>
> Please solve my issue, thank you very much
> Ram
>

--
______________________________________________________________________
Prof. Alexander S Belyaev (<email address hidden>)
https://www.hep.phys.soton.ac.uk/content/alexander-belyaev

School of Physics & Astronomy, University of Southampton
Office 5047, SO17 1BJ, TEL: +44 23805 98509, FAX: +44 23805 93910
.....................................................................
Particle Physics Department, Rutherford Appleton Laboratory
Didcot, OX11 0QX, TEL: +44 12354 45562, FAX: +44 12354 46733
.....................................................................
CERN, CH-1211 Geneva 23, Switzerland
Office 40/1-B20, Mailbox: E27910, TEL: +41 2276 71642
______________________________________________________________________

Revision history for this message
Ram Chand (ram-chand2k11) said :
#2

Dear Alexander!
Thank you for reply, here is output:

Last login: Sun Mar 7 13:25:01 on ttys001
ramchand@MacBook-Pro ~ % gfortran --version
GNU Fortran (MacPorts gcc9 9.3.0_4) 9.3.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

ramchand@MacBook-Pro ~ % echo $FC

ramchand@MacBook-Pro ~ %

Revision history for this message
Alexander Belyaev (alexander.belyaev) said :
#3

Thanks.
Please create file test.f
with
two lines:

      WRITE(*,*) 'test program'
      END

and then type

fortran -o a.out test.f

and send me what you see on the screen, please.

Revision history for this message
Ram Chand (ram-chand2k11) said :
#4

Thanks, here is output:

ramchand@MacBook-Pro fortran2 % gfortran -o a.out file.f
ld: library not found for -lSystem
collect2: error: ld returned 1 exit status
ramchand@MacBook-Pro fortran2 %

Revision history for this message
Alexander Belyaev (alexander.belyaev) said :
#5

This means that you do not have
gfortran properly installed.

You need to install it correctly
before using MSSM model.

Regards,
Alexander

Revision history for this message
Ram Chand (ram-chand2k11) said :
#6

Thank you, I think it is properly installed and other codes are running. Can you guide me how to install ?
thank you very much!

Revision history for this message
Alexander Belyaev (alexander.belyaev) said :
#7

Can you give me example which other  fortran codes are running on your
laptop?
If  your  gfortran compiler can not compile single line code, this means
that it has problems!
You saw it, right?
I do not work on Mac, so I can not help you to solve the problem with
your complier.
You can just try to reinstall it.
But I am sure google  will tell you how
Regards
Alexander

On 08/03/2021 04:45, Ram Chand wrote:
> Question #695897 on CalcHEP changed:
> https://answers.launchpad.net/calchep/+question/695897
>
> Ram Chand posted a new comment:
> Thank you, I think it is properly installed and other codes are running. Can you guide me how to install ?
> thank you very much!
>

--
______________________________________________________________________
Prof. Alexander S Belyaev (<email address hidden>)
https://www.hep.phys.soton.ac.uk/content/alexander-belyaev

School of Physics & Astronomy, University of Southampton
Office 5047, SO17 1BJ, TEL: +44 23805 98509, FAX: +44 23805 93910
.....................................................................
Particle Physics Department, Rutherford Appleton Laboratory
Didcot, OX11 0QX, TEL: +44 12354 45562, FAX: +44 12354 46733
.....................................................................
CERN, CH-1211 Geneva 23, Switzerland
Office 40/1-B20, Mailbox: E27910, TEL: +41 2276 71642
______________________________________________________________________

Revision history for this message
Ram Chand (ram-chand2k11) said :
#8

Thank you!
I tried to install but I got this message:

ramchand@MacBook-Pro ~ % brew install gcc
Updating Homebrew...
==> Auto-updated Homebrew!
Updated Homebrew from 0b2a459a6 to bc370748c.
Updated 2 taps (homebrew/core and homebrew/cask).
==> New Formulae
openmodelica oras sqlancer
==> Updated Formulae
Updated 114 formulae.
==> New Casks
n1ghtshade
==> Updated Casks
Updated 142 casks.
==> Deleted Casks
insomnia-designer

==> Downloading https://homebrew.bintray.com/bottles/gcc-10.2.0_4.big_sur.bottle
==> Downloading from https://d29vzk4ow07wi7.cloudfront.net/9c412d919eb6808625ac6
######################################################################## 100.0%
Error: gcc 10.2.0_2 is already installed
To upgrade to 10.2.0_4, run:
  brew upgrade gcc
ramchand@MacBook-Pro ~ %

Revision history for this message
Alexander Belyaev (alexander.belyaev) said :
#9

gcc is the C-compiler,
not the Fortran one!

you need to install gfrotran , not gcc
Alexander

On 08/03/2021 05:00, Ram Chand wrote:
> Question #695897 on CalcHEP changed:
> https://answers.launchpad.net/calchep/+question/695897
>
> Ram Chand posted a new comment:
> Thank you!
> I tried to install but I got this message:
>
> ramchand@MacBook-Pro ~ % brew install gcc
> Updating Homebrew...
> ==> Auto-updated Homebrew!
> Updated Homebrew from 0b2a459a6 to bc370748c.
> Updated 2 taps (homebrew/core and homebrew/cask).
> ==> New Formulae
> openmodelica oras sqlancer
> ==> Updated Formulae
> Updated 114 formulae.
> ==> New Casks
> n1ghtshade
> ==> Updated Casks
> Updated 142 casks.
> ==> Deleted Casks
> insomnia-designer
>
> ==> Downloading https://homebrew.bintray.com/bottles/gcc-10.2.0_4.big_sur.bottle
> ==> Downloading from https://d29vzk4ow07wi7.cloudfront.net/9c412d919eb6808625ac6
> ######################################################################## 100.0%
> Error: gcc 10.2.0_2 is already installed
> To upgrade to 10.2.0_4, run:
> brew upgrade gcc
> ramchand@MacBook-Pro ~ %
>

--
______________________________________________________________________
Prof. Alexander S Belyaev (<email address hidden>)
https://www.hep.phys.soton.ac.uk/content/alexander-belyaev

School of Physics & Astronomy, University of Southampton
Office 5047, SO17 1BJ, TEL: +44 23805 98509, FAX: +44 23805 93910
.....................................................................
Particle Physics Department, Rutherford Appleton Laboratory
Didcot, OX11 0QX, TEL: +44 12354 45562, FAX: +44 12354 46733
.....................................................................
CERN, CH-1211 Geneva 23, Switzerland
Office 40/1-B20, Mailbox: E27910, TEL: +41 2276 71642
______________________________________________________________________

Revision history for this message
Ram Chand (ram-chand2k11) said :
#10

Dear Alexander!
After googling, I found that it gfortran is installed and here is output:

ramchand@MacBook-Pro ~ % man -k fortran
MPI_File_c2f(3) - Translates a C file handle to a Fortran file handle
MPI_File_f2c(3) - Translates a Fortran file handle to a C file handle
gfortran-mp-10(1), gfortran(1) - GNU Fortran compiler
gfortran-mp-9(1), gfortran(1) - GNU Fortran compiler
mpif77(1) - Compiles and links MPI programs written in Fortran 77
mpifort(1) - Compiles and links MPI programs written in Fortran 90
ncgen3(1) - From a CDL file generate a netCDF classic or 64 bit classicfile, a C program, or a Fortran program
MPI_Comm_f2c(3), MPI_Comm_c2f(3), MPI_File_f2c(3), MPI_File_c2f(3), MPI_Info_f2c(3), MPI_Info_c2f(3), MPI_Message_f2c(3), MPI_Message_c2f(3), MPI_Op_f2c(3), MPI_Op_c2f(3), MPI_Request_f2c(3), MPI_Request_c2f(3), MPI_Type_f2c(3), MPI_Type_c2f(3), MPI_Win_f2c(3), MPI_Win_c2f (3) - Translates a C handle into a Fortran handle, or vice versa
MPI_Status_f2c(3), MPI_Status_c2f (3) - Translates a C status into a Fortran status, or vice versa
gfortran-10(1), gfortran(1) - GNU Fortran compiler
mpif77(1) - mpif90 -- Deprecated Open MPI Fortran wrapper compilers
mpifort(1) - -- Open MPI Fortran wrapper compiler
ramchand@MacBook-Pro ~ %

Revision history for this message
Alexander Belyaev (alexander.belyaev) said :
#11

fortran  is not gfortran!
but you can use it.

Try first if fortran will compile test.f file withour error.

In  case of sucess of the compilation, which means that you really have
fortran,
you can either

1.  edit getflags in MSSM and for DARWIN replace gfortran to fortran
(if you relly have it)

2. create alias

for fortran pointing to gfortran
in your .bashrc file

alias gfortran=fortran

then you can open new terminal which will read the updated .bashrc and  type

make in MSSM folder

On 08/03/2021 08:41, Ram Chand wrote:
> Question #695897 on CalcHEP changed:
> https://answers.launchpad.net/calchep/+question/695897
>
> Ram Chand posted a new comment:
> Dear Alexander!
> After googling, I found that it gfortran is installed and here is output:
>
> ramchand@MacBook-Pro ~ % man -k fortran
> MPI_File_c2f(3) - Translates a C file handle to a Fortran file handle
> MPI_File_f2c(3) - Translates a Fortran file handle to a C file handle
> gfortran-mp-10(1), gfortran(1) - GNU Fortran compiler
> gfortran-mp-9(1), gfortran(1) - GNU Fortran compiler
> mpif77(1) - Compiles and links MPI programs written in Fortran 77
> mpifort(1) - Compiles and links MPI programs written in Fortran 90
> ncgen3(1) - From a CDL file generate a netCDF classic or 64 bit classicfile, a C program, or a Fortran program
> MPI_Comm_f2c(3), MPI_Comm_c2f(3), MPI_File_f2c(3), MPI_File_c2f(3), MPI_Info_f2c(3), MPI_Info_c2f(3), MPI_Message_f2c(3), MPI_Message_c2f(3), MPI_Op_f2c(3), MPI_Op_c2f(3), MPI_Request_f2c(3), MPI_Request_c2f(3), MPI_Type_f2c(3), MPI_Type_c2f(3), MPI_Win_f2c(3), MPI_Win_c2f (3) - Translates a C handle into a Fortran handle, or vice versa
> MPI_Status_f2c(3), MPI_Status_c2f (3) - Translates a C status into a Fortran status, or vice versa
> gfortran-10(1), gfortran(1) - GNU Fortran compiler
> mpif77(1) - mpif90 -- Deprecated Open MPI Fortran wrapper compilers
> mpifort(1) - -- Open MPI Fortran wrapper compiler
> ramchand@MacBook-Pro ~ %
>

--
______________________________________________________________________
Prof. Alexander S Belyaev (<email address hidden>)
https://www.hep.phys.soton.ac.uk/content/alexander-belyaev

School of Physics & Astronomy, University of Southampton
Office 5047, SO17 1BJ, TEL: +44 23805 98509, FAX: +44 23805 93910
.....................................................................
Particle Physics Department, Rutherford Appleton Laboratory
Didcot, OX11 0QX, TEL: +44 12354 45562, FAX: +44 12354 46733
.....................................................................
CERN, CH-1211 Geneva 23, Switzerland
Office 40/1-B20, Mailbox: E27910, TEL: +41 2276 71642
______________________________________________________________________

Revision history for this message
Ram Chand (ram-chand2k11) said :
#12

Dear Alexander!
I solve the issue. Actually problem was not with gfortran but path of the lib. After update of new Big Sur, the fortran path no longer works so one has to manually fixed the issue. Here is step by step method to resolve the issue:

1. Edit file /private/etc/zprofile
To edit the profile we need to sudo chmod 666 /private/etc/zprofile to make the file writeable.

2. Now open zprofile
nano /private/etc/zprofile

3. Add this to the end of the file:

if [ -z "${LIBRARY_PATH}" ]; then
    export LIBRARY_PATH="/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib"
else
    export LIBRARY_PATH="$LIBRARY_PATH:/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib"
fi

4. Save the file and exit

5. Restart Terminal

I did this and then compile the MSSM module I got this:

ramchand@MacBook-Pro MSSM_10.14 % make
./getFlags
MAKE= gmake
UNIX Darwin
C compiler detected
: shared liblary generation OK
Fortran compiler is detected
gfortran OK
FFLAGS OK
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C SuSpect
gfortran -c -o bsg.o bsg.f
bsg.f:501:72:

  501 | 1 S8=S8+W(I)*(F(C1+U)+F(C1-U))
      |
Warning: Fortran 2018 deleted feature: DO termination statement which is not END DO or CONTINUE with label 1 at (1)
bsg.f:504:72:

  504 | 3 S16=S16+W(I)*(F(C1+U)+F(C1-U))
      |
Warning: Fortran 2018 deleted feature: DO termination statement which is not END DO or CONTINUE with label 3 at (1)
ar rv suspect.a bsg.o
ar: creating archive suspect.a
a - bsg.o
gfortran -c -o suspect2.o suspect2.f
suspect2.f:5783:72:

 5783 | do 11 j=1,4
      |
Warning: Fortran 2018 deleted feature: Shared DO termination label 11 at (1)
suspect2.f:5790:72:

 5790 | do 21 j=1,4
      |
Warning: Fortran 2018 deleted feature: Shared DO termination label 21 at (1)
suspect2.f:5797:72:

 5797 | do 12 j=1,2
      |
Warning: Fortran 2018 deleted feature: Shared DO termination label 12 at (1)
suspect2.f:5802:72:

 5802 | do 22 j=1,2
      |
Warning: Fortran 2018 deleted feature: Shared DO termination label 22 at (1)
suspect2.f:5809:72:

 5809 | do 13 j=1,4
      |
Warning: Fortran 2018 deleted feature: Shared DO termination label 13 at (1)
suspect2.f:6195:72:

 6195 | do 311 j=1,2
      |
Warning: Fortran 2018 deleted feature: Shared DO termination label 311 at (1)
suspect2.f:9173:72:

 9173 | do 13 j=1,2
      |
Warning: Fortran 2018 deleted feature: Shared DO termination label 13 at (1)
ar rv suspect.a suspect2.o
a - suspect2.o
gfortran -c -o twoloophiggs.o twoloophiggs.f
ar rv suspect.a twoloophiggs.o
a - twoloophiggs.o
ranlib -c suspect.a
rm -f bsg.o suspect2.o twoloophiggs.o
gfortran -o suspect.exe suspect2_call.f suspect.a
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C lib
gcc -g -fsigned-char -std=gnu99 -c -o lambdas.o lambdas.c
lambdas.c:901:9: warning: using integer absolute value function 'abs' when
      argument is of floating point type [-Wabsolute-value]
    if (abs(*mu) < 1e-6f) {
        ^
lambdas.c:901:9: note: use function 'fabs' instead
    if (abs(*mu) < 1e-6f) {
        ^~~
        fabs
lambdas.c:1608:9: warning: using integer absolute value function 'abs' when
      argument is of floating point type [-Wabsolute-value]
    if (abs(*mu) < 1e-6f) {
        ^
lambdas.c:1608:9: note: use function 'fabs' instead
    if (abs(*mu) < 1e-6f) {
        ^~~
        fabs
2 warnings generated.
ar rv aLib.a lambdas.o
ar: creating archive aLib.a
a - lambdas.o
gcc -g -fsigned-char -std=gnu99 -c -o bsg_nlo.o bsg_nlo.c
ar rv aLib.a bsg_nlo.o
a - bsg_nlo.o
rm bsg_nlo.o lambdas.o
./addPath /Users/ramchand/HEP_tools/calchep_3.8.7/MSSM_10.14
ramchand@MacBook-Pro MSSM_10.14 %

Is this ok?
Thank you,
Ram

Revision history for this message
Alexander Belyaev (alexander.belyaev) said :
#13

Dear Ram,
everything is OK now.
Thanks for update with your steps -- they will be useful for others, who
has Darwin OS.
So, the problems was on Darwin side.
May be you should report a bug for Darwing developers
Best,
Alexander

On 08/03/2021 16:50, Ram Chand wrote:
> Question #695897 on CalcHEP changed:
> https://answers.launchpad.net/calchep/+question/695897
>
> Ram Chand posted a new comment:
> Dear Alexander!
> I solve the issue. Actually problem was not with gfortran but path of the lib. After update of new Big Sur, the fortran path no longer works so one has to manually fixed the issue. Here is step by step method to resolve the issue:
>
> 1. Edit file /private/etc/zprofile
> To edit the profile we need to sudo chmod 666 /private/etc/zprofile to make the file writeable.
>
> 2. Now open zprofile
> nano /private/etc/zprofile
>
> 3. Add this to the end of the file:
>
> if [ -z "${LIBRARY_PATH}" ]; then
> export LIBRARY_PATH="/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib"
> else
> export LIBRARY_PATH="$LIBRARY_PATH:/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib"
> fi
>
> 4. Save the file and exit
>
> 5. Restart Terminal
>
> I did this and then compile the MSSM module I got this:
>
> ramchand@MacBook-Pro MSSM_10.14 % make
> ./getFlags
> MAKE= gmake
> UNIX Darwin
> C compiler detected
> : shared liblary generation OK
> Fortran compiler is detected
> gfortran OK
> FFLAGS OK
> /Applications/Xcode.app/Contents/Developer/usr/bin/make -C SuSpect
> gfortran -c -o bsg.o bsg.f
> bsg.f:501:72:
>
> 501 | 1 S8=S8+W(I)*(F(C1+U)+F(C1-U))
> |
> Warning: Fortran 2018 deleted feature: DO termination statement which is not END DO or CONTINUE with label 1 at (1)
> bsg.f:504:72:
>
> 504 | 3 S16=S16+W(I)*(F(C1+U)+F(C1-U))
> |
> Warning: Fortran 2018 deleted feature: DO termination statement which is not END DO or CONTINUE with label 3 at (1)
> ar rv suspect.a bsg.o
> ar: creating archive suspect.a
> a - bsg.o
> gfortran -c -o suspect2.o suspect2.f
> suspect2.f:5783:72:
>
> 5783 | do 11 j=1,4
> |
> Warning: Fortran 2018 deleted feature: Shared DO termination label 11 at (1)
> suspect2.f:5790:72:
>
> 5790 | do 21 j=1,4
> |
> Warning: Fortran 2018 deleted feature: Shared DO termination label 21 at (1)
> suspect2.f:5797:72:
>
> 5797 | do 12 j=1,2
> |
> Warning: Fortran 2018 deleted feature: Shared DO termination label 12 at (1)
> suspect2.f:5802:72:
>
> 5802 | do 22 j=1,2
> |
> Warning: Fortran 2018 deleted feature: Shared DO termination label 22 at (1)
> suspect2.f:5809:72:
>
> 5809 | do 13 j=1,4
> |
> Warning: Fortran 2018 deleted feature: Shared DO termination label 13 at (1)
> suspect2.f:6195:72:
>
> 6195 | do 311 j=1,2
> |
> Warning: Fortran 2018 deleted feature: Shared DO termination label 311 at (1)
> suspect2.f:9173:72:
>
> 9173 | do 13 j=1,2
> |
> Warning: Fortran 2018 deleted feature: Shared DO termination label 13 at (1)
> ar rv suspect.a suspect2.o
> a - suspect2.o
> gfortran -c -o twoloophiggs.o twoloophiggs.f
> ar rv suspect.a twoloophiggs.o
> a - twoloophiggs.o
> ranlib -c suspect.a
> rm -f bsg.o suspect2.o twoloophiggs.o
> gfortran -o suspect.exe suspect2_call.f suspect.a
> /Applications/Xcode.app/Contents/Developer/usr/bin/make -C lib
> gcc -g -fsigned-char -std=gnu99 -c -o lambdas.o lambdas.c
> lambdas.c:901:9: warning: using integer absolute value function 'abs' when
> argument is of floating point type [-Wabsolute-value]
> if (abs(*mu) < 1e-6f) {
> ^
> lambdas.c:901:9: note: use function 'fabs' instead
> if (abs(*mu) < 1e-6f) {
> ^~~
> fabs
> lambdas.c:1608:9: warning: using integer absolute value function 'abs' when
> argument is of floating point type [-Wabsolute-value]
> if (abs(*mu) < 1e-6f) {
> ^
> lambdas.c:1608:9: note: use function 'fabs' instead
> if (abs(*mu) < 1e-6f) {
> ^~~
> fabs
> 2 warnings generated.
> ar rv aLib.a lambdas.o
> ar: creating archive aLib.a
> a - lambdas.o
> gcc -g -fsigned-char -std=gnu99 -c -o bsg_nlo.o bsg_nlo.c
> ar rv aLib.a bsg_nlo.o
> a - bsg_nlo.o
> rm bsg_nlo.o lambdas.o
> ./addPath /Users/ramchand/HEP_tools/calchep_3.8.7/MSSM_10.14
> ramchand@MacBook-Pro MSSM_10.14 %
>
> Is this ok?
> Thank you,
> Ram
>

--
______________________________________________________________________
Prof. Alexander S Belyaev (<email address hidden>)
https://www.hep.phys.soton.ac.uk/content/alexander-belyaev

School of Physics & Astronomy, University of Southampton
Office 5047, SO17 1BJ, TEL: +44 23805 98509, FAX: +44 23805 93910
.....................................................................
Particle Physics Department, Rutherford Appleton Laboratory
Didcot, OX11 0QX, TEL: +44 12354 45562, FAX: +44 12354 46733
.....................................................................
CERN, CH-1211 Geneva 23, Switzerland
Office 40/1-B20, Mailbox: E27910, TEL: +41 2276 71642
______________________________________________________________________

Can you help with this problem?

Provide an answer of your own, or ask Ram Chand for more information if necessary.

To post a message you must log in.