Overview
As part of this ticket I would like to implement some QoL improvements when using NMODL.
Example
Let's take an example of MOD files directory from BB5:
/gpfs/bbp.cscs.ch/project/proj16/kumbhar/pramod_scratch/HPCTM-1856/neurodamus_check
When I compile that with nrnivmodl-core, I see the following:
$ nrnivmodl-core mechanisms/
[INFO] Running: make -j4 -f /gpfs/bbp.cscs.ch/ssd/apps/bsd/2024-02-01/stage_applications/install_oneapi-2023.2.0-skylake/neuron-9.0.a15-ugsan4/share/coreneuron/nrnivmodl_core_makefile ROOT=/gpfs/bbp.cscs.ch/ssd/apps/bsd/2024-02-01/stage_applications/install_oneapi-2023.2.0-skylake/neuron-9.0.a15-ugsan4 MODS_PATH=x86_64/corenrn/mod2c BUILD_TYPE=SHARED NRN_PRCELLSTATE=0
make: xcrun: Command not found
Default NMODL flags:
diff: x86_64/corenrn/mod2c/_mod_func.cpp: No such file or directory
[NMODL] [info] :: Processing x86_64/corenrn/mod2c/cagk.mod
[NMODL] [info] :: Running symtab visitor
[NMODL] [warning] :: SYMTAB :: k [Argument] in exp1 shadows <ion> definition in NMODL_GLOBAL
[NMODL] [info] :: Running semantic analysis visitor
[NMODL] [info] :: Running CVode to cnexp visitor
[NMODL] [info] :: Running code compatibility checker
[NMODL] [error] :: Code incompatibility detected
[NMODL] [error] :: Cannot translate mod file to .cpp file
[NMODL] [error] :: Fix the following errors and try again
[NMODL] [error] :: Code Incompatibility :: "oinf" variable found at [21.9-12] should be defined as a RANGE variable instead of GLOBAL to enable backend transformations
[NMODL] [error] :: Code Incompatibility :: "tau" variable found at [21.15-17] should be defined as a RANGE variable instead of GLOBAL to enable backend transformations
[NMODL] [info] :: Running verbatim rename visitor
[NMODL] [info] :: Running KINETIC block visitor
[NMODL] [warning] :: SYMTAB :: k [Argument] in exp1 shadows <ion> definition in NMODL_GLOBAL
[NMODL] [info] :: Running STEADYSTATE visitor
[NMODL] [warning] :: SYMTAB :: k [Argument] in exp1 shadows <ion> definition in NMODL_GLOBAL
[NMODL] [info] :: Parsing Units
[NMODL] [info] :: Running nmodl inline visitor
[NMODL] [info] :: Running local variable rename visitor
[NMODL] [info] :: Running cnexp visitor
[NMODL] [info] :: Running C++ backend code generator
[NMODL] [info] :: Processing x86_64/corenrn/mod2c/cacumm.mod
[NMODL] [info] :: Processing x86_64/corenrn/mod2c/cal2.mod
[NMODL] [info] :: Running symtab visitor
[NMODL] [info] :: Running semantic analysis visitor
[NMODL] [info] :: Running CVode to cnexp visitor
[NMODL] [info] :: Running code compatibility checker
[NMODL] [info] :: Running verbatim rename visitor
[NMODL] [info] :: Running KINETIC block visitor
[NMODL] [info] :: Running STEADYSTATE visitor
[NMODL] [info] :: Parsing Units
[NMODL] [info] :: Running symtab visitor
[NMODL] [warning] :: SYMTAB :: cai [Argument] in h2 shadows <range parameter read_ion> definition in NMODL_GLOBAL
[NMODL] [warning] :: SYMTAB :: celsius [Argument] in KTF shadows <parameter extern_neuron_var> definition in NMODL_GLOBAL
[NMODL] [info] :: Running semantic analysis visitor
[NMODL] [info] :: Running CVode to cnexp visitor
[NMODL] [info] :: Running code compatibility checker
[NMODL] [error] :: Code incompatibility detected
[NMODL] [error] :: Cannot translate mod file to .cpp file
[NMODL] [error] :: Fix the following errors and try again
[NMODL] [error] :: Code Incompatibility :: "minf" variable found at [36.16-19] should be defined as a RANGE variable instead of GLOBAL to enable backend transformations
[NMODL] [error] :: Code Incompatibility :: "tau" variable found at [36.21-23] should be defined as a RANGE variable instead of GLOBAL to enable backend transformations
[NMODL] [info] :: Running verbatim rename visitor
[NMODL] [info] :: Running KINETIC block visitor
[NMODL] [info] :: Running nmodl inline visitor
[NMODL] [info] :: Running local variable rename visitor
[NMODL] [info] :: Running cnexp visitor
[NMODL] [warning] :: SYMTAB :: cai [Argument] in h2 shadows <range parameter read_ion> definition in NMODL_GLOBAL
[NMODL] [warning] :: SYMTAB :: celsius [Argument] in KTF shadows <parameter extern_neuron_var> definition in NMODL_GLOBAL
[NMODL] [info] :: Running STEADYSTATE visitor
[NMODL] [warning] :: SYMTAB :: cai [Argument] in h2 shadows <range parameter read_ion> definition in NMODL_GLOBAL
[NMODL] [warning] :: SYMTAB :: celsius [Argument] in KTF shadows <parameter extern_neuron_var> definition in NMODL_GLOBAL
[NMODL] [info] :: Parsing Units
[NMODL] [info] :: Running C++ backend code generator
[NMODL] [info] :: Running nmodl inline visitor
[NMODL] [info] :: Running local variable rename visitor
[NMODL] [info] :: Running cnexp visitor
[NMODL] [info] :: Running C++ backend code generator
[NMODL] [info] :: Processing x86_64/corenrn/mod2c/can2.mod
[NMODL] [info] :: Running symtab visitor
[NMODL] [warning] :: SYMTAB :: cai [Argument] in h2 shadows <parameter read_ion> definition in NMODL_GLOBAL
[NMODL] [warning] :: SYMTAB :: celsius [Argument] in KTF shadows <parameter extern_neuron_var> definition in NMODL_GLOBAL
[NMODL] [info] :: Running semantic analysis visitor
[NMODL] [info] :: Running CVode to cnexp visitor
[NMODL] [info] :: Running code compatibility checker
[NMODL] [error] :: Code incompatibility detected
[NMODL] [error] :: Cannot translate mod file to .cpp file
[NMODL] [error] :: Fix the following errors and try again
[NMODL] [error] :: Code Incompatibility :: "hinf" variable found at [35.16-19] should be defined as a RANGE variable instead of GLOBAL to enable backend transformations
[NMODL] [error] :: Code Incompatibility :: "minf" variable found at [35.21-24] should be defined as a RANGE variable instead of GLOBAL to enable backend transformations
[NMODL] [error] :: Code Incompatibility :: "taum" variable found at [35.26-29] should be defined as a RANGE variable instead of GLOBAL to enable backend transformations
[NMODL] [error] :: Code Incompatibility :: "tauh" variable found at [35.31-34] should be defined as a RANGE variable instead of GLOBAL to enable backend transformations
[NMODL] [info] :: Running verbatim rename visitor
[NMODL] [info] :: Running KINETIC block visitor
[NMODL] [warning] :: SYMTAB :: cai [Argument] in h2 shadows <parameter read_ion> definition in NMODL_GLOBAL
[NMODL] [warning] :: SYMTAB :: celsius [Argument] in KTF shadows <parameter extern_neuron_var> definition in NMODL_GLOBAL
[NMODL] [info] :: Running STEADYSTATE visitor
[NMODL] [warning] :: SYMTAB :: cai [Argument] in h2 shadows <parameter read_ion> definition in NMODL_GLOBAL
[NMODL] [warning] :: SYMTAB :: celsius [Argument] in KTF shadows <parameter extern_neuron_var> definition in NMODL_GLOBAL
[NMODL] [info] :: Parsing Units
[NMODL] [info] :: Running nmodl inline visitor
[NMODL] [info] :: Running local variable rename visitor
[NMODL] [info] :: Running cnexp visitor
[NMODL] [info] :: Running C++ backend code generator
[NMODL] [info] :: Processing x86_64/corenrn/mod2c/cat.mod
[NMODL] [info] :: Running symtab visitor
[NMODL] [warning] :: SYMTAB :: celsius [Argument] in KTF shadows <parameter extern_neuron_var> definition in NMODL_GLOBAL
[NMODL] [info] :: Running semantic analysis visitor
[NMODL] [info] :: Running CVode to cnexp visitor
[NMODL] [info] :: Running code compatibility checker
[NMODL] [error] :: Code incompatibility detected
[NMODL] [error] :: Cannot translate mod file to .cpp file
[NMODL] [error] :: Fix the following errors and try again
[NMODL] [error] :: Code Incompatibility :: "hinf" variable found at [40.16-19] should be defined as a RANGE variable instead of GLOBAL to enable backend transformations
[NMODL] [error] :: Code Incompatibility :: "minf" variable found at [40.21-24] should be defined as a RANGE variable instead of GLOBAL to enable backend transformations
[NMODL] [error] :: Code Incompatibility :: "mtau" variable found at [40.26-29] should be defined as a RANGE variable instead of GLOBAL to enable backend transformations
[NMODL] [error] :: Code Incompatibility :: "htau" variable found at [40.31-34] should be defined as a RANGE variable instead of GLOBAL to enable backend transformations
[NMODL] [info] :: Running verbatim rename visitor
[NMODL] [info] :: Running KINETIC block visitor
[NMODL] [warning] :: SYMTAB :: celsius [Argument] in KTF shadows <parameter extern_neuron_var> definition in NMODL_GLOBAL
[NMODL] [info] :: Running STEADYSTATE visitor
[NMODL] [warning] :: SYMTAB :: celsius [Argument] in KTF shadows <parameter extern_neuron_var> definition in NMODL_GLOBAL
[NMODL] [info] :: Parsing Units
[NMODL] [info] :: Processing x86_64/corenrn/mod2c/exp2syn.mod
[NMODL] [info] :: Running nmodl inline visitor
[NMODL] [info] :: Running symtab visitor
[NMODL] [info] :: Running local variable rename visitor
[NMODL] [info] :: Running semantic analysis visitor
[NMODL] [info] :: Running CVode to cnexp visitor
[NMODL] [info] :: Running code compatibility checker
[NMODL] [info] :: Running cnexp visitor
[NMODL] [info] :: Running verbatim rename visitor
[NMODL] [info] :: Running KINETIC block visitor
[NMODL] [info] :: Running STEADYSTATE visitor
[NMODL] [info] :: Parsing Units
[NMODL] [info] :: Running C++ backend code generator
[NMODL] [info] :: Running nmodl inline visitor
[NMODL] [info] :: Running local variable rename visitor
[NMODL] [info] :: Running cnexp visitor
[NMODL] [info] :: Running C++ backend code generator
[NMODL] [info] :: Processing x86_64/corenrn/mod2c/expsyn.mod
[NMODL] [info] :: Running symtab visitor
[NMODL] [info] :: Running semantic analysis visitor
[NMODL] [info] :: Running CVode to cnexp visitor
[NMODL] [info] :: Running code compatibility checker
[NMODL] [info] :: Running verbatim rename visitor
[NMODL] [info] :: Running KINETIC block visitor
[NMODL] [info] :: Running STEADYSTATE visitor
[NMODL] [info] :: Parsing Units
[NMODL] [info] :: Running nmodl inline visitor
[NMODL] [info] :: Running local variable rename visitor
[NMODL] [info] :: Running cnexp visitor
[NMODL] [info] :: Running C++ backend code generator
[NMODL] [info] :: Processing x86_64/corenrn/mod2c/h_clk_new.mod
[NMODL] [info] :: Running symtab visitor
[NMODL] [info] :: Running semantic analysis visitor
[NMODL] [info] :: Running CVode to cnexp visitor
[NMODL] [info] :: Running code compatibility checker
[NMODL] [error] :: Code incompatibility detected
[NMODL] [error] :: Cannot translate mod file to .cpp file
[NMODL] [error] :: Fix the following errors and try again
[NMODL] [error] :: Code Incompatibility :: "linf" variable found at [35.16-19] should be defined as a RANGE variable instead of GLOBAL to enable backend transformations
[NMODL] [error] :: Code Incompatibility :: "taul" variable found at [35.22-25] should be defined as a RANGE variable instead of GLOBAL to enable backend transformations
[NMODL] [info] :: Running verbatim rename visitor
[NMODL] [info] :: Running KINETIC block visitor
[NMODL] [info] :: Running STEADYSTATE visitor
[NMODL] [info] :: Parsing Units
[NMODL] [info] :: Running nmodl inline visitor
[NMODL] [info] :: Running local variable rename visitor
[NMODL] [info] :: Running cnexp visitor
[NMODL] [info] :: Running C++ backend code generator
[NMODL] [info] :: Processing x86_64/corenrn/mod2c/hh.mod
[NMODL] [info] :: Running symtab visitor
[NMODL] [info] :: Running semantic analysis visitor
[NMODL] [info] :: Running CVode to cnexp visitor
[NMODL] [info] :: Running code compatibility checker
[NMODL] [info] :: Running verbatim rename visitor
[NMODL] [info] :: Running KINETIC block visitor
[NMODL] [info] :: Running STEADYSTATE visitor
[NMODL] [info] :: Parsing Units
[NMODL] [info] :: Processing x86_64/corenrn/mod2c/kadist.mod
[NMODL] [info] :: Running nmodl inline visitor
[NMODL] [info] :: Running symtab visitor
[NMODL] [info] :: Running local variable rename visitor
[NMODL] [info] :: Running semantic analysis visitor
[NMODL] [info] :: Running CVode to cnexp visitor
[NMODL] [info] :: Running code compatibility checker
[NMODL] [info] :: Running cnexp visitor
[NMODL] [error] :: Code incompatibility detected
[NMODL] [error] :: Cannot translate mod file to .cpp file
[NMODL] [error] :: Fix the following errors and try again
[NMODL] [error] :: Code Incompatibility :: "ninf" variable found at [38.16-19] should be defined as a RANGE variable instead of GLOBAL to enable backend transformations
[NMODL] [error] :: Code Incompatibility :: "linf" variable found at [38.21-24] should be defined as a RANGE variable instead of GLOBAL to enable backend transformations
[NMODL] [error] :: Code Incompatibility :: "taul" variable found at [38.26-29] should be defined as a RANGE variable instead of GLOBAL to enable backend transformations
[NMODL] [error] :: Code Incompatibility :: "taun" variable found at [38.31-34] should be defined as a RANGE variable instead of GLOBAL to enable backend transformations
[NMODL] [info] :: Running verbatim rename visitor
[NMODL] [info] :: Running KINETIC block visitor
[NMODL] [info] :: Running STEADYSTATE visitor
[NMODL] [info] :: Parsing Units
[NMODL] [info] :: Running C++ backend code generator
[NMODL] [info] :: Running nmodl inline visitor
[NMODL] [info] :: Running local variable rename visitor
[NMODL] [info] :: Running cnexp visitor
[NMODL] [info] :: Processing x86_64/corenrn/mod2c/kaprox.mod
[NMODL] [info] :: Running C++ backend code generator
[NMODL] [info] :: Running symtab visitor
[NMODL] [info] :: Running semantic analysis visitor
[NMODL] [info] :: Running CVode to cnexp visitor
[NMODL] [info] :: Running code compatibility checker
[NMODL] [error] :: Code incompatibility detected
[NMODL] [error] :: Cannot translate mod file to .cpp file
[NMODL] [error] :: Fix the following errors and try again
[NMODL] [error] :: Code Incompatibility :: "ninf" variable found at [39.16-19] should be defined as a RANGE variable instead of GLOBAL to enable backend transformations
[NMODL] [error] :: Code Incompatibility :: "linf" variable found at [39.21-24] should be defined as a RANGE variable instead of GLOBAL to enable backend transformations
[NMODL] [error] :: Code Incompatibility :: "taul" variable found at [39.26-29] should be defined as a RANGE variable instead of GLOBAL to enable backend transformations
[NMODL] [error] :: Code Incompatibility :: "taun" variable found at [39.31-34] should be defined as a RANGE variable instead of GLOBAL to enable backend transformations
[NMODL] [info] :: Running verbatim rename visitor
[NMODL] [info] :: Running KINETIC block visitor
[NMODL] [info] :: Running STEADYSTATE visitor
[NMODL] [info] :: Parsing Units
[NMODL] [info] :: Running nmodl inline visitor
[NMODL] [info] :: Running local variable rename visitor
[NMODL] [info] :: Running cnexp visitor
[NMODL] [info] :: Running C++ backend code generator
[NMODL] [info] :: Processing x86_64/corenrn/mod2c/kca.mod
[NMODL] [info] :: Running symtab visitor
[NMODL] [warning] :: SYMTAB :: cai [Argument] in evaluate_fct shadows <parameter read_ion> definition in NMODL_GLOBAL
[NMODL] [info] :: Running semantic analysis visitor
[NMODL] [info] :: Running CVode to cnexp visitor
[NMODL] [info] :: Running code compatibility checker
[NMODL] [info] :: Running verbatim rename visitor
[NMODL] [info] :: Running KINETIC block visitor
[NMODL] [warning] :: SYMTAB :: cai [Argument] in evaluate_fct shadows <parameter read_ion> definition in NMODL_GLOBAL
[NMODL] [info] :: Running STEADYSTATE visitor
[NMODL] [warning] :: SYMTAB :: cai [Argument] in evaluate_fct shadows <parameter read_ion> definition in NMODL_GLOBAL
[NMODL] [info] :: Parsing Units
[NMODL] [info] :: Running nmodl inline visitor
[NMODL] [info] :: Running local variable rename visitor
[NMODL] [info] :: Running cnexp visitor
[NMODL] [info] :: Running C++ backend code generator
[NMODL] [info] :: Processing x86_64/corenrn/mod2c/kdb.mod
[NMODL] [info] :: Running symtab visitor
[NMODL] [info] :: Running semantic analysis visitor
[NMODL] [info] :: Running CVode to cnexp visitor
[NMODL] [info] :: Running code compatibility checker
[NMODL] [error] :: Code incompatibility detected
[NMODL] [error] :: Cannot translate mod file to .cpp file
[NMODL] [error] :: Fix the following errors and try again
[NMODL] [error] :: Code Incompatibility :: "ninf" variable found at [29.9-12] should be defined as a RANGE variable instead of GLOBAL to enable backend transformations
[NMODL] [error] :: Code Incompatibility :: "taun" variable found at [29.14-17] should be defined as a RANGE variable instead of GLOBAL to enable backend transformations
[NMODL] [info] :: Running verbatim rename visitor
[NMODL] [info] :: Running KINETIC block visitor
[NMODL] [info] :: Running STEADYSTATE visitor
[NMODL] [info] :: Parsing Units
[NMODL] [info] :: Processing x86_64/corenrn/mod2c/kdbm.mod
[NMODL] [info] :: Running nmodl inline visitor
[NMODL] [info] :: Running local variable rename visitor
[NMODL] [info] :: Running cnexp visitor
[NMODL] [info] :: Running symtab visitor
[NMODL] [info] :: Running semantic analysis visitor
[NMODL] [info] :: Running CVode to cnexp visitor
[NMODL] [info] :: Running code compatibility checker
[NMODL] [error] :: Code incompatibility detected
[NMODL] [error] :: Cannot translate mod file to .cpp file
[NMODL] [error] :: Fix the following errors and try again
[NMODL] [error] :: Code Incompatibility :: "ninf" variable found at [29.9-12] should be defined as a RANGE variable instead of GLOBAL to enable backend transformations
[NMODL] [error] :: Code Incompatibility :: "taun" variable found at [29.14-17] should be defined as a RANGE variable instead of GLOBAL to enable backend transformations
[NMODL] [info] :: Running verbatim rename visitor
[NMODL] [info] :: Running KINETIC block visitor
[NMODL] [info] :: Running STEADYSTATE visitor
[NMODL] [info] :: Running C++ backend code generator
[NMODL] [info] :: Parsing Units
[NMODL] [info] :: Processing x86_64/corenrn/mod2c/kdrbca1.mod
[NMODL] [info] :: Running nmodl inline visitor
[NMODL] [info] :: Running symtab visitor
[NMODL] [info] :: Running semantic analysis visitor
[NMODL] [info] :: Running local variable rename visitor
[NMODL] [info] :: Running CVode to cnexp visitor
[NMODL] [info] :: Running code compatibility checker
[NMODL] [info] :: Running cnexp visitor
[NMODL] [error] :: Code incompatibility detected
[NMODL] [error] :: Cannot translate mod file to .cpp file
[NMODL] [error] :: Fix the following errors and try again
[NMODL] [error] :: Code Incompatibility :: "ninf" variable found at [31.9-12] should be defined as a RANGE variable instead of GLOBAL to enable backend transformations
[NMODL] [error] :: Code Incompatibility :: "taun" variable found at [31.14-17] should be defined as a RANGE variable instead of GLOBAL to enable backend transformations
[NMODL] [info] :: Running verbatim rename visitor
[NMODL] [info] :: Running KINETIC block visitor
[NMODL] [info] :: Running STEADYSTATE visitor
[NMODL] [info] :: Parsing Units
[NMODL] [info] :: Running C++ backend code generator
[NMODL] [info] :: Running nmodl inline visitor
[NMODL] [info] :: Running local variable rename visitor
[NMODL] [info] :: Running cnexp visitor
[NMODL] [info] :: Running C++ backend code generator
[NMODL] [info] :: Processing x86_64/corenrn/mod2c/kdrca1.mod
[NMODL] [info] :: Running symtab visitor
[NMODL] [info] :: Running semantic analysis visitor
[NMODL] [info] :: Running CVode to cnexp visitor
[NMODL] [info] :: Running code compatibility checker
[NMODL] [error] :: Code incompatibility detected
[NMODL] [error] :: Cannot translate mod file to .cpp file
[NMODL] [error] :: Fix the following errors and try again
[NMODL] [error] :: Code Incompatibility :: "ninf" variable found at [31.9-12] should be defined as a RANGE variable instead of GLOBAL to enable backend transformations
[NMODL] [error] :: Code Incompatibility :: "taun" variable found at [31.14-17] should be defined as a RANGE variable instead of GLOBAL to enable backend transformations
[NMODL] [info] :: Running verbatim rename visitor
[NMODL] [info] :: Running KINETIC block visitor
[NMODL] [info] :: Running STEADYSTATE visitor
[NMODL] [info] :: Parsing Units
[NMODL] [info] :: Running nmodl inline visitor
[NMODL] [info] :: Running local variable rename visitor
[NMODL] [info] :: Running cnexp visitor
[NMODL] [info] :: Running C++ backend code generator
[NMODL] [info] :: Processing x86_64/corenrn/mod2c/kmb.mod
[NMODL] [info] :: Running symtab visitor
[NMODL] [info] :: Running semantic analysis visitor
[NMODL] [info] :: Running CVode to cnexp visitor
[NMODL] [info] :: Running code compatibility checker
[NMODL] [error] :: Code incompatibility detected
[NMODL] [error] :: Cannot translate mod file to .cpp file
[NMODL] [error] :: Fix the following errors and try again
[NMODL] [error] :: Code Incompatibility :: "inf" variable found at [32.14-16] should be defined as a RANGE variable instead of GLOBAL to enable backend transformations
[NMODL] [error] :: Code Incompatibility :: "tau" variable found at [32.19-21] should be defined as a RANGE variable instead of GLOBAL to enable backend transformations
[NMODL] [info] :: Running verbatim rename visitor
[NMODL] [info] :: Running KINETIC block visitor
[NMODL] [info] :: Running STEADYSTATE visitor
[NMODL] [info] :: Parsing Units
[NMODL] [info] :: Running nmodl inline visitor
[NMODL] [info] :: Running local variable rename visitor
[NMODL] [info] :: Running cnexp visitor
[NMODL] [info] :: Processing x86_64/corenrn/mod2c/na3n.mod
[NMODL] [info] :: Running C++ backend code generator
[NMODL] [info] :: Processing x86_64/corenrn/mod2c/naxn.mod
[NMODL] [info] :: Running symtab visitor
[NMODL] [warning] :: SYMTAB :: sh [Argument] in trates shadows <range parameter> definition in NMODL_GLOBAL
[NMODL] [info] :: Running semantic analysis visitor
[NMODL] [info] :: Running symtab visitor
[NMODL] [info] :: Running CVode to cnexp visitor
[NMODL] [info] :: Running code compatibility checker
[NMODL] [warning] :: SYMTAB :: sh [Argument] in trates shadows <range parameter> definition in NMODL_GLOBAL
[NMODL] [info] :: Running semantic analysis visitor
[NMODL] [info] :: Running CVode to cnexp visitor
[NMODL] [info] :: Running code compatibility checker
[NMODL] [error] :: Code incompatibility detected
[NMODL] [error] :: Cannot translate mod file to .cpp file
[NMODL] [error] :: Fix the following errors and try again
[NMODL] [error] :: Code Incompatibility :: "minf" variable found at [12.9-12] should be defined as a RANGE variable instead of GLOBAL to enable backend transformations
[NMODL] [error] :: Code Incompatibility :: "hinf" variable found at [12.15-18] should be defined as a RANGE variable instead of GLOBAL to enable backend transformations
[NMODL] [error] :: Code Incompatibility :: "mtau" variable found at [12.21-24] should be defined as a RANGE variable instead of GLOBAL to enable backend transformations
[NMODL] [error] :: Code Incompatibility :: "htau" variable found at [12.27-30] should be defined as a RANGE variable instead of GLOBAL to enable backend transformations
[NMODL] [error] :: Code Incompatibility :: "sinf" variable found at [12.33-36] should be defined as a RANGE variable instead of GLOBAL to enable backend transformations
[NMODL] [error] :: Code Incompatibility :: "taus" variable found at [12.39-42] should be defined as a RANGE variable instead of GLOBAL to enable backend transformations
[NMODL] [info] :: Running verbatim rename visitor
[NMODL] [info] :: Running KINETIC block visitor
[NMODL] [error] :: Code incompatibility detected
[NMODL] [error] :: Cannot translate mod file to .cpp file
[NMODL] [error] :: Fix the following errors and try again
[NMODL] [error] :: Code Incompatibility :: "minf" variable found at [12.9-12] should be defined as a RANGE variable instead of GLOBAL to enable backend transformations
[NMODL] [error] :: Code Incompatibility :: "hinf" variable found at [12.15-18] should be defined as a RANGE variable instead of GLOBAL to enable backend transformations
[NMODL] [error] :: Code Incompatibility :: "mtau" variable found at [12.21-24] should be defined as a RANGE variable instead of GLOBAL to enable backend transformations
[NMODL] [error] :: Code Incompatibility :: "htau" variable found at [12.27-30] should be defined as a RANGE variable instead of GLOBAL to enable backend transformations
[NMODL] [info] :: Running verbatim rename visitor
[NMODL] [info] :: Running KINETIC block visitor
[NMODL] [warning] :: SYMTAB :: sh [Argument] in trates shadows <range parameter> definition in NMODL_GLOBAL
[NMODL] [info] :: Running STEADYSTATE visitor
[NMODL] [warning] :: SYMTAB :: sh [Argument] in trates shadows <range parameter> definition in NMODL_GLOBAL
[NMODL] [info] :: Running STEADYSTATE visitor
[NMODL] [warning] :: SYMTAB :: sh [Argument] in trates shadows <range parameter> definition in NMODL_GLOBAL
[NMODL] [info] :: Parsing Units
[NMODL] [warning] :: SYMTAB :: sh [Argument] in trates shadows <range parameter> definition in NMODL_GLOBAL
[NMODL] [info] :: Parsing Units
[NMODL] [info] :: Running nmodl inline visitor
[NMODL] [info] :: Running nmodl inline visitor
[NMODL] [info] :: Running local variable rename visitor
[NMODL] [info] :: Running cnexp visitor
[NMODL] [info] :: Running local variable rename visitor
[NMODL] [info] :: Running cnexp visitor
[NMODL] [info] :: Running C++ backend code generator
[NMODL] [info] :: Processing x86_64/corenrn/mod2c/netstim.mod
[NMODL] [info] :: Running C++ backend code generator
[NMODL] [info] :: Running symtab visitor
[NMODL] [warning] :: SYMTAB :: t [Argument] in init_sequence shadows <extern_neuron_var> definition in NMODL_GLOBAL
[NMODL] [info] :: Running semantic analysis visitor
[NMODL] [info] :: Running CVode to cnexp visitor
[NMODL] [info] :: Running code compatibility checker
[NMODL] [info] :: Running verbatim rename visitor
[NMODL] [info] :: Running KINETIC block visitor
[NMODL] [warning] :: SYMTAB :: t [Argument] in init_sequence shadows <extern_neuron_var> definition in NMODL_GLOBAL
[NMODL] [info] :: Running STEADYSTATE visitor
[NMODL] [warning] :: SYMTAB :: t [Argument] in init_sequence shadows <extern_neuron_var> definition in NMODL_GLOBAL
[NMODL] [info] :: Parsing Units
[NMODL] [info] :: Running nmodl inline visitor
[NMODL] [warning] :: Can not inline function call to erand
[NMODL] [warning] :: Can not inline function call to erand
[NMODL] [warning] :: Can not inline function call to erand
[NMODL] [warning] :: Can not inline function call to erand
[NMODL] [warning] :: Can not inline function call to erand
[NMODL] [info] :: Running local variable rename visitor
[NMODL] [info] :: Running cnexp visitor
[NMODL] [info] :: Running C++ backend code generator
[NMODL] [info] :: Processing x86_64/corenrn/mod2c/passive.mod
[NMODL] [info] :: Running symtab visitor
[NMODL] [info] :: Running semantic analysis visitor
[NMODL] [info] :: Running CVode to cnexp visitor
[NMODL] [info] :: Running code compatibility checker
[NMODL] [info] :: Running verbatim rename visitor
[NMODL] [info] :: Running KINETIC block visitor
[NMODL] [info] :: Running STEADYSTATE visitor
[NMODL] [info] :: Parsing Units
[NMODL] [info] :: Running nmodl inline visitor
[NMODL] [info] :: Running local variable rename visitor
[NMODL] [info] :: Running cnexp visitor
[NMODL] [info] :: Running C++ backend code generator
[NMODL] [info] :: Processing x86_64/corenrn/mod2c/pattern.mod
[NMODL] [info] :: Running symtab visitor
[NMODL] [info] :: Running semantic analysis visitor
[NMODL] [info] :: Running CVode to cnexp visitor
[NMODL] [info] :: Running code compatibility checker
[NMODL] [info] :: Running verbatim rename visitor
[NMODL] [info] :: Running KINETIC block visitor
[NMODL] [info] :: Running STEADYSTATE visitor
[NMODL] [info] :: Parsing Units
[NMODL] [info] :: Running nmodl inline visitor
[NMODL] [info] :: Running local variable rename visitor
[NMODL] [info] :: Running cnexp visitor
[NMODL] [info] :: Processing x86_64/corenrn/mod2c/stim.mod
[NMODL] [info] :: Running C++ backend code generator
[NMODL] [info] :: Running symtab visitor
[NMODL] [info] :: Running semantic analysis visitor
[NMODL] [info] :: Running CVode to cnexp visitor
[NMODL] [info] :: Running code compatibility checker
[NMODL] [info] :: Running verbatim rename visitor
[NMODL] [info] :: Running KINETIC block visitor
[NMODL] [info] :: Running STEADYSTATE visitor
[NMODL] [info] :: Parsing Units
[NMODL] [info] :: Running nmodl inline visitor
[NMODL] [info] :: Running local variable rename visitor
[NMODL] [info] :: Running cnexp visitor
[NMODL] [info] :: Running C++ backend code generator
[NMODL] [info] :: Processing x86_64/corenrn/mod2c/svclmp.mod
[NMODL] [info] :: Running symtab visitor
[NMODL] [info] :: Running semantic analysis visitor
[NMODL] [info] :: Running CVode to cnexp visitor
[NMODL] [warning] :: CVode solver of icur in 64.20-30 replaced with cnexp solver
[NMODL] [info] :: Running code compatibility checker
[NMODL] [info] :: Running verbatim rename visitor
[NMODL] [info] :: Running KINETIC block visitor
[NMODL] [info] :: Running STEADYSTATE visitor
[NMODL] [info] :: Parsing Units
[NMODL] [info] :: Running nmodl inline visitor
[NMODL] [info] :: Running local variable rename visitor
[NMODL] [info] :: Running cnexp visitor
[NMODL] [info] :: Running C++ backend code generator
x86_64/corenrn/mod2c/cagk.cpp:113:24: error: use of undeclared identifier 'oinf'; did you mean 'sinf'?
{"oinf_cagk", &oinf},
^~~~
sinf
/usr/include/bits/mathcalls.h:65:1: note: 'sinf' declared here
__MATHCALL (sin,, (_Mdouble_ __x));
^
/usr/include/math.h:54:3: note: expanded from macro '__MATHCALL'
__MATHDECL (_Mdouble_,function,suffix, args)
^
/usr/include/math.h:56:3: note: expanded from macro '__MATHDECL'
__MATHDECL_1(type, function,suffix, args); \
^
/usr/include/math.h:64:15: note: expanded from macro '__MATHDECL_1'
extern type __MATH_PRECNAME(function,suffix) args __THROW
^
/usr/include/math.h:86:34: note: expanded from macro '__MATH_PRECNAME'
# define __MATH_PRECNAME(name,r) name##f##r
^
<scratch space>:109:1: note: expanded from here
sinf
^
x86_64/corenrn/mod2c/cagk.cpp:114:23: error: use of undeclared identifier 'tau'; did you mean 'tan'?
{"tau_cagk", &tau},
^~~
tan
/gpfs/bbp.cscs.ch/ssd/apps/bsd/2024-02-01/stage_compilers/install_gcc-4.8.5-haswell/gcc-12.3.0-lvcks3/lib/gcc/x86_64-pc-linux-gnu/12.3.0/../../../../include/c++/12.3.0/math.h:45:12: note: 'tan' declared here
using std::tan;
^
x86_64/corenrn/mod2c/cagk.cpp:113:23: error: cannot initialize a member subobject of type 'double *' with an rvalue of type 'float (*)(float) throw()'
{"oinf_cagk", &oinf},
^~~~~
x86_64/corenrn/mod2c/cagk.cpp:114:23: error: address of overloaded function 'tan' does not match required type 'double'
{"tau_cagk", &tau},
^~~
/gpfs/bbp.cscs.ch/ssd/apps/bsd/2024-02-01/stage_compilers/install_gcc-4.8.5-haswell/gcc-12.3.0-lvcks3/lib/gcc/x86_64-pc-linux-gnu/12.3.0/../../../../include/c++/12.3.0/cmath:494:5: note: candidate template ignored: could not match 'typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type (_Tp)' against 'double'
tan(_Tp __x)
^
x86_64/corenrn/mod2c/cagk.cpp:179:13: error: use of undeclared identifier 'inst'; did you mean 'int'?
if (inst->global->thread_data_in_use) {
^~~~
int
x86_64/corenrn/mod2c/cagk.cpp:179:17: error: cannot use arrow operator on a type
if (inst->global->thread_data_in_use) {
^
x86_64/corenrn/mod2c/cagk.cpp:182:45: error: use of undeclared identifier 'inst'
thread[thread_var_tid()].pval = inst->global->thread_data;
^
x86_64/corenrn/mod2c/cagk.cpp:183:13: error: use of undeclared identifier 'inst'; did you mean 'int'?
inst->global->thread_data_in_use = 1;
^~~~
int
x86_64/corenrn/mod2c/cagk.cpp:183:17: error: cannot use arrow operator on a type
inst->global->thread_data_in_use = 1;
^
x86_64/corenrn/mod2c/cagk.cpp:190:46: error: use of undeclared identifier 'inst'
if (thread[thread_var_tid()].pval == inst->global->thread_data) {
^
x86_64/corenrn/mod2c/cagk.cpp:191:13: error: use of undeclared identifier 'inst'; did you mean 'int'?
inst->global->thread_data_in_use = 0;
^~~~
int
x86_64/corenrn/mod2c/cagk.cpp:191:17: error: cannot use arrow operator on a type
inst->global->thread_data_in_use = 0;
^
x86_64/corenrn/mod2c/cagk.cpp:322:9: error: use of undeclared identifier 'tau'
tau = 1.0 / (a + bet_in_0);
^
x86_64/corenrn/mod2c/cagk.cpp:323:9: error: use of undeclared identifier 'oinf'
oinf = a * tau;
^
x86_64/corenrn/mod2c/cagk.cpp:323:20: error: use of undeclared identifier 'tau'
oinf = a * tau;
^
x86_64/corenrn/mod2c/cagk.cpp:421:21: error: use of undeclared identifier 'tau'
tau = 1.0 / (a + bet_in_0);
^
x86_64/corenrn/mod2c/cagk.cpp:422:21: error: use of undeclared identifier 'oinf'
oinf = a * tau;
^
x86_64/corenrn/mod2c/cagk.cpp:422:32: error: use of undeclared identifier 'tau'
oinf = a * tau;
^
x86_64/corenrn/mod2c/cagk.cpp:424:31: error: use of undeclared identifier 'oinf'
inst->o[id] = oinf;
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [x86_64/corenrn/build/cagk.o] Error 1
make: *** Waiting for unfinished jobs....
x86_64/corenrn/mod2c/cal2.cpp:116:23: error: use of undeclared identifier 'minf'
{"minf_cal", &minf},
^
x86_64/corenrn/mod2c/cal2.cpp:117:22: error: use of undeclared identifier 'tau'; did you mean 'tan'?
{"tau_cal", &tau},
^~~
tan
/gpfs/bbp.cscs.ch/ssd/apps/bsd/2024-02-01/stage_compilers/install_gcc-4.8.5-haswell/gcc-12.3.0-lvcks3/lib/gcc/x86_64-pc-linux-gnu/12.3.0/../../../../include/c++/12.3.0/math.h:45:12: note: 'tan' declared here
using std::tan;
^
x86_64/corenrn/mod2c/cal2.cpp:182:13: error: use of undeclared identifier 'inst'; did you mean 'int'?
if (inst->global->thread_data_in_use) {
^~~~
int
x86_64/corenrn/mod2c/cal2.cpp:182:17: error: cannot use arrow operator on a type
if (inst->global->thread_data_in_use) {
^
x86_64/corenrn/mod2c/cal2.cpp:185:45: error: use of undeclared identifier 'inst'
thread[thread_var_tid()].pval = inst->global->thread_data;
^
x86_64/corenrn/mod2c/cal2.cpp:186:13: error: use of undeclared identifier 'inst'; did you mean 'int'?
inst->global->thread_data_in_use = 1;
^~~~
int
x86_64/corenrn/mod2c/cal2.cpp:186:17: error: cannot use arrow operator on a type
inst->global->thread_data_in_use = 1;
^
x86_64/corenrn/mod2c/cal2.cpp:193:46: error: use of undeclared identifier 'inst'
if (thread[thread_var_tid()].pval == inst->global->thread_data) {
^
x86_64/corenrn/mod2c/cal2.cpp:194:13: error: use of undeclared identifier 'inst'; did you mean 'int'?
inst->global->thread_data_in_use = 0;
^~~~
int
x86_64/corenrn/mod2c/cal2.cpp:194:17: error: cannot use arrow operator on a type
inst->global->thread_data_in_use = 0;
^
x86_64/corenrn/mod2c/cal2.cpp:316:9: error: use of undeclared identifier 'minf'
minf = a * b;
^
x86_64/corenrn/mod2c/cal2.cpp:327:9: error: use of undeclared identifier 'tau'
tau = betmt_in_0 / (qt * inst->global->a0m * (1.0 + alpmt_in_0));
^
x86_64/corenrn/mod2c/cal2.cpp:328:13: error: use of undeclared identifier 'tau'
if (tau < inst->global->mmin / qt) {
^
x86_64/corenrn/mod2c/cal2.cpp:329:13: error: use of undeclared identifier 'tau'
tau = inst->global->mmin / qt;
^
x86_64/corenrn/mod2c/cal2.cpp:453:21: error: use of undeclared identifier 'minf'
minf = a * b;
^
x86_64/corenrn/mod2c/cal2.cpp:464:21: error: use of undeclared identifier 'tau'
tau = betmt_in_0 / (qt * inst->global->a0m * (1.0 + alpmt_in_0));
^
x86_64/corenrn/mod2c/cal2.cpp:465:25: error: use of undeclared identifier 'tau'
if (tau < inst->global->mmin / qt) {
^
x86_64/corenrn/mod2c/cal2.cpp:466:25: error: use of undeclared identifier 'tau'
tau = inst->global->mmin / qt;
^
x86_64/corenrn/mod2c/cal2.cpp:469:31: error: use of undeclared identifier 'minf'
inst->m[id] = minf;
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [x86_64/corenrn/build/cal2.o] Error 1
x86_64/corenrn/mod2c/cacumm.cpp:413:9: warning: loop not vectorized: the optimizer was unable to perform the requested transformation; the transformation might be disabled or specified as part of an unsupported transformation ordering [-Wpass-failed=transform-warning]
#pragma omp simd
^
1 warning generated.
x86_64/corenrn/mod2c/can2.cpp:118:23: error: use of undeclared identifier 'hinf'; did you mean 'sinf'?
{"hinf_can", &hinf},
^~~~
sinf
/usr/include/bits/mathcalls.h:65:1: note: 'sinf' declared here
__MATHCALL (sin,, (_Mdouble_ __x));
^
/usr/include/math.h:54:3: note: expanded from macro '__MATHCALL'
__MATHDECL (_Mdouble_,function,suffix, args)
^
/usr/include/math.h:56:3: note: expanded from macro '__MATHDECL'
__MATHDECL_1(type, function,suffix, args); \
^
/usr/include/math.h:64:15: note: expanded from macro '__MATHDECL_1'
extern type __MATH_PRECNAME(function,suffix) args __THROW
^
/usr/include/math.h:86:34: note: expanded from macro '__MATH_PRECNAME'
# define __MATH_PRECNAME(name,r) name##f##r
^
<scratch space>:109:1: note: expanded from here
sinf
^
x86_64/corenrn/mod2c/can2.cpp:119:23: error: use of undeclared identifier 'minf'
{"minf_can", &minf},
^
x86_64/corenrn/mod2c/can2.cpp:120:23: error: use of undeclared identifier 'tauh'; did you mean 'tanh'?
{"tauh_can", &tauh},
^~~~
tanh
/gpfs/bbp.cscs.ch/ssd/apps/bsd/2024-02-01/stage_compilers/install_gcc-4.8.5-haswell/gcc-12.3.0-lvcks3/lib/gcc/x86_64-pc-linux-gnu/12.3.0/../../../../include/c++/12.3.0/math.h:48:12: note: 'tanh' declared here
using std::tanh;
^
x86_64/corenrn/mod2c/can2.cpp:121:23: error: use of undeclared identifier 'taum'
{"taum_can", &taum},
^
x86_64/corenrn/mod2c/can2.cpp:186:13: error: use of undeclared identifier 'inst'; did you mean 'int'?
if (inst->global->thread_data_in_use) {
^~~~
int
x86_64/corenrn/mod2c/can2.cpp:186:17: error: cannot use arrow operator on a type
if (inst->global->thread_data_in_use) {
^
x86_64/corenrn/mod2c/can2.cpp:189:45: error: use of undeclared identifier 'inst'
thread[thread_var_tid()].pval = inst->global->thread_data;
^
x86_64/corenrn/mod2c/can2.cpp:190:13: error: use of undeclared identifier 'inst'; did you mean 'int'?
inst->global->thread_data_in_use = 1;
^~~~
int
x86_64/corenrn/mod2c/can2.cpp:190:17: error: cannot use arrow operator on a type
inst->global->thread_data_in_use = 1;
^
x86_64/corenrn/mod2c/can2.cpp:197:46: error: use of undeclared identifier 'inst'
if (thread[thread_var_tid()].pval == inst->global->thread_data) {
^
x86_64/corenrn/mod2c/can2.cpp:198:13: error: use of undeclared identifier 'inst'; did you mean 'int'?
inst->global->thread_data_in_use = 0;
^~~~
int
x86_64/corenrn/mod2c/can2.cpp:198:17: error: cannot use arrow operator on a type
inst->global->thread_data_in_use = 0;
^
x86_64/corenrn/mod2c/can2.cpp:323:9: error: use of undeclared identifier 'minf'
minf = a * b;
^
x86_64/corenrn/mod2c/can2.cpp:334:9: error: use of undeclared identifier 'taum'
taum = betmt_in_0 / (qt * inst->global->a0m * (1.0 + alpmt_in_0));
^
x86_64/corenrn/mod2c/can2.cpp:335:13: error: use of undeclared identifier 'taum'
if (taum < inst->global->mmin / qt) {
^
x86_64/corenrn/mod2c/can2.cpp:336:13: error: use of undeclared identifier 'taum'
taum = inst->global->mmin / qt;
^
x86_64/corenrn/mod2c/can2.cpp:350:9: error: use of undeclared identifier 'hinf'
hinf = a * b;
^
x86_64/corenrn/mod2c/can2.cpp:351:9: error: use of undeclared identifier 'tauh'
tauh = 80.0;
^
x86_64/corenrn/mod2c/can2.cpp:352:13: error: use of undeclared identifier 'tauh'
if (tauh < inst->global->hmin) {
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [x86_64/corenrn/build/can2.o] Error 1
Issues
- We should change default log level from
info to warning IMO. When we have tens of MOD files, having those info level logs are not helpful:
[NMODL] [info] :: Parsing Units
[NMODL] [info] :: Running nmodl inline visitor
[NMODL] [info] :: Running local variable rename visitor
[NMODL] [info] :: Running cnexp visitor
[NMODL] [info] :: Running C++ backend code generator
[NMODL] [info] :: Processing x86_64/corenrn/mod2c/cacumm.mod
[NMODL] [info] :: Processing x86_64/corenrn/mod2c/cal2.mod
[NMODL] [info] :: Running symtab visitor
[NMODL] [info] :: Running semantic analysis visitor
[NMODL] [info] :: Running CVode to cnexp visitor
[NMODL] [info] :: Running code compatibility checker
[NMODL] [info] :: Running verbatim rename visitor
[NMODL] [info] :: Running KINETIC block visitor
[NMODL] [info] :: Running STEADYSTATE visitor
- When multiple MOD files are translated and compiled, it's difficult to understand error log belongs to which MOD file. For example:
[NMODL] [error] :: Code Incompatibility :: "oinf" variable found at [21.9-12] should be defined as a RANGE variable instead of GLOBAL to enable backend transformations
I don't know which MOD file this refers to. Having mod file name in this log would be nice.
- Do we abort the NMODL translation when incompatibility visitor detect errors? If it's not the case then it should.
[NMODL] [info] :: Running CVode to cnexp visitor
[NMODL] [info] :: Running code compatibility checker
[NMODL] [error] :: Code incompatibility detected
[NMODL] [error] :: Cannot translate mod file to .cpp file
[NMODL] [error] :: Fix the following errors and try again
[NMODL] [error] :: Code Incompatibility :: "linf" variable found at [35.16-19] should be defined as a RANGE variable instead of GLOBAL to enable backend transformations
[NMODL] [error] :: Code Incompatibility :: "taul" variable found at [35.22-25] should be defined as a RANGE variable instead of GLOBAL to enable backend transformations
[NMODL] [info] :: Running verbatim rename visitor
[NMODL] [info] :: Running KINETIC block visitor
[NMODL] [info] :: Running STEADYSTATE visitor
[NMODL] [info] :: Parsing Units
- In most of the cases user shouldn't end-up seeing compilation errors like the below:
x86_64/corenrn/mod2c/cagk.cpp:183:17: error: cannot use arrow operator on a type
inst->global->thread_data_in_use = 1;
^
x86_64/corenrn/mod2c/cagk.cpp:190:46: error: use of undeclared identifier 'inst'
if (thread[thread_var_tid()].pval == inst->global->thread_data) {
^
x86_64/corenrn/mod2c/cagk.cpp:191:13: error: use of undeclared identifier 'inst'; did you mean 'int'?
inst->global->thread_data_in_use = 0;
^~~~
int
i.e. I am not sure if this is because we didn't abort right after incompatibility error detected or there is some other reason.
Overview
As part of this ticket I would like to implement some QoL improvements when using NMODL.
Example
Let's take an example of MOD files directory from BB5:
/gpfs/bbp.cscs.ch/project/proj16/kumbhar/pramod_scratch/HPCTM-1856/neurodamus_checkWhen I compile that with
nrnivmodl-core, I see the following:Issues
infotowarningIMO. When we have tens of MOD files, having thoseinfolevel logs are not helpful:[NMODL] [error] :: Code Incompatibility :: "oinf" variable found at [21.9-12] should be defined as a RANGE variable instead of GLOBAL to enable backend transformationsI don't know which MOD file this refers to. Having mod file name in this log would be nice.
i.e. I am not sure if this is because we didn't abort right after incompatibility error detected or there is some other reason.