nmodl icon indicating copy to clipboard operation
nmodl copied to clipboard

Issues while compiling with XL compiler

Open pramodk opened this issue 4 years ago • 0 comments

Here is summary of issues I see while building coreneuron+nmodl with XL compiler:

System details : Marconi100

Modules:

$ module list
Currently Loaded Modulefiles:
 1) profile/base   2) python/3.8.2   3) xl/16.1.1--binary   4) cuda/11.2   5) cmake/3.20.0   6) git/2.27.0

Building as:

(venv) [pkumbhar@login01 build]$ cmake -DCMAKE_CXX_COMPILER=xlc++_r ..
-- The CXX compiler identification is XLClang 16.1.1.9
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /cineca/prod/opt/compilers/xl/16.1.1_sp4.1/binary/xlC/16.1.1/bin/xlc++_r - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- CHECKING FOR FLEX/BISON
-- Found FLEX: /usr/bin/flex (found suitable version "2.6.1", minimum required is "2.6")
-- Found BISON: /usr/bin/bison (found suitable version "3.0.4", minimum required is "3.0")
-- Found Git: /cineca/prod/opt/tools/git/2.27.0/gnu--8.4.0/bin/git (found version "2.27.0")
-- Sub-project : using fmt from "/m100/home/userexternal/pkumbhar/CoreNeuron/external/nmodl/ext/fmt"
-- Sub-project : using spdlog from "/m100/home/userexternal/pkumbhar/CoreNeuron/external/nmodl/ext/spdlog"
-- Sub-project : using pybind11 from "/m100/home/userexternal/pkumbhar/CoreNeuron/external/nmodl/ext/pybind11"
-- pybind11 v2.6.1
-- Found PythonInterp: /m100/home/userexternal/pkumbhar/venv/bin/python (found version "3.8.2")
-- Found PythonLibs: /cineca/prod/opt/compilers/python/3.8.2/none/lib/libpython3.8.so
-- Performing Test HAS_FLTO
-- Performing Test HAS_FLTO - Failed
-- Performing Test HAS_FLTO_THIN
-- Performing Test HAS_FLTO_THIN - Failed
-- Sub-project : using cli11 from "/m100/home/userexternal/pkumbhar/CoreNeuron/external/nmodl/ext/cli11"
-- Sub-project : using eigen from "/m100/home/userexternal/pkumbhar/CoreNeuron/external/nmodl/ext/eigen"
-- Version: 6.2.0
-- Build type:
-- CXX_STANDARD: 14
-- Performing Test has_std_14_flag
-- Performing Test has_std_14_flag - Success
-- Performing Test has_std_1y_flag
-- Performing Test has_std_1y_flag - Success
-- Performing Test SUPPORTS_USER_DEFINED_LITERALS
-- Performing Test SUPPORTS_USER_DEFINED_LITERALS - Success
-- Performing Test FMT_HAS_VARIANT
-- Performing Test FMT_HAS_VARIANT - Success
-- Required features: cxx_variadic_templates
-- Looking for strtod_l
-- Looking for strtod_l - found
-- Sub-module : missing /m100/home/userexternal/pkumbhar/CoreNeuron/external/nmodl/cmake/hpc-coding-conventions: running git submodule update --init
-- NMODL_FORMATTING: OFF
-- NMODL_FORMATTING_ON: all
-- NMODL_FORMATTING_CPP_CHANGES_ONLY: OFF
-- NMODL_TEST_FORMATTING: OFF
-- NMODL_FORMATTING_NO_SUBMODULES: ON
-- NMODL_CLANG_FORMAT: OFF
-- NMODL_CMAKE_FORMAT: OFF
-- NMODL_GIT_HOOKS: OFF
-- NMODL_GIT_COMMIT_HOOKS:
-- NMODL_GIT_PUSH_HOOKS: courtesy-msg
-- NMODL_STATIC_ANALYSIS: OFF
-- NMODL_TEST_STATIC_ANALYSIS: OFF
-- Could NOT find ClangFormat (missing: ClangFormat_EXECUTABLE)
-- CHECKING FOR PYTHON
-- Found PythonInterp: /m100/home/userexternal/pkumbhar/venv/bin/python (found suitable version "3.8.2", minimum required is "3.6")
--
-- Configured NMODL 0.3 (3e960d7d 2021-12-23 15:47:17 +0100)
--
-- You can now build NMODL using:
--   cmake --build . --parallel 8 [--target TARGET]
-- You might want to adjust the number of parallel build jobs for your system.
-- Some non-default targets you might want to build:
-- --------------------+--------------------------------------------------------
--  Target             |   Description
-- --------------------+--------------------------------------------------------
-- test                | Run unit tests
-- install             | Will install NMODL to: /usr/local
-- --------------------+--------------------------------------------------------
--  Build option       | Status
-- --------------------+--------------------------------------------------------
-- CXX COMPILER        | /cineca/prod/opt/compilers/xl/16.1.1_sp4.1/binary/xlC/16.1.1/bin/xlc++_r
-- COMPILE FLAGS       |
-- Build Type          |
-- Legacy Units        | OFF
-- Python Bindings     | ON
-- Flex                | /usr/bin/flex
-- Bison               | /usr/bin/bison
-- Python              | /m100/home/userexternal/pkumbhar/venv/bin/python
-- --------------+--------------------------------------------------------------
--  See documentation : https://github.com/BlueBrain/nmodl/
-- --------------+--------------------------------------------------------------
--
-- Configuring done
-- Generating done
-- Build files have been written to: /m100/home/userexternal/pkumbhar/CoreNeuron/external/nmodl/build

Issues

  • Link issue with test:
]$ make
[  1%] Built target pyembed
[  2%] Built target fmt
[  4%] Built target test_util
[  5%] Built target pyastgen
[ 21%] Built target lexer_obj
[ 22%] Built target lexer
[ 23%] Built target printer_obj
[ 24%] Built target printer
[ 25%] Built target symtab_obj
[ 26%] Built target symtab
[ 30%] Built target util_obj
[ 30%] Built target util
[ 31%] Built target pywrapper
[ 48%] Built target visitor_obj
[ 50%] Built target visitor
[ 50%] Linking CXX executable ../../bin/testvisitor
../../src/visitors/libvisitor.a(visitor_utils.cpp.o): In function `nmodl::statement_dependencies[abi:cxx11](std::shared_ptr<nmodl::ast::Expression> const&, std::shared_ptr<nmodl::ast::Expression> const&)':
/m100/home/userexternal/pkumbhar/CoreNeuron/external/nmodl/src/visitors/visitor_utils.cpp:(.text+0x7c8b0): undefined reference to `nmodl::visitor::MetaAstLookupVisitor<nmodl::visitor::Visitor>::MetaAstLookupVisitor()'
../../src/visitors/libvisitor.a(visitor_utils.cpp.o): In function `nmodl::collect_nodes(nmodl::ast::Ast const&, std::vector<nmodl::ast::AstNodeType, std::allocator<nmodl::ast::AstNodeType> > const&)':
/m100/home/userexternal/pkumbhar/CoreNeuron/external/nmodl/src/visitors/visitor_utils.cpp:(.text+0x7d648): undefined reference to `nmodl::visitor::MetaAstLookupVisitor<nmodl::visitor::ConstVisitor>::MetaAstLookupVisitor()'
../../src/visitors/libvisitor.a(visitor_utils.cpp.o): In function `nmodl::collect_nodes(nmodl::ast::Ast&, std::vector<nmodl::ast::AstNodeType, std::allocator<nmodl::ast::AstNodeType> > const&)':
/m100/home/userexternal/pkumbhar/CoreNeuron/external/nmodl/src/visitors/visitor_utils.cpp:(.text+0x7dbe0): undefined reference to `nmodl::visitor::MetaAstLookupVisitor<nmodl::visitor::Visitor>::MetaAstLookupVisitor()'
make[2]: *** [test/unit/CMakeFiles/testvisitor.dir/build.make:496: bin/testvisitor] Error 1
make[1]: *** [CMakeFiles/Makefile2:1235: test/unit/CMakeFiles/testvisitor.dir/all] Error 2
make: *** [Makefile:146: all] Error 2
...
[100%] Linking CXX executable ../bin/nmodl
visitors/libvisitor.a(visitor_utils.cpp.o): In function `nmodl::statement_dependencies[abi:cxx11](std::shared_ptr<nmodl::ast::Expression> const&, std::shared_ptr<nmodl::ast::Expression> const&)':
/m100/home/userexternal/pkumbhar/CoreNeuron/external/nmodl/src/visitors/visitor_utils.cpp:(.text+0x7c8b0): undefined reference to `nmodl::visitor::MetaAstLookupVisitor<nmodl::visitor::Visitor>::MetaAstLookupVisitor()'
visitors/libvisitor.a(visitor_utils.cpp.o): In function `nmodl::collect_nodes(nmodl::ast::Ast const&, std::vector<nmodl::ast::AstNodeType, std::allocator<nmodl::ast::AstNodeType> > const&)':
/m100/home/userexternal/pkumbhar/CoreNeuron/external/nmodl/src/visitors/visitor_utils.cpp:(.text+0x7d648): undefined reference to `nmodl::visitor::MetaAstLookupVisitor<nmodl::visitor::ConstVisitor>::MetaAstLookupVisitor()'
visitors/libvisitor.a(visitor_utils.cpp.o): In function `nmodl::collect_nodes(nmodl::ast::Ast&, std::vector<nmodl::ast::AstNodeType, std::allocator<nmodl::ast::AstNodeType> > const&)':
/m100/home/userexternal/pkumbhar/CoreNeuron/external/nmodl/src/visitors/visitor_utils.cpp:(.text+0x7dbe0): undefined reference to `nmodl::visitor::MetaAstLookupVisitor<nmodl::visitor::Visitor>::MetaAstLookupVisitor()'
make[3]: *** [src/CMakeFiles/nmodl.dir/build.make:106: bin/nmodl] Error 1
make[2]: *** [CMakeFiles/Makefile2:1612: src/CMakeFiles/nmodl.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:1619: src/CMakeFiles/nmodl.dir/rule] Error 2
  • Issue with Eigen based test compilation:
In file included from /m100/home/userexternal/pkumbhar/CoreNeuron/external/nmodl/test/unit/newton/newton.cpp:14:
In file included from /m100/home/userexternal/pkumbhar/CoreNeuron/external/nmodl/src/nmodl.hpp:19:
In file included from /m100/home/userexternal/pkumbhar/CoreNeuron/external/nmodl/src/solver/newton/newton.hpp:22:
In file included from /m100/home/userexternal/pkumbhar/CoreNeuron/external/nmodl/ext/eigen/Eigen/LU:11:
In file included from /m100/home/userexternal/pkumbhar/CoreNeuron/external/nmodl/ext/eigen/Eigen/Core:210:
/m100/home/userexternal/pkumbhar/CoreNeuron/external/nmodl/ext/eigen/Eigen/src/Core/arch/AltiVec/PacketMath.h:830:117: error: no matching function for call to 'vec_madd'
template<> EIGEN_STRONG_INLINE Packet8us pmadd(const Packet8us& a, const Packet8us& b, const Packet8us& c) { return vec_madd(a,b,c); }

this requires add_definitions(-DEIGEN_DONT_VECTORIZE=1).

pramodk avatar Jan 05 '22 12:01 pramodk