UCL / TDMS

Time Domain Maxwell Solver
https://github-pages.ucl.ac.uk/TDMS
GNU General Public License v3.0
12 stars 4 forks source link

Garbage when reading in a blank string for `tdfdir` on M2 Mac. #255

Closed samcunliffe closed 1 year ago

samcunliffe commented 1 year ago

Possibly related to #191. Probably related to #211. Superficially fixed by PR #254.

Bug investigation:

I noticed on (and only on?) my M2 Mac that all of the system tests fail. Unzipping the contents of arc_01.zip and running interactively (with a lot of debug printout), I get:

./tdms pstd_fs_input.mat fs_output.mat
[2023-03-10 11:31:59.189] [debug] Parsing 3 command line arguments
[2023-03-10 11:31:59.189] [info] Output file specified: fs_output.mat
[2023-03-10 11:31:59.189] [debug] Finished parsing arguments
[2023-03-10 11:31:59.190] [info] Input file: pstd_fs_input.mat | No gridfile supplied
[2023-03-10 11:31:59.196] [info] exi not present
[2023-03-10 11:31:59.196] [info] eyi not present
[2023-03-10 11:31:59.196] [info] Using pseudospectral method (PSTD)
[2023-03-10 11:31:59.196] [info] Using band-limited interpolation where possible
[2023-03-10 11:31:59.196] [debug] Finding the string: 'sourcemode'
[2023-03-10 11:31:59.196] [debug] This string is 7 chars long.
[2023-03-10 11:31:59.196] [debug] Have got the string. 'sourcemode' = 'pulsed'.
[2023-03-10 11:31:59.196] [debug] Have got the string. 'sourcemode' = 'pulsed'.
[2023-03-10 11:31:59.196] [debug] Finding the string: 'runmode'
[2023-03-10 11:31:59.196] [debug] This string is 9 chars long.
[2023-03-10 11:31:59.196] [debug] Have got the string. 'runmode' = 'complete'.
[2023-03-10 11:31:59.196] [debug] Have got the string. 'runmode' = 'complete'.
[2023-03-10 11:31:59.196] [debug] Finding the string: 'dimension'
[2023-03-10 11:31:59.196] [debug] This string is 2 chars long.
[2023-03-10 11:31:59.196] [debug] Have got the string. 'dimension' = '3'.
[2023-03-10 11:31:59.196] [debug] Have got the string. 'dimension' = '3'.
[2023-03-10 11:31:59.196] [info] intmethod = 1
[2023-03-10 11:31:59.196] [info] exi not present
[2023-03-10 11:31:59.196] [info] eyi not present
[2023-03-10 11:31:59.196] [info] f_ex_vec has ndims=2 N=512
[2023-03-10 11:31:59.196] [info] Np = 2, Nt = 500, Npe = 250, f_max = 2.94577e+14, Npraw = 0.4606
[2023-03-10 11:31:59.196] [debug] Finding the string: 'tdfdir'
[2023-03-10 11:31:59.196] [debug] This string is 1 chars long.
[2023-03-10 11:31:59.196] [debug] Have got the string. 'tdfdir' = ''.
[2023-03-10 11:31:59.196] [debug] Have got the string. 'tdfdir' = ''.
[2023-03-10 11:31:59.196] [debug] Will write the TD fields to '?'
[2023-03-10 11:31:59.196] [info] Ni_tdf = 276, Nk_tdf = 276
[2023-03-10 11:31:59.196] [debug] Will write the TD fields to '?'
[2023-03-10 11:31:59.196] [info] Isource is empty
[2023-03-10 11:31:59.196] [info] Jsource is empty
[2023-03-10 11:31:59.196] [info] f_ex_vec has ndims=2 N=512
[2023-03-10 11:31:59.197] [debug] init_diff_shift_op, delta=-0.5
[2023-03-10 11:31:59.197] [debug] init_diff_shift_op, delta=-0.5
[2023-03-10 11:31:59.197] [debug] init_diff_shift_op, delta=-0.5
[2023-03-10 11:31:59.197] [debug] init_diff_shift_op, delta=0.5
[2023-03-10 11:31:59.197] [debug] init_diff_shift_op, delta=0.5
[2023-03-10 11:31:59.197] [debug] init_diff_shift_op, delta=0.5
[2023-03-10 11:32:00.245] [info] dims: (254,1,254)
[2023-03-10 11:32:00.251] [info] Using 8 OMP threads
[2023-03-10 11:32:00.251] [info] refind (Refractive index) = 1.350014e+00
[2023-03-10 11:32:00.251] [info] Starting main looop
[2023-03-10 11:32:00.266] [info] Exporting field... folder_name = 
[2023-03-10 11:32:00.266] [debug] folder_name = 
[2023-03-10 11:32:00.266] [debug] folder_name = 
time domain output: /ex_000000.mat
[2023-03-10 11:32:00.266] [debug] Opened file /ex_000000.mat
0x117844b20
zsh: segmentation fault  ./tdms pstd_fs_input.mat fs_output.mat

Investigation:

samcunliffe commented 1 year ago

We can't run our CI on MacOS ARM images ... yet (https://github.com/actions/runner-images/issues/2187).

samcunliffe commented 1 year ago

🤦 this duplicates #129.

giordano commented 1 year ago

We can't run our CI on MacOS ARM images ... yet

I use Cirrus for running CI on apple silicon