neuronsimulator / nrn

NEURON Simulator
http://nrn.readthedocs.io
Other
408 stars 118 forks source link

icpx compiler error with NMODL #2213

Open nrnhines opened 1 year ago

nrnhines commented 1 year ago

Many errors on my Ubuntu 22.04 of form

x86_64/corenrn/mod2c/expsyn.cpp:350:9: error: expected a for, while, or do-while loop to follow '#pragma ivdep'
        #pragma omp simd
        ^

Using

cmake .. -G Ninja -DCMAKE_INSTALL_PREFIX=install -DPYTHON_EXECUTABLE=`which python3` -DNRN_ENABLE_CORENEURON=ON -DCORENRN_ENABLE_NMODL=ON -DNRN_ENABLE_RX3D=OFF -DCMAKE_C_COMPILER="icx"  -DCMAKE_CXX_COMPILER="icpx" 

ninja install

Installed icpx with

sh l_dpcpp-cpp-compiler_p_2023.0.0.25393_offline.sh
export PATH=~/intel/oneapi/compiler/2023.0.0/linux/bin:$PATH
sudo ldconfig /home/hines/intel/oneapi/compiler/2023.0.0/linux/compiler/lib/intel64_lin
pramodk commented 1 year ago

@nrnhines : Is there icc and icpc available as well? e.g.

kumbhar@bbd-fp8lt73:~$ which icc
/opt/intel/oneapi/compiler/2023.0.0/linux/bin/intel64/icc
kumbhar@bbd-fp8lt73:~$ which icpc
/opt/intel/oneapi/compiler/2023.0.0/linux/bin/intel64/icpc

Could you try with these? (also, mod2c should work as well)

I will look at the error on Monday.

nrnhines commented 1 year ago

The contents of ~/intel/oneapi/compiler/2023.0.0/linux/bin

aocl-ioc64  ia32      icx      icx-cl   opencl-aot      sycl-post-link
dpcpp       icpx      icx-cc   intel64  run-clang-tidy
dpcpp-cl    icpx.cfg  icx.cfg  ioc64    sycl-ls

contents of ~/intel/oneapi/compiler/2023.0.0/linux/bin/intel64

codecov  icpc             map_opts  profmerge          tselect   xild
icc      icpc.cfg         mcpcom    profmergesampling  xiar      xild.cfg
icc.cfg  libcilkrts.so.5  profdcg   proforder          xiar.cfg

will try the latter icpc and icc.

nrnhines commented 1 year ago

I should mention that I downloaded and installed

l_dpcpp-cpp-compiler_p_2023.0.0.25393_offline.sh

and, at @pramodk s suggestion, setup the environment with

source ~/intel/oneapi/compiler/latest/env/vars.sh

Note that man icpc says

icpc: remark #10441: The Intel(R) C++ Compiler Classic (ICC) is deprecated and will be removed from product release in the second half of 2023. The Intel(R) oneAPI DPC++/C++ Compiler (ICX) is the recommended compiler moving forward. Please transition to use this compiler. Use '-diag-disable=10441' to disable this message.

And the man page for dpcpp states:

The dpcpp driver is deprecated and will be removed  in  a  future
       release. Please use icpx -fsycl or icx-cl -fsycl.