Giter Site home page Giter Site logo

Comments (11)

a-oth avatar a-oth commented on July 1, 2024 1

We sorted out the missing changes that we forgot to port, and now all seems to work fine, thanks!

from sed-seiscomp-contributions.

luca-s avatar luca-s commented on July 1, 2024

Thank you for reporting the issue. In SeisComP 6 we have updated NonLinLoc to version 7.0.0 and this might be the cause. The old and new NonLinLoc versions are compatible, but you never know.

Could you confirm you are using SeisComP 6?

On a first attempt of debugging the issue we could check the NonLinLoc logs. To do so you can run scolv in debug mode (scolv --debug) and then select and relocate a problematic event with NonLinLoc also in debug mode. The logs will appear in your console. To make sure NonLinLoc is in debug mode please set the CONTROL statement accordingly (e.g. 9), for example by editing it in scolv:

image

Please report back the logs so we can see if the reason for the missed relocation is already visible there.

from sed-seiscomp-contributions.

a-oth avatar a-oth commented on July 1, 2024

Thanks very much for your quick response, I did as you suggested, and here is the logs output for the relevant part when I tried to relocate an event with our local benelux1d profile:

11:58:22 [debug] Relocating origin with publicID: Origin/20231129105822.510793.70422
11:58:22 [debug] requested earth model: benelux1d
11:58:22 [debug] New origin publicID: NLL.20231129105822.512592.70423
NLLoc (NonLinLoc v7.00.13 17Jan2022)
CONTROL: MessageFlag: 9 RandomNumSeed: 54321
LOCGAUSS: SigmaT: 0.200000 CorrLen: 0.000000
LOCGAUSS2: SigmaTfraction: 0.010000 SigmaTmin: 0.050000 SigmaTmax: 2.000000
GRID: {x, y, z}
Num: {600, 600, 60}
Orig: {-300, -300, 0}
LenSide: {1, 1, 1}
Type: PROB_DENSITY
LOCGRID: Save: SAVE
LOCMETH: method: EDT_OT_WT minDistStaGrid: -1.000000 maxDistStaGrid: 1000000.000000 minNumberPhases: 4 maxNumberPhases: 50 minNumberSphases: -1 VpVsRatio: -1.680000 max3DGridMemory: 6 DistStaGridMin: -1.000000 iRejectDuplicateArrivals: 1
LOCSEARCH: Type: OCT init_num_cells_x 20 init_num_cells_y 20 init_num_cells_z 4 min_node_size 0.010000 max_num_nodes 50000 num_scatter 10000 use_stations_density 0 stop_on_min_node_size 1 octtreeParams.mean_cell_velocity -1.000000
SOURCE: 0 Name: NEUF Loc: type: LATLON Lat 49.3259 Long 6.02549 Depth -0.26
SOURCE: 1 Name: RUMEL Loc: type: LATLON Lat 49.4538 Long 6.01075 Depth -0.286
SOURCE: 2 Name: MANO Loc: type: LATLON Lat 48.8277 Long 5.92254 Depth -0.273
SOURCE: 3 Name: RIVT Loc: type: LATLON Lat 49.7071 Long 6.7638 Depth -0.274
SOURCE: 4 Name: DOU Loc: type: LATLON Lat 50.095 Long 4.5946 Depth -0.224
SOURCE: 5 Name: KLB Loc: type: LATLON Lat 50.1 Long 6.109 Depth -0.475
LOCFILES: ObsType: NLLOC_OBS InGrids: /Users/adrien/.seiscomp/nll/time/benelux1D.* OutPut: /Users/adrien/.seiscomp/nll/output/NLL.20231129105822.512592.70423.* iSwapBytesOnInput: 0
Obs File: 0 -
LOCHYPOUT: NONE
INFO: no station distance weighting (LOCSTAWT) values read.
INFO: no Search Prior (LOCPRIOR) values read.
INFO: no Search Prior (LOCPOSTERIOR) values read.
INFO: no Magnitude Calculation (LOCMAG) params read.
INFO: no Component Descirption (LOCCMP) params read.
INFO: no Alias (LOCALIAS) params read.
INFO: no Exclude (LOCEXCLUDE) params read.
INFO: no Include (LOCINCLUDE) params read.
INFO: no Time Delay (LOCDELAY) params read.
INFO: no Topo Surface (LOCTOPO_SURFACE) params read.
INFO: no Time Delay Surface (LOCDELAY_SURFACE) params read.
INFO: no Elevation Correction (LOCELEVCORR) params read.
INFO: no Fixed Origin Time (LOCFIXOTIME) params read.
NLLoc: FATAL ERROR: Cannot pass observations file lines as string array to NLLoc function: GNU C library extensions needed to support memory streams (function open_memstream(); see compiler define _GNU_SOURCE).
11:58:22 [debug] NLLoc returned with code -1

from sed-seiscomp-contributions.

a-oth avatar a-oth commented on July 1, 2024

And yes, we use version 6 (master branch, i.e. developer version)

from sed-seiscomp-contributions.

luca-s avatar luca-s commented on July 1, 2024

The issue is shown in this line:

NLLoc: FATAL ERROR: Cannot pass observations file lines as string array to NLLoc function: GNU C library extensions needed to support memory streams (function open_memstream(); see compiler define _GNU_SOURCE).
11:58:22 [debug] NLLoc returned with code -1

This line is generated from this line of code here:

#ifdef _GNU_SOURCE
 ....
#else
        nll_puterr("FATAL ERROR: Cannot pass observations file lines as string array to NLLoc function: GNU C library extensions needed to support memory streams (function open_memstream(); see compiler define _GNU_SOURCE).");
        ....
#endif

So, if the macro _GNU_SOURCE is not defined AT COMPILE TIME you will always get that error.

The macro _GNU_SOURCE may be defined in here and it is defined only if you are compiling with GCC:

IF(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
	IF (CMAKE_COMPILER_IS_GNUCC)
		ADD_DEFINITIONS(-D_GNU_SOURCE)
	ENDIF (CMAKE_COMPILER_IS_GNUCC)
ELSE(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
	ADD_DEFINITIONS(-DINLINE="")
ENDIF(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")

Bottom line: your events are not relocated because the _GNU_SOURCE macro is not defined.

However, _GNU_SOURCE macro was the same even in seiscomp 5 and the error doesn't seem to be related to seiscomp 6. Did you change anyting else other than upgrading to seiscomp 6, for example a new compiler? Anything else in the system?

from sed-seiscomp-contributions.

luca-s avatar luca-s commented on July 1, 2024

I didn't read the _GNU_SOURCE macro test correctly. It actually never sets it if you are comping on "Darwin", that is MACOS. So it should have never worked on your machine, not even with seiscomp 5.

Is it possible that you modified something in the CMakeList.txt or in the NLL source code and you forgot to port the changes when you updated to seiscomp 6?

from sed-seiscomp-contributions.

a-oth avatar a-oth commented on July 1, 2024

Yes you are right, actually there are changes that were not ported indeed! I will check this out in detail but that's for sure the reason, thanks very much!

from sed-seiscomp-contributions.

luca-s avatar luca-s commented on July 1, 2024

Great if it is as simple as porting the changes to seiscomp 6. Let me know if you manage to solve the issue.

from sed-seiscomp-contributions.

gilcel avatar gilcel commented on July 1, 2024

This is fixed with commit:
gilcel@0d22a45

I completely forgot to add these changes to our latest seiscomp macOS version 7.0.0, but we had it already on our old seiscomp-macOS version 6.x and worked without any issue.

Should I do a Pull Request ?

from sed-seiscomp-contributions.

luca-s avatar luca-s commented on July 1, 2024

Since macOS is not officially supported by SeisComP I would like to avoid integrating those changes. I might accept to modify the code in a way that it can work in macOS, but including macOS specific code is not possible: I won't be able to test the code and also I would have to maintain it.

However if you manage to merge your PR into the official NLL code then I will integrate it as the SeisComP NLL plugin is downstream to official NLL code.

from sed-seiscomp-contributions.

gilcel avatar gilcel commented on July 1, 2024

OK thanks, I will try to integrate the changes for macOS to the NLL repo.

from sed-seiscomp-contributions.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.