Skip to content

Commit c612014

Browse files
author
andy
committed
Merge origin/main into wip/qm-ecce
2 parents c7d668e + 32414b6 commit c612014

166 files changed

Lines changed: 11700 additions & 981 deletions

File tree

Some content is hidden

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

‎.github/workflows/build.yml‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,22 @@ jobs:
386386
# -k 0: report every failing file, not only the first few.
387387
run: cmake --build build-cmake -- -k 0
388388

389+
# The GROMACS study's scripts on Homebrew's gmx (docs/GROMACS.md).
390+
# They need no build, so this runs whatever the build did; it is
391+
# allowed to fail until it has been seen to pass on a runner.
392+
- name: GROMACS MD study suite
393+
continue-on-error: true
394+
timeout-minutes: 15
395+
env:
396+
ECCE_GROMACS_REQUIRE: '1'
397+
run: |
398+
brew install gromacs
399+
tests/gromacs_md/run_tests.py -v
400+
401+
# The editor and terminal commands macOS gets by default (#133).
402+
- name: Editor and terminal commands
403+
run: cd build-cmake && ctest -R '^(editor_command|macos_terminal)$' --output-on-failure
404+
389405
# Does it run? (#133) Starts the installed apps on the runner's
390406
# logged-in desktop and screenshots them. Allowed to fail; the
391407
# verdict is in the summary and the "macos-run" artifact.

‎.github/workflows/test.yml‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,15 @@ jobs:
154154
ECCE_E2E_REQUIRE: mopac,nwchem,qe,gromacs
155155
run: tests/e2e/run_tests.py -v
156156

157+
# The GROMACS study's scripts (md.gmxtask, gromacs.launchpp, gensub,
158+
# the monitor and parsers) on real gmx, task after task. gromacs is
159+
# installed above; ECCE_GROMACS_REQUIRE turns a missing gmx from a
160+
# skip into a failure, so this cannot go green by testing nothing.
161+
- name: GROMACS MD study suite
162+
env:
163+
ECCE_GROMACS_REQUIRE: '1'
164+
run: tests/gromacs_md/run_tests.py -v
165+
157166
apps:
158167
name: GUI apps (build, install, Xvfb)
159168
runs-on: ubuntu-latest

‎CMakeLists.txt‎

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -779,6 +779,7 @@ install(PROGRAMS
779779
${CMAKE_SOURCE_DIR}/packaging/gateway/ecce-gateway-status
780780
${CMAKE_SOURCE_DIR}/packaging/gateway/ecce-gateway-reap
781781
${CMAKE_SOURCE_DIR}/packaging/gateway/ecce-find-mosquitto
782+
${CMAKE_SOURCE_DIR}/packaging/gateway/ecce-first-start
782783
${CMAKE_SOURCE_DIR}/packaging/windows/ecce-broker-win
783784
${CMAKE_SOURCE_DIR}/packaging/nwchem/ecce-nwchem-datadir
784785
DESTINATION bin
@@ -1080,6 +1081,14 @@ install(PROGRAMS ${CMAKE_SOURCE_DIR}/scripts/ecce-askpass
10801081
DESTINATION scripts
10811082
COMPONENT client)
10821083

1084+
# scripts/ecce-macos-terminal: the default terminal on macOS (UserEditor),
1085+
# which runs xterm's "-e command" in Terminal.app.
1086+
if(APPLE)
1087+
install(PROGRAMS ${CMAKE_SOURCE_DIR}/scripts/ecce-macos-terminal
1088+
DESTINATION scripts
1089+
COMPONENT client)
1090+
endif()
1091+
10831092
# scripts/ecce-csh2sh and its rules module CshToSh.pm: converts the csh snippets
10841093
# in submit.site / CONFIG.* to the sh gensub now writes. gensub `use`s
10851094
# CshToSh.pm from its own directory, so it travels with it; the launcher runs
@@ -1212,6 +1221,9 @@ fi")
12121221
# else's central server, or none yet configured) must not try to
12131222
# spawn it -- and must say clearly why not, rather than a bare
12141223
# "No such file or directory" swallowed by the trailing `|| true`.
1224+
# The user's own server choice (#240) makes this a -remote session.
1225+
set(_usermode ". \"$ECCE_HOME/bin/ecce-session-lib.sh\" || exit 1
1226+
ecce_user_server_mode")
12151227
set(_datamode "# Data mode for the whole session (#216): ECCE_LOCAL_DATA when set (empty
12161228
# means a data server), else the LocalData preference. Exported, so every
12171229
# app of a session uses one store and a preference change waits for the
@@ -1251,6 +1263,7 @@ if [ $_status -gt 128 ] && [ $_status -ne 143 ]; then
12511263
fi
12521264
exit $_status")
12531265
else()
1266+
set(_usermode "")
12541267
set(_datamode "")
12551268
set(_gateway_start "")
12561269
set(_dataserver_start "")
@@ -1302,6 +1315,7 @@ export PATH=\"$ECCE_HOME/scripts:$ECCE_HOME/scripts/parsers:$PATH\"
13021315
for _arg in \"$@\"; do
13031316
if [ \"$_arg\" = \"-remote\" ]; then export ECCE_REMOTE_SERVER=1; fi
13041317
done
1318+
${_usermode}
13051319
${_datamode}
13061320
${_gateway_start}
13071321
${_dataserver_start}
@@ -1752,6 +1766,23 @@ add_test(NAME session-display-gate COMMAND bash
17521766
${CMAKE_SOURCE_DIR}/tests/session/display_gate.sh ${CMAKE_SOURCE_DIR})
17531767
set_tests_properties(session-display-gate PROPERTIES SKIP_RETURN_CODE 77)
17541768

1769+
# tests/gromacs_md -- GROMACS MD study tasks. gromacs_structure checks the
1770+
# .gro reader of the Inputs page against gmx editconf; gromacs_md runs the
1771+
# study's scripts (md.gmxtask, gromacs.launchpp, gensub, the monitor and
1772+
# parsers) on real gmx, task after task. Both SKIP without gmx.
1773+
# See docs/GROMACS.md.
1774+
add_executable(gromacs_groconv tests/gromacs_md/groconv.C
1775+
src/dsm/chemistry/GromacsStructure.C)
1776+
add_test(NAME gromacs_structure
1777+
COMMAND ${PYTHON3_EXECUTABLE}
1778+
${CMAKE_SOURCE_DIR}/tests/gromacs_md/groconv_test.py
1779+
$<TARGET_FILE:gromacs_groconv>)
1780+
set_tests_properties(gromacs_structure PROPERTIES SKIP_RETURN_CODE 77)
1781+
add_test(NAME gromacs_md
1782+
COMMAND ${PYTHON3_EXECUTABLE}
1783+
${CMAKE_SOURCE_DIR}/tests/gromacs_md/run_tests.py)
1784+
set_tests_properties(gromacs_md PROPERTIES TIMEOUT 900 SKIP_RETURN_CODE 77)
1785+
17551786
# tests/mqtt -- the messaging library against a private mosquitto on a Unix
17561787
# socket; checks delivery, not just acknowledgement. "auth" is the same on
17571788
# a TCP broker with two accounts and the shipped access rules. SKIPs (77)
@@ -1781,6 +1812,15 @@ add_test(NAME tls_client
17811812
COMMAND ${PYTHON3_EXECUTABLE} ${CMAKE_SOURCE_DIR}/tests/tls/run_tests.py
17821813
$<TARGET_FILE:tls_client_test> ${CMAKE_BINARY_DIR}/tls-test)
17831814
set_tests_properties(tls_client PROPERTIES TIMEOUT 120 SKIP_RETURN_CODE 77)
1815+
# The first-start window's connection step and when the question is asked (#240).
1816+
add_test(NAME tls_first_connect
1817+
COMMAND ${PYTHON3_EXECUTABLE} ${CMAKE_SOURCE_DIR}/tests/tls/first_connect_test.py
1818+
${CMAKE_BINARY_DIR}/tls-first-connect)
1819+
set_tests_properties(tls_first_connect PROPERTIES TIMEOUT 120 SKIP_RETURN_CODE 77)
1820+
add_test(NAME first_start_question
1821+
COMMAND ${PYTHON3_EXECUTABLE} ${CMAKE_SOURCE_DIR}/tests/apps/first_start_test.py
1822+
$<TARGET_FILE:ecce-localdata> ${CMAKE_BINARY_DIR}/first-start-test)
1823+
set_tests_properties(first_start_question PROPERTIES TIMEOUT 60)
17841824

17851825
# The central server over TLS (#236): the real data server and broker scripts
17861826
# on loopback with a fresh certificate, then the clients with and without
@@ -1847,6 +1887,16 @@ if(PYTHON3_EXECUTABLE)
18471887
COMMAND ${PYTHON3_EXECUTABLE}
18481888
${CMAKE_CURRENT_SOURCE_DIR}/tests/look/contrast.py)
18491889

1890+
# Text in a window that has lost focus keeps its contrast (GTK :backdrop),
1891+
# and disabled text still looks disabled (#210). Compiles
1892+
# tests/look/backdrop.C against this build; SKIPs without Xvfb or PIL.
1893+
add_test(NAME look_backdrop
1894+
COMMAND ${PYTHON3_EXECUTABLE}
1895+
${CMAKE_CURRENT_SOURCE_DIR}/tests/look/login_backdrop.py
1896+
backdrop ${CMAKE_BINARY_DIR}/look-backdrop
1897+
--libdir ${CMAKE_BINARY_DIR} --tag after)
1898+
set_tests_properties(look_backdrop PROPERTIES SKIP_RETURN_CODE 77 TIMEOUT 300)
1899+
18501900
# The offscreen renderer's .rgb output against ImageMagick and PIL (#231).
18511901
# Needs `ninja render-rgb`, Xvfb, convert and PIL; SKIPs without them.
18521902
add_test(NAME look_imageconv
@@ -1871,6 +1921,14 @@ if(PYTHON3_EXECUTABLE)
18711921
${CMAKE_BINARY_DIR}/viewer-scenes)
18721922
set_tests_properties(look_nm_sticks PROPERTIES SKIP_RETURN_CODE 77 TIMEOUT 300)
18731923

1924+
# At content scale 2 the viewer fills the canvas and wx clicks pick the
1925+
# atom aimed at (#133, Retina). Needs `ninja viewer-scenes` and Xvfb.
1926+
add_test(NAME look_hidpi
1927+
COMMAND ${PYTHON3_EXECUTABLE}
1928+
${CMAKE_CURRENT_SOURCE_DIR}/tests/look/hidpi.py
1929+
${CMAKE_BINARY_DIR}/viewer-scenes)
1930+
set_tests_properties(look_hidpi PROPERTIES SKIP_RETURN_CODE 77 TIMEOUT 300)
1931+
18741932
# The saved DefaultStyle moves from the old default once (#227).
18751933
add_test(NAME look_default_style
18761934
COMMAND ${PYTHON3_EXECUTABLE}
@@ -2046,6 +2104,19 @@ if(PYTHON3_EXECUTABLE)
20462104
add_test(NAME transport_local_terminal COMMAND testLocalTerminal)
20472105
set_tests_properties(transport_local_terminal PROPERTIES TIMEOUT 60)
20482106

2107+
# The editor command (UserEditor) per platform, and macOS open(1) waiting
2108+
# for its own copy; ecce-macos-terminal with a stub open (#133).
2109+
add_executable(testEditorCommand tests/transport/testEditorCommand.C)
2110+
target_link_libraries(testEditorCommand PRIVATE
2111+
eccecomm eccercmd eccedsi eccedav eccecipc eccefaces eccexml
2112+
eccetdat ecceutil ${XercesC_LIBRARIES})
2113+
add_test(NAME editor_command COMMAND testEditorCommand)
2114+
set_tests_properties(editor_command PROPERTIES TIMEOUT 60)
2115+
add_test(NAME macos_terminal
2116+
COMMAND sh ${CMAKE_SOURCE_DIR}/tests/transport/macos_terminal_test.sh
2117+
${CMAKE_SOURCE_DIR})
2118+
set_tests_properties(macos_terminal PROPERTIES TIMEOUT 60)
2119+
20492120
# Run Management's Tail (TailSource) on a local machine; the same program
20502121
# runs against the test sshd from tests/transport/sshd/tail_test.sh.
20512122
add_executable(testTail tests/transport/testTail.C)
@@ -2235,6 +2306,7 @@ if(PYTHON3_EXECUTABLE)
22352306
--build ${CMAKE_BINARY_DIR} --local
22362307
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/tests/launch)
22372308
set_tests_properties(launch_local PROPERTIES TIMEOUT 900 SKIP_RETURN_CODE 77)
2309+
<<<<<<< HEAD
22382310
# ECCE-QM, the bundled engine: water and triplet O2 created, run through
22392311
# Launch in a local data folder, energies against ORCA, MOs normalised.
22402312
if(ECCE_BUILD_QM)
@@ -2245,6 +2317,16 @@ if(PYTHON3_EXECUTABLE)
22452317
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/tests/launch)
22462318
set_tests_properties(launch_ecceqm PROPERTIES TIMEOUT 900 SKIP_RETURN_CODE 77)
22472319
endif()
2320+
=======
2321+
# A GROMACS MD study through the real editors (private Xvfb), launches and
2322+
# results; skipped (77) without gmx or Xvfb. Needs the GUI apps built.
2323+
add_test(NAME launch_gromacs
2324+
COMMAND ${PYTHON3_EXECUTABLE}
2325+
${CMAKE_CURRENT_SOURCE_DIR}/tests/launch/gromacs_test.py
2326+
--build ${CMAKE_BINARY_DIR}
2327+
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/tests/launch)
2328+
set_tests_properties(launch_gromacs PROPERTIES TIMEOUT 1200 SKIP_RETURN_CODE 77)
2329+
>>>>>>> origin/main
22482330
# An 8.x eccejobmaster exports ECCE_TRANSPORT=pty; it must be ignored.
22492331
add_test(NAME launch_legacy_transport
22502332
COMMAND ${PYTHON3_EXECUTABLE}

‎GETTING_STARTED.md‎

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -428,6 +428,40 @@ quit may stop is decided only by what the admin declared, never by
428428
guessing who is connected. The data server is only ever stopped by
429429
**Quit and Stop Server**, in every mode.
430430

431+
#### The first-start question (#240)
432+
433+
A client with nothing configured asks once, in a window "Welcome to ECCE":
434+
**Work on this computer** (local data mode, data in `~/.ECCE-local`) or
435+
**Connect to a server** (one box for the server's address, then the login
436+
window). The default does not change; the question only replaces having to
437+
know the environment variables. The choice is kept per user (the local data
438+
preference, or `~/.ECCE/RemoteServer/`, which `ecce-remote-setup <host>
439+
--user --auto` writes without root) and changes from **Edit > Change
440+
Server...** in the Organizer, which shows the current mode and data folder.
441+
The change applies at the next start; nothing is copied between modes.
442+
443+
Trust follows #236: the server's certificate is accepted if the system's CA
444+
list vouches for it (`https`, port 8443); otherwise the certificate shown at
445+
the first connection is pinned (as `--fetch-pin` does) and a later change
446+
is refused with a message, never with a question about fingerprints; a
447+
server that answers only plain http on 8096 is used as it is.
448+
449+
What each deployment mode sees: **nothing is asked** wherever something is
450+
configured already: `siteconfig/RemoteServer` present (an administrator or
451+
`ecce-remote-setup` as root), `ecce -remote` or `ECCE_REMOTE_SERVER`,
452+
`ECCE_LOCAL_DATA` or `ecce --local`, `~/.ECCE-local` or `~/.ECCE/dataserver`
453+
already there, the data folder preference set, a server chosen before, a
454+
shared broker declared (`siteconfig/SharedBroker`), an account marked as a
455+
central server (`~/.ECCE/mosquitto.server`), and **any installation that
456+
has the `ecce-server` package** (the server itself, and remote desktop
457+
sessions such as FastX on it). So modes 2 and 3, the server machine and the
458+
all-in-one install behave exactly as before; only a client-only install of
459+
a user with nothing yet is asked. `ECCE_NO_FIRST_START=1` never asks (tests
460+
and scripts set it), and without a display or wxPython nothing is asked. macOS and Windows,
461+
whose launchers already work in a data folder, never ask; **Edit > Change
462+
Server...** is there if they want a server (Windows: not yet, the window is
463+
a Linux/macOS script).
464+
431465
#### Mode 1: everything local (the default)
432466

433467
Nothing to set up. A user's first session starts their own broker (a

0 commit comments

Comments
 (0)