whizard is hosted by Hepforge, IPPP Durham

Opened 15 years ago

Closed 15 years ago

Last modified 14 years ago

#105 closed defect (fixed)

WHIZARD 2 external library does not compile with gfortran 4.5.0

Reported by: Juergen Reuter Owned by: kilian
Priority: P1 Milestone:
Component: models Version: 2.0.0beta
Severity: blocker Keywords: Fortran compilation problem
Cc:

Description

This fails with the following error message:

make[2]: Entering directory `/localscratch/reuter/whizard2.0/trunk/src/models'
/bin/sh ../../libtool   --mode=compile gfortran45.old -I../../src/misc -I../../src/whizard-core -g -O2 -c -o external.Test.lo external.Test.f90
libtool: compile:  gfortran45.old -I../../src/misc -I../../src/whizard-core -g -O2 -c external.Test.f90  -fPIC -o .libs/external.Test.o
external.Test.f90:32.2:

  par(3) = mf
  1
Error: Cannot assign to INTENT(IN) variable 'par' at (1)
make[2]: *** [external.Test.lo] Error 1

Is there something missing, or a compiler error of gfortran???

Change History (3)

comment:1 Changed 15 years ago by Juergen Reuter

The problem us the assignment:

{{{subroutine init_external_parameters (par) bind (C)

use iso_c_binding use kinds

real(c_default_float), dimension(*), intent(in)
par
real(default)
ms, mf ms = par(2)

THIS ASSIGNMENT IS OK!

mf = 1.5_default * ms par(3) = mf

THAT ONE IS THE PROBLEM!!!! end subroutine init_external_parameters }}}

For now, I commented out the problematic line.

comment:2 Changed 15 years ago by kilian

Resolution: fixed
Status: newclosed

Fixed in [1403]. The culprit was a INTENT(IN) declaration which should have been INTENT(INOUT).

comment:3 Changed 14 years ago by Juergen Reuter

Milestone: v2.0.0final

Milestone v2.0.0final deleted

Note: See TracTickets for help on using tickets.