-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Macro changes #36
Comments
Please note, that you must apply the macro, best with the
|
Dear Aradi, It works, but not in right way. I did what You suggested, but the result (after FYPP) was: module init
contains
subroutine tst()
real :: ah2onw(2)
real :: dminfo
ah2onw =2.0
dminfo = 1.0
call bcast_doubles(dminfo,size($A$),$A$) !<---- here
end subroutine tst
subroutine bcast_reals(dminfo,n,a)
real, INTENT(IN) :: dminfo,a(:)
integer, intent(in) :: n
print *,'real'
end subroutine bcast_reals
subroutine bcast_doubles(dminfo,n,a)
real, INTENT(IN) :: dminfo,a(:)
integer, intent(in) :: n
PRINT *,'doubles'
end subroutine bcast_doubles See in comment (I did in code) that the FYPP put "call bcast_doubles(dminfo,size( I try to use #ifdef SINGLE_PRECISION
#define MACRO(A) call bcast_doubles(dminfo,size(A),A)
#else
#define MACRO(A) call bcast_reals(dminfo,size(A),A)
#endif
module init
contains
subroutine tst()
real :: ah2onw(2)
real :: dminfo
ah2onw =2.0
dminfo = 1.0
MACRO(ah2onw)
end subroutine tst I would like to exchange CPP by FYPP. But I need all features that I have in original code working in FYPP too. |
Sorry, I have concentrated on the
|
I have a code:
And my goal is that the FYPP makes the change of "DM_BCAST_MACRO(ah2onw)" by the macro defined at beginning of code. How can I make it?
The text was updated successfully, but these errors were encountered: