**** Error at bottom of email: #include [linkages appear missing w/ NEST source directories:. ./libnestutil, ./nestkernal,, and ./sli ]****

Hans,
  Thank you for your suggestions on May 6th. I've since built my own module, 'My2Module' per your guidance and that on https://nest.github.io/nest-simulator/extension_modules.  Unfortunately it appears the NEST source directories ./libnestutil, ./nestkernal,, and ./sli are not visible/linked to my2module.cpp

  Is this non-linkage to be expected as it forces every "#include' in my2module.cpp and my STDP model to have its absolute path included?

  Below I show how I adapted/complied the example MyModule included on github and the error message I get (bottom of email).

  Thank you for any further suggestions.

Best Regards,
--Allen

---------CREATE MODULE: 1 directory copied, 4 files updated, 2 files added------------
1. Make Module directory
/home/nest/work/nest-install/examples/MyModule copied/renamed to:
/home/nest/examples/My2Module

Two files with new STDP model added:
stdp_izh_bitwise_correct_connection.cpp 
stdp_izh_bitwise_correct_connection.h  


2. Updated "myModule.cpp"
name changed to "my2Module.cpp", references within updated

New STDP Model Listed by adding line:
#include "stdp_izh_bitwise_correct_connection.h"     

New STDP Model Registered with model manager by adding line:
nest.kernel().model_manager.register_connection_model<STDPIzhBitwiseCorrectConnection<nest::TargetIdentifierPtrRport > >( "stdp_izh_bitwise_correct_connection" );]  


3. Updated "myModule.h"
name changed to "my2Module.h"

two absolute paths inserted (correct missing file error):
#include "/home/nest/work/nest-simulator-2.18.0/sli/slifunction.h"
#include "/home/nest/work/nest-simulator-2.18.0/sli/slimodule.h"


4. Updated "CMakeLists.txt"
SHORT_NAME renamed to "my2", references within updated

MODEL_SOURCE added:
stdp_izh_bitwise_correct_connection.cpp stdp_izh_bitwise_correct_connection.h


5. Updated "mymodule-init.sli"
name changed to "my2module-init.sli", references within/across files above updated

--------------------------------------------------------------

------------CMAKE Nest Build/Install (explicitly followed instructions)---------
$ export NEST_INSTALL_DIR=/home/nest/work/nest-install
$ cd /home/nest/examples/My2Module
$ cd ..
$ mkdir mmb
$ cd mmb
$ cmake -Dwith-nest=${NEST_INSTALL_DIR}/bin/nest-config ../My2Module
$ make

**********************
***ERROR MSG***
make: *** No targets specified and no makefile found. Stop.
*********************
*********************

*** changed directory from ./mmb to ./My2Module then re-ran make*****

$ cd ~ examples/My2Module
$ make

***************'*******
***ERROR MSG****
Scanning dependencies of target my2module_module
[ 10%] Building CXX object CMakeFiles/my2module_module.dir/my2module.cpp.o
In file included from /home/nest/examples/My2Module/my2module.cpp:29:0:
/home/nest/examples/My2Module/drop_odd_spike_connection.h:27:10: fatal error: connection.h: No such file or directory #include "connection.h"
**********************
*********************


On Wed, May 6, 2020 at 2:33 AM Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no> wrote:

Hi Allen,

Several steps are required to add a model to NEST. The recommended way of adding a model is to create your own NEST module outside the NEST source code tree. You will find an example in examples/MyModule and more documentation at https://nest.github.io/nest-simulator/extension_modules.

Placing code for custom models in the models directory in the NEST source code tree also works, but makes it more difficult to move to newer versions of NEST or to share your custom models with colleagues.

Briefly, in addition to adding the source code files to the models directory, you need to

1. add the files to models/CMakeLists.txt
2. #include the files in models/modelsmodule.cpp
3. add a line like

  register_connection_model< StaticConnection >( "static_synapse" );

    for each model. The template parameter is the model class, the string the name it will have in NEST
4. recompile and reinstall NEST

Best,
Hans Ekkehard



On 6 May 2020, at 02:11, Allen Rabayda <arabayda@masonlive.gmu.edu> wrote:

Dear Nest Community,

  Would anyone have insight into why I'm getting an UnknownModelName error?

  I'm new to Nest and am using Nest 18.0 on Lubuntu Virtual Box (Windows 10 OS).

  Thanks for any help. 

Best Regards,
--Allen

**** Error Message--additional details attached ******
raise exceptionCls(commandname, message)
nest.ll_api.UnknownModelName: ('UnknownModelName in CopyModel_l_l_D: /stdp_izh_bitwise_correct_connection is not a known model name. Please check the modeldict for a list of available models.', 'UnknownModelName', <SLILiteral: CopyModel_l_l_D>, ': /stdp_izh_bitwise_correct_connection is not a known model name. Please check the modeldict for a list of available models.')
********************************************************
<issue_UnknownModelName_4_May_2020>_______________________________________________
NEST Users mailing list -- users@nest-simulator.org
To unsubscribe send an email to users-leave@nest-simulator.org

--

Prof. Dr. Hans Ekkehard Plesser
Head, Data Science Section

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

_______________________________________________
NEST Users mailing list -- users@nest-simulator.org
To unsubscribe send an email to users-leave@nest-simulator.org