-
Notifications
You must be signed in to change notification settings - Fork 14
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
Problem to run the test program #6
Comments
I used the intel Fortran compiler with version 19.1.1.217 |
I fixed the bug by adding the following line at line #140 of file hosOcen.inc |
I think the hosNWT has similar bug suggest to add following at #150 of hosNWT.inc |
Dear trimtrim, I understand your problem. The test routine called "testSurf2Vol()" was used in Grid2Grid version1. There are two subroutines initializing HOS Ocean or NWT types.
I recommend you to use dictionary format which allows us a flexible input format, you will understand after comparing two subroutines. Here's what happens:
1. hosOcean.typ type, public :: typHOSOcean end type 2. hosOcean.inc Add the lines: Subroutine initHOSOcean(this, ...) Change the code: The same principles can be applied to HOSNWT. I will update the code and tutorials based on your comment. Thank you for reporting the error:) Have a nice day. Best regards, |
Dear Young-Myung Choi, Many thanks! |
Dear trimtrim, Thank you for the fast response. Then, I'll update the code as I recommended in the previous answer. We are planning to update Grid2Grid (version 3) to have generalized structure & input/output and more options. I'll try to make many tutorials to understand the features of the library after update. If you have suggestion or idea which could be good to include in the future, please let us know. We will very appreciate. Thank you and have a nice day! Best regards, |
Dear Young-Myung Choi, |
Dear trimtrim, You can take some code of "postGrid2Grid.inc". The class "typPostGrid2Grid" has a member class "typHOSVol2Vol" as: postGrid2Grid.typ Type, public :: typPostGrid2Grid Then, you can see the initialize subroutine for "typPostGrid2Grid": postGrid2Grid.inc subroutine initializePostG2G(this, inputFileName)
end subroutine For the input file, you use the input for postGrid2Grid execution in the source code: postGrid2Grid.dict In this file format, there is keyword Grid2Grid with value "HOSOcean". Then, the sub-dictionary named "HOSOcean" given in the file will pass into the vol2vol class (dict_%subDict(HOSOcean) returns sub-dictionary). HOSOcean Remark that there is $zMesh which contains the data of zMesh dictionary in the above (like a macro). If you just need a wrapper for HOS, you can simply look inside "example/fortGrid2Grid". Have a nice day! Best regards, |
Dear Grid2Grid developers:
I have problem to run the test subroutine in the src/libGrid2Grid/main.f90 after compiling the grid2grid library.
I can successfully compile the grid2grid library. However, when I test the surboutine testSurf2Vol() in debug mode, the program has error. The program i tested is located at src/libGrid2Grid/main.f90
The program generated the following error:
HOS Ocean Surf2Vol ...
forrtl: severe (174): SIGSEGV, segmentation fault occurred
Image PC Routine Line Source
Grid2GridTest 00000000006FC43A Unknown Unknown Unknown
libpthread-2.31.s 00007FFFF7E593C0 Unknown Unknown Unknown
Grid2GridTest 00000000004944A6 Unknown Unknown Unknown
Grid2GridTest 0000000000493F06 Unknown Unknown Unknown
Grid2GridTest 00000000004A48DA Unknown Unknown Unknown
Grid2GridTest 0000000000536384 Unknown Unknown Unknown
Grid2GridTest 0000000000534E90 Unknown Unknown Unknown
Grid2GridTest 000000000054A38F Unknown Unknown Unknown
Grid2GridTest 000000000040C4B8 Unknown Unknown Unknown
Grid2GridTest 0000000000403948 Unknown Unknown Unknown
Grid2GridTest 00000000004038D2 Unknown Unknown Unknown
libc-2.31.so 00007FFFF7C790B3 __libc_start_main Unknown Unknown
Grid2GridTest 00000000004037DE Unknown Unknown Unknown
I debug the code and fund the program will have error at line #209 of hosOcean.inc:
this%nXmode_ = nint(x1) * this%dict_%getIntOrDefault("extraInterpolationNumber", 1)
It looks like %this%dict_ is not initialized and the function getIntOrDefault() can't evaluate
this%nkey method.
The tested main program is changed to run the subroutine testSurf2Vol().
The program is as followings:
Program main
End Program
The text was updated successfully, but these errors were encountered: