Skip to content

Commit

Permalink
Merge pull request #21 from stenczelt/issue19-C-executable
Browse files Browse the repository at this point in the history
Issue19 C executable use correct interface
  • Loading branch information
jameskermode authored Jul 1, 2024
2 parents 3c7f293 + 9f9726a commit 11fa2d3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.7, 3.8, 3.9, "3.10", "3.11"]
python-version: [3.7, 3.8, 3.9, "3.10", "3.11", "3.12"]

steps:
- name: Checkout repository
Expand All @@ -39,7 +39,7 @@ jobs:
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics --exclude=.git,QUIP
- name: Build QUIP/libAtoms
env:
env:
QUIP_ARCH: linux_x86_64_gfortran
HAVE_GAP: 0
run: |
Expand All @@ -51,7 +51,10 @@ jobs:
git clone --recursive https://github.com/libAtoms/QUIP QUIP
mkdir -p QUIP/build/${QUIP_ARCH}
cp QUIP/.github/workflows/Makefile.inc QUIP/build/${QUIP_ARCH}/Makefile.inc
(cd QUIP && make libAtoms)
(cd QUIP && make libAtoms)
- name: Build C executable
run:
make -C libextxyz cextxyz
- name: Build Fortran executable
env:
QUIP_ARCH: linux_x86_64_gfortran
Expand Down
5 changes: 4 additions & 1 deletion libextxyz/test_C_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ int main(int argc, char *argv[]) {
int nat;
DictEntry *info, *arrays;

int success = extxyz_read_ll(kv_grammar, fp, &nat, &info, &arrays);
char comment;
char error_message;

int success = extxyz_read_ll(kv_grammar, fp, &nat, &info, &arrays, &comment, &error_message);
if (! strcmp(argv[2], "T")) {
printf("parsed success %d\n", success);
printf("nat %d\n", nat);
Expand Down

0 comments on commit 11fa2d3

Please sign in to comment.