Dear experts,
A custom user routine has been written to score the averaged track KE and LET in 3D array using comscw.f template along side with with other two subroutines. We used to run these subroutines in FLUKA.org and its GUI flair 2.3. Recently, I’m trying to compile and create an executable on flair 3.1-13 but it outputs the next error:
…/comscw.f:191:12:
191 | ke_array(xidx,yidx,zidx) = ke_array(xidx,yidx,zidx) + KE
| 1
Error: The function result on the lhs of the assignment at (1) must have the pointer attribute.
…/comscw.f:192:12:
Ended: 2021.04.23 12:45:02
Error compiling
Error: compiling file: …/comscw.f
No object generated
Any suggestion to resolve this issue would be appreciated.
Thank you David for clarification,
I’m not an expert in coding but I’ve added the following lines:
DOUBLE PRECISION,DIMENSION(:,:,:),ALLOCATABLE::ke_array
DOUBLE PRECISION,DIMENSION(:,:,:),ALLOCATABLE::cnt_array
DOUBLE PRECISION,DIMENSION(:,:,:),ALLOCATABLE::let_array
DOUBLE PRECISION,DIMENSION(:,:,:),ALLOCATABLE::nlet_array
then flair has successfully compiled the subroutines and generated executable, when I ran the simulation it finished with error
Dear David,
I see your point and in fact what you pointed out is already written within usrini.f routine. The idea is to compile and link the following user routines, usrini.f, comscw.f, and usrout.f. (in this order) to score KE and LET. Again those routines were function previously and wondering why it’s not working anymore.
please find the attachments so that you can examine the problem.usrini_rt_immun.f (7.1 KB) usrout_rt_immun.f (3.0 KB)