Hello everyone!
We are trying to run a simulation but I am unable to link the routine on my computer. Seems to be the problem only on my machine as my colleague is able to run it smoothly on his computer.
Could you please take a look and point us in the right direction to solve this.
We checked the libraries, export paths and so on and managed to create the .o file but still not linking.
I am posting below the error I get from the Output window and the simulation files.
Thank you in advance!
Output window errors
Started 2024.10.25 10:07:59
- Compiling: /usr/local/fluka/bin/fff lattic.f
gfortran -c -I/usr/local/fluka/include -g -cpp -O3 -fd-lines-as-comments -Wall -Waggregate-return -Wcast-align -Wline-truncation -Wno-conversion -Wno-integer-division -Wno-tabs -Wno-unused-dummy-argument -Wno-unused-function -Wno-unused-parameter -Wno-unused-variable -Wsystem-headers -Wuninitialized -Wunused-label -mtune=generic -msse2 -mfpmath=sse -fPIC -fexpensive-optimizations -funroll-loops -fstrength-reduce -fno-automatic -finit-local-zero -ffixed-line-length-132 -fbackslash -funderscoring -frecord-marker=4 -falign-commons -fbacktrace -frange-check -fbounds-check -fdump-core -ftrapping-math -ffpe-trap=invalid,zero,overflow -o lattic.o lattic.f
- Linking: /usr/local/fluka/bin/lfluka -o myfluka lattic.o
gfortran -o myfluka -fuse-ld=bfd lattic.o -L/usr/local/fluka/lib -lfluka -lstdc++ -lz
/usr/bin/ld.bfd: cannot find -lz: No such file or directory
collect2: error: ld returned 1 exit status
Ended: 2024.10.25 10:07:59
Error linking
Error: executable is not generated
lattic.f (12.7 KB)
activation3.flair (765 Bytes)
activation3.inp (47.2 KB)
Hello Irina,
Try:
sudo apt-get install libz-dev
Best,
Mihaela
1 Like
Dear Mihaela,
Thank you for your reply but after installing the libz-dev I still cannot manage to compile…
I am inserting below the error, somehow new info or more errors
Started 2024.10.25 11:19:42
- Compiling: /usr/local/fluka/bin/fff lattic.f
gfortran -c -I/usr/local/fluka/include -g -cpp -O3 -fd-lines-as-comments -Wall -Waggregate-return -Wcast-align -Wline-truncation -Wno-conversion -Wno-integer-division -Wno-tabs -Wno-unused-dummy-argument -Wno-unused-function -Wno-unused-parameter -Wno-unused-variable -Wsystem-headers -Wuninitialized -Wunused-label -mtune=generic -msse2 -mfpmath=sse -fPIC -fexpensive-optimizations -funroll-loops -fstrength-reduce -fno-automatic -finit-local-zero -ffixed-line-length-132 -fbackslash -funderscoring -frecord-marker=4 -falign-commons -fbacktrace -frange-check -fbounds-check -fdump-core -ftrapping-math -ffpe-trap=invalid,zero,overflow -o lattic.o lattic.f
- Linking: /usr/local/fluka/bin/lfluka -o myfluka lattic.o
gfortran -o myfluka -fuse-ld=bfd lattic.o -L/usr/local/fluka/lib -lfluka -lstdc++ -lz
/usr/bin/ld.bfd: lattic.o: in function master.0.lattic_.isra.0': /home/irinadinescu/IRINA/NEGOITA/geometrie cu lattices/geomeries/lattic.f:263:(.text+0x407): undefined reference to
dcdrtn_’
/usr/bin/ld.bfd: /home/irinadinescu/IRINA/NEGOITA/geometrie cu lattices/geomeries/lattic.f:106:(.text+0x604): undefined reference to `dcdrtn_’
collect2: error: ld returned 1 exit status
Ended: 2024.10.25 11:19:43
Error linking
Error: executable is not generated
Can you please try to remove the empty spaces in your folder name? For example geometrie_cu_lattices
Nope, I modified the names and I still get the same error.
Started 2024.10.25 12:03:17
- Compiling: /usr/local/fluka/bin/fff lattic.f
gfortran -c -I/usr/local/fluka/include -g -cpp -O3 -fd-lines-as-comments -Wall -Waggregate-return -Wcast-align -Wline-truncation -Wno-conversion -Wno-integer-division -Wno-tabs -Wno-unused-dummy-argument -Wno-unused-function -Wno-unused-parameter -Wno-unused-variable -Wsystem-headers -Wuninitialized -Wunused-label -mtune=generic -msse2 -mfpmath=sse -fPIC -fexpensive-optimizations -funroll-loops -fstrength-reduce -fno-automatic -finit-local-zero -ffixed-line-length-132 -fbackslash -funderscoring -frecord-marker=4 -falign-commons -fbacktrace -frange-check -fbounds-check -fdump-core -ftrapping-math -ffpe-trap=invalid,zero,overflow -o lattic.o lattic.f
- Linking: /usr/local/fluka/bin/lfluka -o myfluka lattic.o
gfortran -o myfluka -fuse-ld=bfd lattic.o -L/usr/local/fluka/lib -lfluka -lstdc++ -lz
/usr/bin/ld.bfd: lattic.o: in function master.0.lattic_.isra.0': /home/irinadinescu/IRINA/NEGOITA/GEOMETRIES/lattic.f:263:(.text+0x407): undefined reference to
dcdrtn_’
/usr/bin/ld.bfd: /home/irinadinescu/IRINA/NEGOITA/GEOMETRIES/lattic.f:106:(.text+0x604): undefined reference to `dcdrtn_’
collect2: error: ld returned 1 exit status
Ended: 2024.10.25 12:03:17
Error linking
Error: executable is not generated
amario
(amario)
25 October 2024 09:46
6
Dear @irina.dinescu ,
Could you please tell us which fluka version you are using and which version your colleague is using?
I am using the last version of the fluka@cern but he’s using the fluka@org version.
We modified the .f file so that it is consistent with the @cern version that I am using - meaning we modified the include declaration so that they match the libraries.
I think maybe this is one of the issues, the different versions that we use but unfortunately I don’t know how to modify the .f file more
ceruttif
(Francesco Cerutti)
25 October 2024 16:07
8
Please note that user routines from independent distributions are not interchangeable, being the differences not limited to INCLUDE statements, and are subject to different licences.
(Here the issue is clearly indicated by the error message:
That subroutine does not exist, as well as the associated MODRTN variable).
In fact, it’s not a matter of fixing an incompatible version, rather of properly implementing your geometry by the combination of the input file and the lattic.f routine.
Ohhhh, so there is not possible way to use it since he’s on the @org version? I should do the same on the version that I’m using?
ceruttif
(Francesco Cerutti)
26 October 2024 10:37
10
As a matter of fact, input files and user routines from independent distributions are not interchangeable. See past clarifications in this regard.