Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions .github/workflows/ci_ase.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
on: [push, pull_request]

env:
SCCACHE_GHA_ENABLED: "true"

jobs:
build_eon:
runs-on: ${{ matrix.os }}
Expand All @@ -30,12 +26,6 @@ jobs:
- name: Install ASE
shell: pixi run -e dev bash -e {0}
run: pip install ase
- name: Configure sccache
uses: actions/github-script@v7
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- name: Build eonclient with ASE
shell: pixi run -e dev bash -e {0}
run: |
Expand Down
11 changes: 0 additions & 11 deletions .github/workflows/ci_benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ concurrency:
on:
pull_request:
branches: [main]

env:
SCCACHE_GHA_ENABLED: "true"

jobs:
benchmark:
strategy:
Expand Down Expand Up @@ -47,13 +43,6 @@ jobs:
run: command -v cbindgen || cargo install cbindgen
- uses: astral-sh/setup-uv@v5

- name: Configure sccache
uses: actions/github-script@v7
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');

- name: Build
run: |
pixi run bash -c "meson setup bbdir \
Expand Down
10 changes: 0 additions & 10 deletions .github/workflows/ci_build_akmc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
on: [push, pull_request]

env:
SCCACHE_GHA_ENABLED: "true"

jobs:
build_eon:
runs-on: ${{ matrix.os }}
Expand All @@ -24,12 +20,6 @@ jobs:
- name: Install cbindgen
shell: bash
run: command -v cbindgen || cargo install cbindgen
- name: Configure sccache
uses: actions/github-script@v7
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- name: Use Homebrew gfortran (macOS)
if: runner.os == 'macOS'
run: |
Expand Down
10 changes: 0 additions & 10 deletions .github/workflows/ci_build_gprd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ on:
push:
branches:
- main

env:
SCCACHE_GHA_ENABLED: "true"

jobs:
build_eon:
runs-on: ubuntu-latest
Expand All @@ -34,12 +30,6 @@ jobs:
- name: Install cbindgen
shell: bash
run: command -v cbindgen || cargo install cbindgen
- name: Configure sccache
uses: actions/github-script@v7
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- name: Install eon
shell: pixi run bash -e {0}
run: |
Expand Down
10 changes: 0 additions & 10 deletions .github/workflows/ci_metatomic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
on: [push, pull_request]

env:
SCCACHE_GHA_ENABLED: "true"

jobs:
build_eon:
runs-on: ${{ matrix.os }}
Expand All @@ -28,12 +24,6 @@ jobs:
- name: Install cbindgen
shell: bash
run: command -v cbindgen || cargo install cbindgen
- name: Configure sccache
uses: actions/github-script@v7
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- name: Use Homebrew gfortran (macOS)
if: runner.os == 'macOS'
run: |
Expand Down
10 changes: 0 additions & 10 deletions .github/workflows/ci_serve.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
on: [push, pull_request]

env:
SCCACHE_GHA_ENABLED: "true"

jobs:
build_serve:
runs-on: ${{ matrix.os }}
Expand All @@ -27,12 +23,6 @@ jobs:
- name: Install cbindgen
shell: bash
run: command -v cbindgen || cargo install cbindgen
- name: Configure sccache
uses: actions/github-script@v7
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- name: Build with serve mode
shell: pixi run bash -e {0}
run: |
Expand Down
10 changes: 0 additions & 10 deletions .github/workflows/ci_xtb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
on: [push, pull_request]

env:
SCCACHE_GHA_ENABLED: "true"

jobs:
build_eon:
runs-on: ${{ matrix.os }}
Expand All @@ -30,12 +26,6 @@ jobs:
- name: Install cbindgen
shell: bash
run: command -v cbindgen || cargo install cbindgen
- name: Configure sccache
uses: actions/github-script@v7
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- name: Install eon
shell: pixi run bash -e {0}
run: |
Expand Down
31 changes: 16 additions & 15 deletions client/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -55,20 +55,21 @@ if is_windows
# ../11.4.0/include/c++/bits/basic_string.h:1059: std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::reference std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator[](std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::reference = char&; std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type = long unsigned int]: Assertion '__pos <= size()' failed.
endif

_args += cppc.get_supported_arguments(
[
# C++ only
'-Wno-class-memaccess',
'-Wno-unused-function',
# Common
'-Wno-reorder',
'-Wno-sign-compare',
'-Wno-unused-but-set-parameter',
'-Wno-unused-but-set-variable',
'-Wno-unused-parameter',
'-Wno-unused-result',
'-Wno-unused-variable',
],
add_project_arguments(
cppc.get_supported_arguments(
[
'-Wno-class-memaccess',
'-Wno-unused-function',
'-Wno-reorder',
'-Wno-sign-compare',
'-Wno-unused-but-set-parameter',
'-Wno-unused-but-set-variable',
'-Wno-unused-parameter',
'-Wno-unused-result',
'-Wno-unused-variable',
],
),
language: 'cpp',
)

# TODO(rg): use fc.get_supported_arguments and add more compiler support
Expand Down Expand Up @@ -903,7 +904,7 @@ if get_option('with_tests')
bash_exe,
args: [
meson.project_source_root() + '/client/unit_tests/run_nwchem_test.sh',
'eonclient',
ec,
nwchem_exe,
'nwchem_socket.nwi', # The input file for the client
test_workdir,
Expand Down
2 changes: 1 addition & 1 deletion client/potentials/EMT/Asap/Atoms.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include "SuperCell.h"
// #include "Timing.h"
#include <assert.h>
#include <math.h>
#include <cmath>
#include <string.h>

extern int verbose;
Expand Down
2 changes: 1 addition & 1 deletion client/potentials/EMT/Asap/CellList.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
#include "GhostAtoms.h"
#include "Image.h"
#include "SuperCell.h"
#include <cmath>
#include <map>
#include <math.h>
using std::map;
#include <assert.h>
using std::cerr;
Expand Down
2 changes: 1 addition & 1 deletion client/potentials/EMT/Asap/EMT.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
// #include "Timing.h"
#include "mass.h"
#include <assert.h>
#include <math.h>
#include <cmath>
#include <set>
#include <stdlib.h>
#include <string.h>
Expand Down
2 changes: 1 addition & 1 deletion client/potentials/EMT/Asap/NeighborList.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include "SuperCell.h"
// #include "Timing.h"
#include <assert.h>
#include <math.h>
#include <cmath>
#include <string.h>

using std::cerr;
Expand Down
2 changes: 1 addition & 1 deletion client/potentials/EMT/Asap/SuperCell.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
#include "Atoms.h"
#include "Exception.h"
#include "Potential.h"
#include <cmath>
#include <iostream>
#include <math.h>

SuperCell::SuperCell(const Vec v[3], const bool p[3]) {
atoms = 0;
Expand Down
2 changes: 1 addition & 1 deletion client/potentials/EMT/Asap/mass.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Vectorized mathematica functions from the IBM mass library.
*/

#include <math.h>
#include <cmath>

inline void vsqrt(double res[], const double a[], const int *n) {
int nn = *n;
Expand Down
2 changes: 1 addition & 1 deletion client/potentials/LJCluster/LJCluster.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
*/
#pragma once

#include <cmath>
#include <iostream>
#include <math.h>
// #include "../../system_unit.h" // unit converters
#include "../../Potential.h"

Expand Down
16 changes: 15 additions & 1 deletion client/potentials/SocketNWChem/SocketNWChemPot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,22 @@ SocketNWChemPot::SocketNWChemPot(const Parameters &p)

if (unix_socket_mode) {
unix_socket_basename = p.socket_nwchem_options.unix_socket_path;
// NWChem client hardcodes this prefix
// NWChem's Fortran i-PI driver truncates the socket name to ~30 chars.
// The full path is /tmp/ipi_<basename>, so basename must be short.
server_address = "/tmp/ipi_" + unix_socket_basename;
if (server_address.size() > 30) {
std::cerr << "ERROR: UNIX socket path '" << server_address << "' is "
<< server_address.size()
<< " characters, which exceeds NWChem's ~30 character limit.\n"
<< "NWChem will silently truncate it, causing a connection "
"failure.\n"
<< "Shorten unix_socket_path (currently '"
<< unix_socket_basename << "') to at most " << (30 - 9)
<< " characters.\n";
throw std::runtime_error(
"unix_socket_path too long for NWChem (max ~21 chars, got " +
std::to_string(unix_socket_basename.size()) + ")");
}
port = -1;
std::cout << "SocketNWChemPot: Initializing in UNIX mode." << std::endl;
std::cout << "Listening on socket file: " << server_address << std::endl;
Expand Down
18 changes: 14 additions & 4 deletions client/unit_tests/run_nwchem_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -e

# --- Configuration ---
# Arguments passed from Meson
TEST_EXECUTABLE=$1
TEST_EXECUTABLE=$(realpath "$1")
NWCHEM_EXECUTABLE=$2
NWCHEM_INPUT_FILE=$3
TEST_WORKDIR=$4
Expand Down Expand Up @@ -33,15 +33,25 @@ trap cleanup EXIT
cd "$TEST_WORKDIR"
echo "--- Running test in: $(pwd) ---"
rm -f results.dat
rm -f /tmp/ipi_eon_nwchem

# 2. Start the eOn test server in the background
echo "--- Starting eOn test server in background ---"
"$TEST_EXECUTABLE" &
SERVER_PID=$! # Capture the Process ID of the server

# 3. Wait for a moment to ensure the server is up and listening
# A more robust solution would poll for the socket file, but a short sleep is usually enough.
sleep 1
# 3. Wait for the server socket to appear (up to 10 seconds)
SOCKET_PATH="/tmp/ipi_eon_nwchem"
for i in $(seq 1 20); do
if [ -S "$SOCKET_PATH" ]; then
break
fi
sleep 0.5
done
if [ ! -S "$SOCKET_PATH" ]; then
echo "ERROR: Server socket $SOCKET_PATH did not appear within 10 seconds"
exit 1
fi

# 4. Run the NWChem client in the foreground
# It will connect to the server, do its work, and exit.
Expand Down
8 changes: 8 additions & 0 deletions docs/source/user_guide/potential.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,14 @@ increases in speed compared to file or ASE interfaces
.. autopydantic_model:: eon.schema.SocketNWChemPot
```

```{warning}
NWChem's Fortran i-PI socket driver truncates UNIX socket names to approximately
30 characters. The full socket path is ``/tmp/ipi_<unix_socket_path>``, so
``unix_socket_path`` should be kept short (under ~20 characters). For example,
``eon_nwchem`` works but ``eon_nwchem_test_socket`` will be silently truncated,
causing a connection failure with no clear error message.
```

An older ASE interface exists as well.

### ASE potentials
Expand Down
4 changes: 0 additions & 4 deletions nativeFiles/sccache_clang.ini

This file was deleted.

4 changes: 0 additions & 4 deletions nativeFiles/sccache_gnu.ini

This file was deleted.

Loading
Loading