Skip to content
This repository was archived by the owner on Mar 25, 2025. It is now read-only.

Commit c80a44d

Browse files
committed
Fix build issues for the rebased branch
- fix bad merges - remove custom llvm version, use brew with llvm@13 - follow hpc/gitlab-pipelines changes from Olli - load extra module llvm using SPACK_EXTRA_MODULES - use gcc build instead of nvhpc which fails to compile with llvm headers
1 parent ff5430c commit c80a44d

File tree

5 files changed

+20
-14
lines changed

5 files changed

+20
-14
lines changed

.gitlab-ci.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,6 @@ include:
88

99
trigger cvf:
1010
stage: .pre
11-
variables:
12-
# Tell the CVF pipeline to use the current ref of NMODL, this works because
13-
# the CVF CI uses the `gitlab-pipelines` helper components.
14-
SPACK_PACKAGE_REF_nmodl: "commit='${CI_COMMIT_SHA}'"
1511
rules:
1612
# Don't run on PRs targeting the LLVM development branch
1713
- if: '$CI_EXTERNAL_PULL_REQUEST_TARGET_BRANCH_NAME == "llvm"'
@@ -22,15 +18,21 @@ trigger cvf:
2218
project: hpc/cvf
2319
# Make the NMODL CI status depend on the CVF CI status
2420
strategy: depend
21+
variables:
22+
# Tell CVF to use the same commits/branches as NMODL.
23+
SPACK_ENV_FILE_URL: $SPACK_SETUP_COMMIT_MAPPING_URL
2524

2625
.spack_nmodl:
2726
variables:
2827
SPACK_PACKAGE: nmodl
2928
SPACK_PACKAGE_SPEC: ~legacy-unit+python
29+
SPACK_EXTRA_MODULES: llvm
30+
SPACK_INSTALL_EXTRA_FLAGS: -v
3031

3132
spack_setup:
3233
extends: .spack_setup_ccache
3334
variables:
35+
NMODL_COMMIT: ${CI_COMMIT_SHA}
3436
# Enable fetching GitHub PR descriptions and parsing them to find out what
3537
# branches to build of other projects.
3638
PARSE_GITHUB_PR_DESCRIPTIONS: "true"
@@ -42,12 +44,12 @@ build:intel:
4244
variables:
4345
SPACK_PACKAGE_COMPILER: intel
4446

45-
build:nvhpc:
47+
build:gcc:
4648
extends:
4749
- .spack_build
4850
- .spack_nmodl
4951
variables:
50-
SPACK_PACKAGE_COMPILER: nvhpc
52+
SPACK_PACKAGE_COMPILER: gcc
5153
SPACK_PACKAGE_DEPENDENCIES: ^bison%gcc^flex%gcc^py-jinja2%gcc^py-sympy%gcc^py-pyyaml%gcc
5254

5355
.nmodl_tests:
@@ -61,8 +63,8 @@ test:intel:
6163
- .nmodl_tests
6264
needs: ["build:intel"]
6365

64-
test:nvhpc:
66+
test:gcc:
6567
extends:
6668
- .ctest
6769
- .nmodl_tests
68-
needs: ["build:nvhpc"]
70+
needs: ["build:gcc"]

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ nmodl_find_python_module(yaml 3.12 REQUIRED)
158158
# Find LLVM dependencies
159159
# =============================================================================
160160
if(NMODL_ENABLE_LLVM)
161-
include(LLVMHelper)
161+
include(cmake/LLVMHelper.cmake)
162162
include_directories(${LLVM_INCLUDE_DIRS})
163163
add_definitions(-DNMODL_LLVM_BACKEND)
164164
endif()

azure-pipelines.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -132,15 +132,11 @@ jobs:
132132
python3 -m pip install --upgrade pip 'setuptools<59.7.0'
133133
python3 -m pip install --user 'Jinja2>=2.9.3' 'PyYAML>=3.13' pytest pytest-cov numpy 'sympy>=1.3,<1.9'
134134
displayName: 'Install Dependencies'
135-
- script: |
136-
cd $HOME
137-
git clone --depth 1 https://github.com/pramodk/llvm-nightly.git
138-
displayName: 'Setup LLVM v13'
139135
- script: |
140136
export PATH=/usr/local/opt/flex/bin:/usr/local/opt/bison/bin:$PATH;
141137
mkdir -p $(Build.Repository.LocalPath)/build
142138
cd $(Build.Repository.LocalPath)/build
143-
cmake .. -DPYTHON_EXECUTABLE=$(which python3) -DCMAKE_INSTALL_PREFIX=$HOME/nmodl -DCMAKE_BUILD_TYPE=RelWithDebInfo -DNMODL_ENABLE_PYTHON_BINDINGS=OFF -DLLVM_DIR=$HOME/llvm-nightly/0621/osx/lib/cmake/llvm -DNMODL_ENABLE_LLVM=ON
139+
cmake .. -DPYTHON_EXECUTABLE=$(which python3) -DCMAKE_INSTALL_PREFIX=$HOME/nmodl -DCMAKE_BUILD_TYPE=RelWithDebInfo -DNMODL_ENABLE_PYTHON_BINDINGS=OFF -DLLVM_DIR=$(brew --prefix llvm)/lib/cmake/llvm -DNMODL_ENABLE_LLVM=ON
144140
make -j 2
145141
if [ $? -ne 0 ]
146142
then

src/codegen/codegen_info.hpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,9 @@ enum BlockType {
196196
/// initial block
197197
Initial,
198198

199+
/// constructor block
200+
Constructor,
201+
199202
/// destructor block
200203
Destructor,
201204

@@ -214,10 +217,14 @@ enum BlockType {
214217
/// net_receive block
215218
NetReceive,
216219

220+
/// before / after block
221+
BeforeAfter,
222+
217223
/// fake ending block type for loops on the enums. Keep it at the end
218224
BlockTypeEnd
219225
};
220226

227+
221228
/**
222229
* \class ShadowUseStatement
223230
* \brief Represents ion write statement during code generation

src/codegen/llvm/codegen_llvm_helper_visitor.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#include "codegen/codegen_info.hpp"
1919
#include "symtab/symbol_table.hpp"
2020
#include "visitors/ast_visitor.hpp"
21+
#include "utils/logger.hpp"
2122

2223
namespace nmodl {
2324
namespace codegen {

0 commit comments

Comments
 (0)