Hi,
I have a question about modules.
I have to call many subroutines in my program and many arrays are passed to these Routines(up to 20):
PROGRAM main
CALL Sub1(a,b,c,d,e,f,g,h,i)
CALL Sub2(a,b,c,d,e,f,g,h,i)
CALL Sub3(a,b,c,d,e,f,g,h,i)
END PROGRAM
So i made a module, which contains all these arrays, so that the code gets readable:
MODULE variables
DOUBLE PRECISION :: a),b),c),d),e),f),g),h),i)
END MODULE
PROGRAM main
USE variables
CALL Sub1
CALL Sub2
CALL Sub3
END PROGRAM
But now i have a problem with the runtime of the program. It's running twice as slow as before. Can anyone explain that to me and is there a way to keep the code readable and fast?
Thanks in advance
I have a question about modules.
I have to call many subroutines in my program and many arrays are passed to these Routines(up to 20):
PROGRAM main
CALL Sub1(a,b,c,d,e,f,g,h,i)
CALL Sub2(a,b,c,d,e,f,g,h,i)
CALL Sub3(a,b,c,d,e,f,g,h,i)
END PROGRAM
So i made a module, which contains all these arrays, so that the code gets readable:
MODULE variables
DOUBLE PRECISION :: a),b),c),d),e),f),g),h),i)
END MODULE
PROGRAM main
USE variables
CALL Sub1
CALL Sub2
CALL Sub3
END PROGRAM
But now i have a problem with the runtime of the program. It's running twice as slow as before. Can anyone explain that to me and is there a way to keep the code readable and fast?
Thanks in advance