WebGPU WGLSL error occurs following outdated tutorials: "access mode 'write' is not valid for the 'storage' address space" - webgpu

Note: I've answered my own question here, and am posting so that others in the same situation may benefit.
I was following along with various WebGPU tutorials, in particular for compute shaders, these articles in particular: https://web.dev/gpu-compute/ and https://surma.dev/things/webgpu/ -- and obviously the WebGPU specifications have been adjusted since these articles were last updated.
The first error I encountered, was in WGSL, that #stage(compute) had been deprecated in favor of #compute -- this was an easy fix :)
However, the next error, had me stumped:
Tint WGSL reader failure: :9:46 error: access mode 'write' is not valid for the 'storage' address space
#group(0) #binding(2) var<storage, write> resultMatrix : Matrix;
^^^^^^^^^^^^
- While validating [ShaderModuleDescriptor]
- While calling [Device].CreateShaderModule([ShaderModuleDescriptor]).
Another message was also output:
1 error(s) generated while compiling the shader:
:9:46 error: access mode 'write' is not valid for the 'storage' address space
#group(0) #binding(2) var<storage, write> resultMatrix : Matrix;

The fix is simply replacing the following WGSL line:
#group(0) #binding(2) var<storage, write> resultMatrix : Matrix;
With the following fix:
#group(0) #binding(2) var<storage, read_write> resultMatrix : Matrix;
I managed to figure this out based on a table in this section of the WGSL specification

Related

Alpha Vantage error when symbol has digits

I'm trying to get quotes for an Australian stock with ticker A200.AX (aka A200.AUS) from Alpha Vantage.
I have no issues getting other symbols from the AX market, e.g.:
https://www.alphavantage.co/query?function=TIME_SERIES_DAILY&symbol=ETHI.AUS&apikey=demo
...returns data as expected
However when a symbol has digit(s) in it, it seems to return an error:
https://www.alphavantage.co/query?function=TIME_SERIES_DAILY&symbol=A200.AUS&apikey=demo
Invalid API call. Please retry or visit the documentation (https://www.alphavantage.co/documentation/) for TIME_SERIES_INTRADAY.
Same result for F100.AUS
I checked to make sure the ticker was valid: A200.AUS shows up if I search for it:
https://www.alphavantage.co/query?function=SYMBOL_SEARCH&keywords=A200.AUS&apikey=demo
I'm aware of some questions related to URL encoding, but I can't see any URL special characters in A200.AUS . Besides, using the search endpoint works with the ticker passed on literally.
Does anyone know how to download this stock's information or what I'm doing wrong?
Your use of the search endpoint is great, however A200.AUS is an ETF. Alpha Vantage has some ETFs, but currently, only 100% supports stocks.

Impex import export Error saving batch in bulk mode ambiguous unique keys

When I am exporting data from one environment and importing it to another, I am seeing an ambiguous unique keys error. I did check the ambiguity but did not find anything would cause this violation.
I get the following error (there are several identical errors but only posting 1):
Error Begin
**insert_update ABClCMSParagraphComponent;&Item;catalogVersion(catalog(id),version)[unique=true,allownull=true];content[lang=en];creationtime[forceWrite=true,dateformat=dd.MM.yyyy
hh:mm:ss];modifiedtime[dateformat=dd.MM.yyyy
hh:mm:ss];name;owner(&Item)[allownull=true,forceWrite=true];uid[unique=true,allownull=true]
ABClCMSParagraphComponent,8796158592060,,,Error saving batch in bulk
mode [reason:
unique keys {catalogVersion=CatalogVersionModel (8796093186649#41),
uid=DMparaleftdescrip} for model ABClCMSParagraphComponentModel
(8796158657596#1) - found 2 item(s) using the same keys]. Will try
line-by-line mode.,
unique keys {catalogVersion=CatalogVersionModel (8796093186649#41),
uid=comp_000003UX} for model ABClCMSParagraphComponentModel
(8796158592060#1) - found 2 item(s) using the same keys
;Item111;abcContentCatalog:Staged;"< p >Hello < a href="">world< /a><
/p>";12.09.2017 07:04:12;18.09.2017 09:38:39;Feed Article -
Makeup;;comp_000003UX
Error End
What would be the reason why it's showing the ambiguous error?
The logs didn't show the error clearly with the 2 check boxes that were selected. When I deleted these 2 columns, owner(&Item) & creationtime, the script imported successfully.
Often, when no specific errors are shown, there was a error saving the item. In your case it might be the initial attributes "owner" and "creationdate". If the item is present, initial attributes cannot be changed.

SAP Unicode: Offset exceed

I got some account issues in the SCN so I make a attempt here.
We switched to Unicode and got some issues with that. INFTY_TAB = PS+2. This coding gets an error that "the offset + length is exceeding".
I found some hints but couldn't really figure out how to fix this. And even when I manage to fix those errors I got a new error called 'Iclude-Report %HR_P9002 not found'. The IT is still there so is there something else I can check?
Definition of PS:
DATA: BEGIN OF PS OCCURS 0.
*This indicates if a record was read with disabled authority check.
data: authc_disabled(1) type c.
DATA: TCLAS LIKE PSPAR-TCLAS.
INCLUDE STRUCTURE PRELP.
DATA: ACRCD LIKE SY-SUBRC.
DATA: END OF PS.
TCLAS is a char(1) field.
This is the part where the error pops up:
INFTY_TAB = PS+2.
Error: I had to translate so sorry for some mistakes that could appear.
Offset and Length (=2432) exceed the length of the character based beginning (=2430) of the structure.
Depends on the length of INFTY_TAB. You have to explicitly set length:
INFTY_TAB = PS+2(length).
Official information is here. The important point to note is that the inclusion of SY-SUBRC (which is an INT4 field) places a limit to the range of fields you can access using this (discouraged) method of access.
ASSIGN field+off TO is generally forbidden from a syntactical
point of view since any offset <> 0 would cause the range to be
exceeded.
Although the sentence above is related to ASSIGN command, it is also valid for this situation.

Sphinx throws error when I turn on index_sp =1

I needed to uncomment and set to 1 so I can use the SENTENCE option in my query.
However I get:
ERROR: unknown key name 'index_sp' in /home/indexer/sphinx-dynamic.conf.ph
Is that option now deprecated?
The default/commented out index_sp was initially in the searchd block of options, I removed it and added it to the specific index block and it not only doesn't error it works as intended.

How to get the sql state from libpq?

I program with libpq.so. I want to get the error code which is called sql state in SQL Standard.How should I get this in my c code?
The obvious Google search for libpq get sqlstate finds the libpq-exec documentation. Searching that for SQLSTATE finds PG_DIAG_SQLSTATE in the PQresultErrorField section.
Thus, you can see that you can call PQresultErrorField(thePgResult, PG_DIAG_SQLSTATE) to get the SQLSTATE.
This is just addition I can not leave in form of comment due to reputation reasons.
Note that you can not portably get SQLSTATE for errors that can occur during PQconnectdb. In theory, you can read pg_conn (internal struct) field last_sqlstate which contains correct value.
For example, if you try to connect with invalid login/password, it will give you 28P01. For wrong database it will contain 3D000.
I wish they defined publically available getter for this field.
You can check this one as well:
libpq: How to get the error code after a failed PGconn connection