Skip to content
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

See how a file is or is not found #1151

Merged
merged 1 commit into from
Jul 11, 2019
Merged

See how a file is or is not found #1151

merged 1 commit into from
Jul 11, 2019

Conversation

PaulWessel
Copy link
Member

Added more DBG statements in gntlib_getuserpath and gmt_getdatapath to track why GMT fails to find a particular file we know should be there.

Added more DBG statements in gntlib_getuserpath and gmt_getdatapath to track why GMT fails to find a particular file we know should be there.
@PaulWessel PaulWessel requested a review from joa-quim July 10, 2019 23:20
@PaulWessel
Copy link
Member Author

Try this with -Vd.

@joa-quim
Copy link
Member

When I try to run it in the debugger the first system call errors because it doesn't know "gmt"???
Is path being reset somewhere?

C:\v\build14\doc\examples\anim01>bash anim_01.sh
gmt.exe [DEBUG]: Obtained the ppid from parent: 22016
gmt.exe [DEBUG]: Enter: gmtinit_new_GMT_ctrl
gmt.exe [DEBUG]: GMT->session.SHAREDIR = c:/programs/gmt6/share
gmt.exe [DEBUG]: GMT->session.HOMEDIR = C:/j
gmt.exe [DEBUG]: GMT->session.USERDIR = C:/j/.gmt [created]
gmt.exe [DEBUG]: GMT->session.CACHEDIR = C:/progs_cygw/GMTdev/gmt5/tests_data [detected]
gmt.exe [DEBUG]: GMT: 0. Will try to find subdir=postscriptlight stem = PSL_custom_fonts suffix=.txt
gmt.exe [DEBUG]: GMT: 1. gmt_getsharepath trying current dir
gmt.exe [DEBUG]: GMT: 2. gmt_getsharepath trying USERDIR C:/j/.gmt
gmt.exe [DEBUG]: GMT: 3. gmt_getsharepath trying USERDIR subdir C:/j/.gmt/postscriptlight
gmt.exe [DEBUG]: GMT: 4. gmt_getsharepath trying SHAREDIR subdir c:/programs/gmt6/share/postscriptlight
gmt.exe [DEBUG]: GMT: 5. gmt_getsharepath failed
gmt.exe [DEBUG]: Map distance calculation will be Cartesian
gmt.exe [DEBUG]: Exit:  gmtinit_new_GMT_ctrl
gmt.exe [DEBUG]: Enter: New_PSL_Ctrl
gmt.exe [DEBUG]: Exit:  New_PSL_Ctrl
gmt.exe [DEBUG]: Enter: gmt_manage_workflow
gmt.exe [DEBUG]: Exit : gmt_manage_workflow
gmt.exe [DEBUG]: Enter: PSL_beginsession
gmt.exe [DEBUG]: Exit : PSL_beginsession
gmt.exe [DEBUG]: Enter: PSL_setdefaults
gmt.exe [DEBUG]: Exit : PSL_setdefaults
gmt.exe [DEBUG]: Enter: gmtlib_io_init
gmt.exe [DEBUG]: Exit : gmtlib_io_init
gmt.exe [DEBUG]: Enter: gmt_hash_init
gmt.exe [DEBUG]: Exit:  gmt_hash_init
gmt.exe [DEBUG]: Enter: gmt_hash_init
gmt.exe [DEBUG]: Exit:  gmt_hash_init
gmt.exe [DEBUG]: The PROJ_GEODESIC set to Vincenty
gmt.exe [DEBUG]: Enter: gmt_getdefaults
gmt.exe [DEBUG]: Look for file C:/j/gmt.conf
gmt.exe [DEBUG]: Look for file C:/j/.gmt/gmt.conf
gmt.exe [DEBUG]: Look for file C:/j/.gmt/server/gmt.conf
gmt.exe [DEBUG]: Look for file C:/progs_cygw/GMTdev/gmt5/tests_data/gmt.conf
gmt.exe [DEBUG]: Could not find file gmt.conf
gmt.exe [DEBUG]: Exit:  gmt_getdefaults
gmt.exe [DEBUG]: Enter: gmtlib_plot_C_format
gmt.exe [DEBUG]: Exit:  gmtlib_plot_C_format
gmt.exe [DEBUG]: Enter: gmtinit_get_history
gmt.exe [DEBUG]: GMT_Create_Session initialized GMT structure
gmt.exe [DEBUG]: Shared Library # 0 (core). Path = gmt_w64.dll
gmt.exe [DEBUG]: Loading core GMT shared library: gmt_w64.dll
gmt.exe [DEBUG]: Loading GMT plugins from: C:/programs/GMTdir/gmt_plugins
gmt.exe [DEBUG]: Shared Library # 1 (supplements). Path = C:/programs/GMTdir/gmt_plugins/supplements_w64.dll
gmt.exe [DEBUG]: Shared Library # 2 (mbgmt). Path = C:/programs/GMTdir/gmt_plugins/mbgmt_w64.dll
movie [DEBUG]: Found file main.sh
movie [DEBUG]: Found file main.sh
movie [INFORMATION]: Paper dimensions: Width = 4i Height = 2i
movie [INFORMATION]: Pixel dimensions: 500 x 250
movie [DEBUG]: Look for file sin_point.txt in C:/j/.gmt
movie [DEBUG]: Look for file sin_point.txt in C:/progs_cygw/GMTdev/gmt5/tests_data
movie [DEBUG]: Look for file sin_point.txt in C:/j/.gmt/server
movie [DEBUG]: Look for file sin_point.txt in C:/j/.gmt/server/srtm1
movie [DEBUG]: Look for file sin_point.txt in C:/j/.gmt/server/srtm3
movie [INFORMATION]: Create parameter initiation script movie_init.sh
movie [INFORMATION]: Create preflight script movie_preflight.sh and execute it
movie [DEBUG]: Found file sin_point.txt
movie [DEBUG]: Found file sin_point.txt
movie [DEBUG]: Found file sin_point.txt
movie [DEBUG]: Object ID 0 : Registered Data Table File sin_point.txt as an Input resource with geometry Non-Geographical [n_objects = 1]
movie [DEBUG]: api_begin_io: Input resource access is now enabled [container]
movie [DEBUG]: api_import_dataset: Passed ID = 0 and mode = 0
movie [INFORMATION]: Reading Data Table from File sin_point.txt
movie [DEBUG]: Found file sin_point.txt
movie [DEBUG]: Found file sin_point.txt
movie [DEBUG]: Source col types: (Number,Number)
movie [DEBUG]: ASCII source scanned: Numerical columns: 2, Trailing text: N, Record type: Numerical only
movie [DEBUG]: GMT memory: Initialize 2 temporary column double arrays, each of length : 0
movie [DEBUG]: GMT_End_IO: Input resource access is now disabled
movie [INFORMATION]: Number of animation frames: 19
movie [INFORMATION]: Create individual parameter include files per frame for 19 frames
movie [INFORMATION]: Create master frame script movie_master.sh
gmtconvert [ERROR]: Error for input file: No such file (sin_curve.txt)
gmtconvert [ERROR]: Error for input file: No such file (sin_point.txt)
movie [INFORMATION]: Single master plot (frame 0) built: anim_01.ps
movie [DEBUG]: gmtapi_garbage_collection: Destroying object: C=0 A=1 ID=0 W=Input F=Data Table M=File S=Used P=20e7579ca20 N=sin_point.txt
movie (gmt_free_table): tried to free unallocated memory
movie [DEBUG]: GMTAPI_Garbage_Collection freed 1 memory objects
movie [DEBUG]: gmtapi_unregister_io: Unregistering object no 0 [n_objects = 0]
movie [DEBUG]: GMT memory: Free 2 temporary column arrays, each of length : 2097152
gmt.exe [DEBUG]: Entering GMT_Destroy_Session

@joa-quim
Copy link
Member

@seisman Can you run the anim script with GMT from my Win installer?

@seisman
Copy link
Member

seisman commented Jul 11, 2019

@joa-quim Where is your Win installer? Do you mean GMT-6.0.0rc2?

@joa-quim
Copy link
Member

Yes

@seisman
Copy link
Member

seisman commented Jul 11, 2019

The animation tests are known to fail on Windows with GMT 6.0.0rc2. PR #1124 addressed the issue and was merged two days ago.

@joa-quim
Copy link
Member

OK, please try this one. Built today and has ffmpeg too.
http:https://w3.ualg.pt/~jluis/mirone/gmt-6.0.0_2019.07.10-win64.exe

@seisman
Copy link
Member

seisman commented Jul 11, 2019

I only tested anim01. Your Win installer works for me.

I tried:

  1. Put the script in C:/Users/seisman/Desktop/anim01 and ran it in git bash
  2. Put the script in C:/v/anim01 and ran it in git bash
  3. Put the script in C:/v/anim01 and run it in Windows cmd with bash anim01.sh

@joa-quim
Copy link
Member

Now this. I found that when run from the debugger it failed the system calls because it did not know what "gmt" is. But with "gmt.exe" it works. So I made a symbolic link gmt.exe <-> gmt and now run from the debugger it WORKS (creates the movie).

... more tests

It's the fck MinGW that I have installed. I also have WinGit bash and if I use it instead of the other one that it also works. The other one wants the executables to exist without the .exe extension (because the .sh say "gmt", not "gmt.exe"). This is bloody nuts.

@PaulWessel PaulWessel requested a review from seisman July 11, 2019 01:44
@PaulWessel
Copy link
Member Author

Yes, I was concerned that some of these problems are related to your particular setup - which is why it is nice to run those test in the CI and if they pass there we are probably doing the right thing. Maybe one of you can OK this PR - it only adds some debug print statements.

@PaulWessel PaulWessel merged commit e8bd4a3 into 6.0 Jul 11, 2019
@PaulWessel PaulWessel deleted the moredbgmessages branch July 11, 2019 02:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants