-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NRN_ENABLE_MUSIC on wheels #2091
Comments
On a Mac with MUSIC installed
The last command fails
Note:
Is there a way to launch |
Presently with the linked build I see:
which make sense since music was not launched as the driver. But with the dynamic build I see:
|
Now getting same result for
But dynamic version for
|
The problem with
This also explains why the -nobanner arg had no effect in test3.music. |
I can temporarily work around the problem by checking for a "music" arg as well as a "-music" arg. |
@nrnhines The proper way to handle it would be to simply always create the MUSIC Setup object when NEURON is compiled with MUSIC. There's a method setup->launchedByMusic () which returns a boolean which can be used to check if this is a MUSIC-controlled simulation if that is needed. Note that the Setup object constructor is equivalent to MPI_Init. This is a consequence of the MPI standard where an application can't really make any assumptions regarding argc and argv before having called MPI_Init. I'm open to discussion if you think this is a bad idea and have alternative solutions. |
@mdjurfeldt Thanks. I remember when I started with MPI that I wracked by brains for a long time trying to figure out how nrniv could know if it had been launched by mpirun (and therefore could call MPI_Init (or MPI_Initialized()?). Hence the invention of the
I was unaware of that aspect of the MPI standard and am confused then about how python can know its Anyway, the issue for dynamic loading boils down to when is the best time to dynamically load libmpi and the corresponding neuron mpi interface wrapper libnrnmpi_ompi as well as dynamically load libmusic and its corresponding neuron music interface wrapper libnrnmusic_ompi. |
I think the dynamic loading of music is now basically sound. All the nrnmusic components have been factored into nrn/src/neuronmusic. CMakeLists.txt, setup.py.in are kind of a mess and can be cleaned up. nrnmusic_dynam.cpp needs to be made robust with respect to the path to libmusic and OS . Right now for my experiments I have it hardcoded with
One possibility is to use the last resort strategy used by nrnmpi which checks the environment variable
@mdjurfeldt is there some equivalent already to hand if music is installed? edit: what I left out above, but is done for mpi, is that the full path to libmusic must be dlopen'd first and then examined to determine what mpi it used and then dlopen the compatible version of libnrnmusic_xxxx. |
@nrnhines With regard to library path, I have no other suggestions than 1) rely on the standard system locations (as setup by ldconfig/LD_LIBRARY_PATH and available via dlopen) or 2) giving the possibility to specify through a cmake option where to look for MUSIC. With regard to how Python can see "-c" I find that very interesting and will try to examine it and return to you. |
Won't work because music may be installed in a different path on the user machine than music was installed on the build machine. |
I'd appreciate a fuller understanding. I'm thinking that as a practical matter, |
@mdjurfeldt An issue has come up with regard to MUSIC having a GPL licence. This means we can't support a MUSIC enabled wheel version of NEURON. I wonder if just those few files that we need could be changed to a BSD licence. Or perhaps a minimal API file with only those items we reference could be a separate BSD file. |
@nrnhines I'm sure this is solvable, but first: Could you please say a few words about the reason for this. I thought that BSD and GPL were "compatible". |
I'm the wrong person to ask. And perhaps an explanation link is in order. But I believe GPL is more restrictive and "infects" all the package of which it is a part to also elevate the entire package licence to GPL. |
https://en.wikipedia.org/wiki/License_compatibility#:~:text=Many%20of%20the%20most%20common,LGPL%2C%20are%20GPL%2Dcompatible. at least for a sense of the complications |
@mdjurfeldt it is my understanding that using GPL code in NEURON means that NEURON must also become GPL. What are your requirements for having a GPL license? A couple of solutions:
|
@nrnhines @alexsavulescu I have previously considered shifting to LGPL. I'll prepare a new release (which also contains an important bugfix for the Python interface build system) and tell you. This can happen during the weekend at the earliest since I'm traveling. |
👍
Just a random guess - in case you are at the HBP summit, our team members @iomaganaris and @jamesgking are there as well. In case you get a chance to say hello to each other :) |
@pramodk Thanks, yes I am. I'll keep my eyes open. :) |
@alexsavulescu Hi, I've discovered a problem. MUSIC parses its configuration files using code based on rudeconfig, which is GPL. So, I'll need to replace the configuration file parser in order to be able to release MUSIC under LGPL. This can be done, but I also have other urgent business to take care of during the coming couple of weeks. How urgent is it for you to get this fixed? Is there some deadline which we should meet? |
@mdjurfeldt I see, thanks for the heads-up. There is no deadline and we can adjust accordingly, but do note that more work is required in order to have MUSIC enabled wheels. Please see #2096 (comment) |
This is intended for implementation discussion toward a neuron wheel which works in the absence of a MUSIC installation but is then able to use MUSIC after it is installed. Presently MUSIC + NEURON works with build time linking ( PR #1896 relating to issue #1894 ).
See PR #2092
The text was updated successfully, but these errors were encountered: