Debug flags, setdflags and wscheck

The Dyalog "Knowledgebase". This forum is read-only
Forum rules
The FAQ is a read-only forum which is in general updated only by employees of Dyalog Ltd. It replaces the FAQ page which existed under http://www.dyalog.com. Rather than rejecting other posts to this forum, such posts will be put in a moderation queue, and moved to a more appropriate forum.

Debug flags, setdflags and wscheck

Postby AndyS|Dyalog on Thu Sep 22, 2011 1:50 pm

The Dyalog APL User Guide lists a number of debug flags which can be used when trying to identify issues which cause Dyalog APL to terminate abnormally. They specify when a workspace integrity check (wscheck) is to be run. These workspace integrity checks check the consistancy of the workspace, and if a problem is found, APL terminates having generated an APL core file.

A wscheck is always performed immediately after a workspace has been loaded, and also as the first task during a workspace save.

It is also possible to enable and disable these wschecks under program control.

To force a single wsheck:
      2 ⎕nq '.' 'wscheck'

To change the current debug level:
      previous_value←2 ⎕nq '.' 'setdflags' newvalue

The most common values, their equivalent startup flags and their purpose are:
      Value   Startup flag   Purpose
0 <none> no extra wscheck
2 -Dc wscheck after each callback
64 -DW wscheck after each line of APL
128 -Dw wsheck on return to session input

Note that the values are additive - which is why they are all powers of 2!
Note also that other values are valid but should be used only when directed to by Dyalog support; in particular 32 causes the contents of the workspace to be shuffled around - this will have a huge impact on the speed of execution of the code in your workspace !
User avatar
AndyS|Dyalog
 
Posts: 263
Joined: Tue May 12, 2009 6:06 pm

Return to Frequently Asked Questions (FAQ)

Who is online

Users browsing this forum: No registered users and 1 guest