Dear NEST Developers,

 

I would like to share some insights I gained over the last few days concerning NEST and IDEs. As you might know, we have some instructions for how to use NEST with IDEs (https://nest-simulator-sg.readthedocs.io/en/latest/developer_space/workflows/nest_with_ides.html), but these instructions are at best complicated and at worst awfully outdated.

 

I now discover the magic -G flag for CMake (https://cmake.org/cmake/help/latest/manual/cmake-generators.7.html), where CMake does all the heavy configuration lifting for you.

 

Proceed as follows:

- Create a build directory

- Prepare your normal cmake invocation and add

                - for XCode: -GXcode

                - for Eclipse: -G"Eclipse CDT4 - Unix Makefiles"

- Then open the build directory in XCode or Eclipse

 

For other build systems, run cmake –help and see if your system is listed. Unfortunately, VSCode seems unsupported at the moment.

 

In Xcode, you can then choose the "install" target and run it to build NEST and afterwards the "nest" target to run nest—and it will stop in the debugger if you just set a breakpoint or something goes wrong.

 

There are still a few problems, and if any of you have more experience than me with setting up Xcode or Eclipse problems, we can maybe work it out together:

 

  1. In Eclipse, the project will only include files in the build directory, not the source code. How to fix that?
  2. Xcode
    1. Files are ordered a bit strangely (subfolders for headers and non-headers) and "libnestutil" is shown as "nestutil" in the folder list
    2. The "installcheck" target does not work because Xcode runs everything in the conda "base" environment—how to either force a "conda activate nest" before each run or explicitly set PYTHONPATH?
    3. I have not yet found out how to run PyNEST from Xcode, which would also depend on conda activate/Pythonpath setting

 

Once we have a little more experience, I will prepare a PR to update the IDE instructions.

 

Best,

Hans Ekkehard

 

-- 

 

Prof. Dr. Hans Ekkehard Plesser

Head, Department of Data Science

 

Faculty of Science and Technology

Norwegian University of Life Sciences

PO Box 5003, 1432 Aas, Norway

 

Phone +47 6723 1560

Email hans.ekkehard.plesser@nmbu.no

Home http://arken.nmbu.no/~plesser