Re: [fluka-discuss]: linking user routine with flukadpm3

From: Francesc Salvat-Pujol <francesc.salvat.pujol_at_cern.ch>
Date: Tue, 14 Aug 2018 16:41:56 +0200

Hello,

The ar output is indeed complaining that there is no flukadpm3 to be
found. This is the default name given to the binary file produced by
regular linking with ldpmqmd, and not the name of a main program in the
FLUKA library (as far as I can tell) that you can request via -m.

You could try:

  $FLUPRO/flutil/fff mdstck.f
  $FLUPRO/flutil/ldpmqmd -o myfluka0 mdstck.o

Adapt to whichever user routine you use in the end. The ldpmqmd script
indeed calls lfluka with whichever arguments you pass, but inserting
first a series of necessary linker options for DPMJET and rQMD, which
were missing in your attempt. Any time DPMJET/rQMD are needed, though,
I would stick to the provided ldpmqmd for linking.

Cheers,

Cesc

On Tue, Aug 14 2018, at 11:31 +0200, baret_at_apc.univ-paris7.fr wrote:
>
>
>Hello,
>I want to use fluka as event generator for photon +hadron and hadron +hadron above 100GeV . To begin with I did a simple input with p/gamma beam (in att.) on a Fe Taget. Seems to work. Then I modified mdstk.f to print the variables of GENSTK (I realize now I might have tried longer with MGDRAW), compiled it succesfully and tried to link it with the executable created with ldpmqmd routine (which creates flukadpm3).
>It works well with the executable flukahp created with lfluka, but here I get the error at the end at the mail.
>It looks for the arxiv containing the .o of my executable but cannot find anywhere (neither do I…)
>I must do something wrong but cannot see what…
>Any idea?
>Thanks
>
>
>[baret_at_cca004 fluka2X]$ $FLUPRO/flutil/lfluka -o myfluka0 -m flukadpm3 usermvax/mdstck.o
>$FLUPRO = /sps/km3net/users/baret/fluka2X
> now linking
>/sps/km3net/users/baret/fluka2X
>gfortran
>ar x /sps/km3net/users/baret/fluka2X/libflukahp.a flukadpm3.o
>no entry flukadpm3.o in archive
>gfortran -msse2 -mfpmath=sse -fPIC -O3 -g -mtune=generic -fexpensive-optimizations -funroll-loops -fstrength-reduce -Wall -Wuninitialized -Wno-tabs -Wline-truncation -Wno-unused-function -Wno-unused-parameter -Wno-unused-dummy-argument -Wno-unused-variable -Wno-conversion -Wunused-label -Waggregate-return -Wcast-align -Wsystem-headers -ftrapping-math -frange-check -fbackslash -fdump-core -fbacktrace -ffpe-trap=invalid,zero,overflow -finit-local-zero -ffixed-form -frecord-marker=4 -funderscoring -fno-automatic -fd-lines-as-comments -fbounds-check -I/sps/km3net/users/baret/fluka2X/flukapro -v -o myfluka0 -Xlinker -Map -Xlinker myfluka0.map flukadpm3.o usermvax/mdstck.o -L/sps/km3net/users/baret/fluka2X -lflukahp
>Driving: gfortran -msse2 -mfpmath=sse -fPIC -O3 -g -mtune=generic -fexpensive-optimizations -funroll-loops -fstrength-reduce -Wall -Wuninitialized -Wno-tabs -Wline-truncation -Wno-unused-function -Wno-unused-parameter -Wno-unused-dummy-argument -Wno-unused-variable -Wno-conversion -Wunused-label -Waggregate-return -Wcast-align -Wsystem-headers -ftrapping-math -frange-check -fbackslash -fdump-core -fbacktrace -ffpe-trap=invalid,zero,overflow -finit-local-zero -ffixed-form -frecord-marker=4 -funderscoring -fno-automatic -fd-lines-as-comments -fbounds-check -I/sps/km3net/users/baret/fluka2X/flukapro -v -o myfluka0 -Xlinker -Map -Xlinker myfluka0.map flukadpm3.o usermvax/mdstck.o -L/sps/km3net/users/baret/fluka2X -lflukahp -l gfortran -l m -shared-libgcc
>gfortran: error: flukadpm3.o: No such file or directory
>Using built-in specs.
>COLLECT_GCC=gfortran
>COLLECT_LTO_WRAPPER=/pbs/software/x86_64_el7/gcc/6.4.0/libexec/gcc/x86_64-pc-linux-gnu/6.4.0/lto-wrapper
>Target: x86_64-pc-linux-gnu
>Configured with: ./configure --prefix=/pbs/software/x86_64_el7/gcc/6.4.0 --disable-multilib
>Thread model: posix
>gcc version 6.4.0 (GCC)
>
>
>



--
Francesc Salvat Pujol
CERN-EN/STI
CH-1211 Geneva 23
Switzerland
Tel: +41 22 76 64011
Fax: +41 22 76 69474
__________________________________________________________________________
You can manage unsubscription from this mailing list at https://www.fluka.org/fluka.php?id=acc_info
Received on Tue Aug 14 2018 - 18:26:46 CEST

This archive was generated by hypermail 2.3.0 : Tue Aug 14 2018 - 18:26:56 CEST