-
Notifications
You must be signed in to change notification settings - Fork 6
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
[pp_ser] Addition of used statement to IMPLICIT NONE is not sufficient #5
Comments
I think in COSMO code the I would not say it is a bug. It can be an enhancement, maybe, because currently it is explicitly mandatory to put it and if you do in theory it works (unless you can prove it wrong...). |
Sure but there is some cases where this is not present and the "point" should be different ... for exemple after |
I don't know fortran very well. Shouldn't the |
So for example, this short program is totally valid in Fortran but PROGRAM dummy
INTEGER :: i = 10
!$ser init directory='.' prefix='Dummy'
!$ser mode write
!$ser data myi=i
END PROGRAM dummy |
Agreed, but that breaks the rules of COSMO. If you put an |
Yeah but shouldn't |
The point obviously is that we don't have a fortran parser in Yes, serialbox should be more than COSMO-specific. But this means facing a huge problem and put a lot of investment there. The current status is, it works provided you follow some rules. This is why I would not classify the above example as a bug, because it breaks these rules. And yes, these rules should at least be very explicit and documented, which is a bug for sure... |
Ok sure ... so let's keep this point as an enhancement |
My personally important remark is that I totally agree with you. The fact that you cannot write standard compliant fortran and expect ppser to work is horrible. But you are doing some work in parsing fortran, aren't you? Maybe you will come out with a good solution which involves a true fortran parser or something :-) |
Exactly, that's why I suggest to keep this issue for later ... but at least we have it somewhere |
I'll solve this issue because it cause me some trouble right now. Simple example that shows the problem MODULE m_ser
CONTAINS
SUBROUTINE serialize(a)
REAL(KIND=8), DIMENSION(:,:,:) :: a
!$ser init directory='.' prefix='SerialboxTest'
!$ser savepoint sp1
!$ser mode write
!$ser data ser_a=a
END SUBROUTINE serialize
SUBROUTINE dummy(a)
IMPLICIT NONE
REAL(KIND=8), DIMENSION(:,:,:) :: a
!$ser init directory='.' prefix='SerialboxTest'
!$ser savepoint sp2
!$ser mode write
!$ser data ser_a=a
END SUBROUTINE dummy
END MODULE m_ser In this case, the |
Now this will show my total ignorance of fortran, but couldn't you put a |
@andyspiros Yes you could. But in some cases you don't want it ... especially if you wanna have implicitly typed variable and in my case, the IMPLICIT NONE is removed by the source-to-source compiler that I use. So when I have a workflow like this:
I can be screwed. So I'm implementing better way to insert the |
@clementval This should be closed? |
If the program has no
IMPLICIT NONE
statement,pp_ser
abort and does not process the fileThe text was updated successfully, but these errors were encountered: