Skip to content

Commit 79ed063

Browse files
author
andy
committed
Merge remote-tracking branch 'origin/wip/bugs-a8'
2 parents 8d3b06a + 3adfaeb commit 79ed063

60 files changed

Lines changed: 1038 additions & 138 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎GETTING_STARTED.md‎

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -441,6 +441,10 @@ preference, or `~/.ECCE/RemoteServer/`, which `ecce-remote-setup <host>
441441
--user --auto` writes without root) and changes from **Edit > Change
442442
Server...** in the Organizer, which shows the current mode and data folder.
443443
The change applies at the next start; nothing is copied between modes.
444+
The data server's login window has a button **Use this computer
445+
instead...** that does the same as choosing this computer there
446+
(`ecce-first-start --apply local`) and ends that start with a message to
447+
start again.
444448
On Windows `ecce.cmd` runs the window with the package's own Python and, for
445449
a server, starts the session the same way `ecce -remote` does (the broker
446450
file, then the Organizer). On macOS the window needs wxPython, which
@@ -463,10 +467,13 @@ asked** where an administrator or the command line decides:
463467
`siteconfig/RemoteServer` present (an administrator or `ecce-remote-setup` as
464468
root), `ecce -remote` or `ECCE_REMOTE_SERVER`, `ECCE_LOCAL_DATA` or `ecce
465469
--local`, a shared broker declared (`siteconfig/SharedBroker`), an account
466-
marked as a central server (`~/.ECCE/mosquitto.server`), and on Linux **any
467-
installation that has the `ecce-server` package** (the server itself, and
468-
remote desktop sessions such as FastX on it). So modes 2 and 3, the server
469-
machine and the all-in-one install behave exactly as before.
470+
marked as a central server (`~/.ECCE/mosquitto.server`). An installed
471+
`ecce-server` package is not configuration: its users are asked too, and a
472+
user who already works on the per-user data server finds **Store data on
473+
this computer** preselected, where Continue keeps that data server. On a
474+
server whose users log in to it (FastX), `ecce-remote-setup` run as root
475+
(`siteconfig/RemoteServer`) points everyone at the server and nothing is
476+
asked.
470477
`ECCE_NO_FIRST_START=1` never asks (tests and scripts set it), and without a
471478
display or wxPython nothing is asked.
472479

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
type: pitfall
3+
title: "genmol is handed the whole molecule after the Builder's Find"
4+
area: codereg
5+
paths: ["src/apps/symmetry/dosymops.f", "src/apps/symmetry/genmol.f", "src/viz/sgcommands/FindSymmetryCmd.C", "src/tdat/chemistry/Fragment.C", "src/apps/calced/CalcEd.C", "src/apps/calced/ESInputController.C"]
6+
issues: []
7+
---
8+
**Symmetry > Find sets `Fragment::useSymmetry(true)` on the whole molecule,
9+
not on its symmetry-unique atoms.** The Calculation Editor (and the input
10+
writer's `NumElectrons`) then run `Fragment::generateFullMolecule()`, i.e.
11+
genmol, on every atom. genmol must therefore return a molecule that is
12+
already complete unchanged.
13+
14+
It did not: in `dosymops.f` the "is this atom already present" test had an
15+
empty body, so each atom's images were added again. Water came back as
16+
H4O (5 atoms, 12 electrons), methane as 17 atoms, benzene as 72, in every
17+
release from the PNNL base to 9.0.0-alpha.8. The test now skips an atom
18+
already generated from an earlier one; from an irreducible set the result
19+
is unchanged. Only for molecules (`itype` 0): genmollat shares
20+
`dosymops.f`, works in fractional coordinates, and the Builder's lattice
21+
tools (Generate, supercells, folding; `tests/apps/pbc_edit_test.py`,
22+
`nmode_edit_test.py`) lost atoms when the skip applied there too.
23+
24+
Tests: `tests/symmetry/run_tests.py` (`checkGenmol`: full and irreducible
25+
input for water, methane, benzene) and `tests/apps/symmetry_find_test.py`
26+
(the real Builder Find and Calculation Editor).

‎docs/claude/codereg/index.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ unit is produced in `ai.<code>`/the `.tpl`, closest to the input deck.
120120
- [Never point an `ai.<code>` script's `-t` at the repo's own template](never-point-an-ai-code-scripts-t.md)
121121
- [Codereg dialogs are never told which elements the structure contains](codereg-dialogs-are-never-told-which-elements.md)
122122
- [CalcEd's own ES.Theory.UseSymmetry key is lost whenever p_GUIValues is replaced](calced-owns-use-symmetry-key.md)
123+
- [genmol is handed the whole molecule after the Builder's Find, and must return it unchanged](genmol-is-handed-the-whole-molecule.md)
123124
- [A dialog's choice string must match the generator's expected string EXACTLY, or selecting it silently emits nothing](a-dialogs-choice-string-must-match-the.md)
124125
- [The basis-set writers decide *how* a basis reaches the deck, and every bug in them is silent](the-basis-set-writers-decide-how-a.md)
125126
- [A Gaussian basis keyword is selectable only if the library has an entry; tools/basissets/g16_basis_dump.py makes one from the keyword](a-gaussian-basis-keyword-needs-a-library-entry.md)

‎docs/claude/services/first-start-question.md‎

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ asks once per user ("Store data on this computer" / "Connect to a server"); the
1111
answer goes to `~/.ECCE/first-start-answer`. Only that answer and explicit
1212
configuration skip it (`skip_reason()`: siteconfig/RemoteServer,
1313
SharedBroker, `-remote`, `--local`/ECCE_LOCAL_DATA, a central-server account,
14-
the server package on Linux, no display, ECCE_NO_FIRST_START). Existing data
14+
no display, ECCE_NO_FIRST_START). An installed server package is not
15+
configuration and does not skip it (Andy, 2026-10-09). Existing data
1516
(a local folder, ~/.ECCE/dataserver, a server chosen, the preference) only
1617
preselects the window, which then shows the current setup; keeping a
1718
per-user data server records the answer without switching the preference.
@@ -52,6 +53,17 @@ to `tests/apps/first_start_test.py`.
5253
Edit > Change Server... starts the script with `python3w.exe` on Windows.
5354
- macOS: ECCE.app bundles no Python or wxPython, so the window is skipped
5455
silently (ImportError) until it does; local data stays the default there.
55-
- Tests set `ECCE_FIRST_START_ANSWER` (`local`, `server:host[:port]`) and
56-
`ECCE_FIRST_START_SHOT`; never synthetic input. `tests/apps/session_end.py
56+
- The data server login window (WxAuth, shown by `WxDavAuth::prompt` in
57+
a data-server session) has "Use this computer instead...": it runs
58+
`ecce-first-start --apply local`, says the change applies at the next
59+
start, and ends this one (the gateway skips its "Authentication
60+
Failure" message, other apps leave their main loop). Restart rather
61+
than switch in place: the session's broker and -remote state are
62+
already set up. Test hook `ECCE_TEST_AUTH_ANSWER=uselocal[:s]`;
63+
`tests/apps/session_end.py auth-uselocal`.
64+
- Tests set `ECCE_FIRST_START_ANSWER` (`local`, `server:host[:port]`,
65+
`continue` = Continue on what is preselected; the window logs
66+
"preselected local|server") and `ECCE_FIRST_START_SHOT`; never synthetic
67+
input. The suite's isolated user (`tests/apps/isolate.py`) has a recorded
68+
answer, so the other cases are not asked. `tests/apps/session_end.py
5769
first-local first-server` drive it through the real `ecce`.

‎docs/claude/services/index.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,5 @@ what the deployment mode needs (GETTING_STARTED, "Deployment modes"):
5858
- [macOS: ECCE.app carries its own Python with wxPython; every python3 ECCE runs must find it first (#133)](macos-theory-dialogs-need-python3-with-wxpython.md)
5959
- [macOS: BSD env has no -0, so a machine's login file was silently ignored (#133)](macos-env-has-no-dash-zero.md)
6060
- [tests/macos/e2e.sh: water single points on a Mac with real codes](macos-end-to-end-run.md)
61+
- [Windows: the user's folder can hold a space, and every path ECCE builds sits below it (#247)](windows-paths-hold-spaces.md)
62+
- [Windows: a text-mode stream's tellg() is not the length of what it reads; DAV PUT 400 (#247)](windows-dav-put-text-mode.md)
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
type: pitfall
3+
title: "Windows: a text-mode stream's tellg() is not the length of what it reads (DAV PUT 400)"
4+
area: services
5+
paths: ["src/dsm/dav/EcceDAVClient.C", "src/apps/calced/ESInputController.C", "src/comm/commxt/JobStore.C", "src/comm/commxt/Launch.C"]
6+
issues: [247]
7+
---
8+
**A Windows client saving to a data server got "input file copy to DAV
9+
failed" for every input deck** (Apache: 400, "An error occurred while
10+
reading the request body"). The deck is written by Strawberry Perl with
11+
CRLF line ends and handed to `putInputFile()` as a text-mode `ifstream`.
12+
`EcceDAVClient::getStreamSize()` took the Content-Length from
13+
`seekg(end)/tellg()`, which counts bytes on disk, while reading the
14+
stream drops each CR: the body came up short and the server gave up.
15+
Local mode never noticed, because it copies the file.
16+
17+
On Windows the size is now counted by reading the stream, so what is sent
18+
is LF-only text and the length matches. Binary files must still be opened
19+
with `ios::binary` by the caller: a text-mode read also stops at a
20+
Ctrl-Z byte.
21+
22+
Test: `tests/windows/central_win.py` (a Windows client against a central
23+
server: first-start answer, login through `-pipe`, a calculation made and
24+
its input saved and read back over WebDAV).
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
type: pitfall
3+
title: "Windows: the user's folder can hold a space, and every path ECCE builds sits below it"
4+
area: services
5+
paths: ["src/comm/rcommand/RCommand.C", "include/comm/RCommand.H", "src/comm/commxt/Launch.C", "src/comm/commxt/JobStore.C", "src/apps/calced/ESInputController.C", "src/apps/calced/CalcEd.C", "src/apps/calced/InputVerifier.C", "src/dsm/xml/JCode.C", "src/tdat/chemistry/SymmetryOps.C", "src/tdat/chemistry/Fragment.C", "scripts/gensub", "scripts/parsers/*.launchpp", "src/comm/rcommand/DirectTransportWin.C"]
6+
issues: [247]
7+
---
8+
**ECCE_HOME (`%LOCALAPPDATA%\Programs\ECCE`), the temp folder, the
9+
local data folder and the default run directory (`~/ecce-runs`) are all
10+
below `C:\Users\<name>`, and a Windows user name can contain a space.**
11+
Every command line that pastes one of these in unquoted breaks there,
12+
usually silently: Save said it could not create the temporary
13+
calculation directory (`test -d` on two words), the Theory/Runtype
14+
dialogs got their temp file as two arguments, gensub read the run
15+
directory up to the space from its param file, and a launchpp split
16+
`runDir: C:/...` at the drive colon.
17+
18+
Rules: RCommand's file operations (`exists`, `directory`, `writable`,
19+
`cd`, `shellget`) take a *path*, not shell syntax; they quote it
20+
themselves. Command lines built elsewhere quote with
21+
`RCommand::quotePath()` (single quotes, a leading `~`/`~/` left bare so a
22+
remote shell still expands it) or `quoteGlob()` for a pattern; a line
23+
that may reach cmd.exe (`Ecce::runCommand`, `CreateProcess`) uses double
24+
quotes. gensub writes the run directory through `shWord()`, which leaves a
25+
plain path as it is, so the golden scripts did not change. A `key: value`
26+
reader splits at the first colon or space only.
27+
28+
Test it with a tree *and* a state folder under a path with a space:
29+
`tests/windows/e2e_win.py "<tree with space>" "<state with space>"` (its
30+
temp folder is below the state folder); `tests/transport/testRCommandDirect.C`
31+
(`spaceChecks`) and `tests/queues/run_tests.py` (`spacedRunDir`) cover the
32+
Linux side. An `msiexec /a` tree has no `tmp` folder (the installer creates
33+
it), and MSYS then prints "could not find /tmp" on every shell start; make
34+
one when testing from such a tree.

‎help/src/installation.md‎

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,10 @@ Click **Continue** to confirm. ECCE remembers your choice and does not ask
119119
again. **Quit** closes ECCE without choosing anything.
120120

121121
ECCE asks on Linux, macOS and Windows alike: on your own laptop you can
122-
connect to your teacher's server in the same way. It does not ask if it is
123-
already set up: on a computer that has a server configured by its
124-
administrator, on a server itself, or when you have used ECCE here before.
122+
connect to your teacher's server in the same way. Once you have answered,
123+
it does not ask again. It does not ask at all on a computer whose
124+
administrator has already set up a server, or in the account that runs the
125+
server.
125126

126127
If ECCE cannot connect, it tells you in the same window. Check the address
127128
and your network connection, then click **Continue** again.
@@ -133,6 +134,10 @@ certificate ever changes, ECCE does not log you in and says so; ask the
133134
server's administrator, then choose **Edit > Change Server...** and connect
134135
again.
135136

137+
The login window for a server also has a button **Use this computer
138+
instead...**. It makes the same choice as **Store data on this computer**
139+
and ends this start; start ECCE again to work on this computer.
140+
136141
To change your mind later, choose **Edit > Change Server...** in the
137142
Organizer. The window says where ECCE works now, and which folder holds your
138143
calculations if it is this computer. The change applies the next time you

‎include/comm/RCommand.H‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,14 @@ public:
193193
static string localityNote(const string& machine, const string& remShell,
194194
const string& userName="");
195195
static bool isSameDomain(const string& machine);
196+
197+
// A path as one shell word, for command lines built here and by callers:
198+
// single-quoted, except that a leading ~ or ~/ stays bare so the remote
199+
// shell still expands it. Windows user folders contain spaces.
200+
static string quotePath(const string& path);
201+
// A pattern whose last component is a glob: the directory part quoted,
202+
// the last component left to the shell.
203+
static string quoteGlob(const string& pattern);
196204
static string whereami(void);
197205

198206
private:

‎include/wxgui/WxAuth.H‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ public:
4949
void setPasswordLabel(const string& passwordLabel);
5050
void setProtocol(const string& protocol);
5151
void showChangeBtn(const bool& show);
52+
/** The "Use this computer instead" button; it ends the dialog with
53+
ID_BUTTON_AUTH_USE_LOCAL. */
54+
void showUseLocal(const bool& show);
5255

5356
/** A line under the fields saying the connection is encrypted; "" hides it. */
5457
void setEncryption(const string& note);

0 commit comments

Comments
 (0)