Package: libgeant321-2-dev
Version: 1:3.21.14.dfsg-4
Severity: normal

Hello,

when compiling a program using geant in an 'interactive' way with
gfortran, the wrong UGLAST routine is chosen, if the user's UGLAST
routine resides in an archive.

For the attached (test) program the finishing routines behave
differently when compiled with gfortran or g77.

Steps to reproduce:
1.) in the attached Makefile set the FC variable to gfortran
2.) execute 'make'
3.) execute './test', choose your workstation type, then type 'exit' at
the prompt. The program will exit with the error message:

Geant321: Now in dummy UGLAST routine.
If you see this message, you are presumably trying to call (possibly
indirectly) the UGLAST routine.  This routine is not built into Geant;
you must write code for it yourself.  Please see the documentation
(for instance in the geant321-doc package).

4.) in the makefile set FC to g77
5.) repeat steps 2.) to 3.), this time the program will exit correctly:

 Exiting from PAW.
 Exiting from GEANT.

Could you please have a look into this? This behaviour may also be
existing in more recent versions of this library.

Best regards,
            Sebastian

*** ftest/Makefile
# this will result in the wrong UGLAST being called
FC=gfortran
# this will work correctly
# FC=g77

default: test

test: libtest.a test.o
        $(FC) -o test test.o libtest.a -lgeant321

test.o: test.F
        $(FC) -c -o test.o test.F

libtest.a: test_last.o
        ar -cql libtest.a test_last.o

test_last.o:
        $(FC) -c -o test_last.o test_last.F

clean:
        rm -f test test.o libtest.a test_last.o


*** ftest/test.F
      PROGRAM TEST
C
      PARAMETER (KWBANK=12000000,KWWORK=40000)
      PARAMETER (NWPAW=300000,NWKUIP=30000)
      PARAMETER (NWGEAN=KWBANK)
C
      COMMON/GCBANK/GEANT(NWGEAN)
      COMMON/PAWC/PAW(NWPAW)
C
      EXTERNAL UGLAST
C
      CALL GPAW(NWGEAN,NWPAW)
C
      END
C
C
C
      SUBROUTINE UGINIT
      END

*** ftest/test_last.F
      SUBROUTINE UGLAST
      END


-- System Information:
Debian Release: 4.0
  APT prefers oldstable
  APT policy: (1000, 'oldstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-6-686-bigmem
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)

Versions of packages libgeant321-2-dev depends on:
ii  libgeant321-2           1:3.21.14.dfsg-4 [Physics] Library for Geant 3.21
ii  libpawlib2-lesstif-dev  1:2.14.04-7      Cernlib PAW library
(Lesstif-depen

Versions of packages libgeant321-2-dev recommends:
ii  geant321                1:3.21.14.dfsg-4 [Physics] Particle detector
descri

-- no debconf information





--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to