-
Notifications
You must be signed in to change notification settings - Fork 114
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_SHARED=OFF builds static library (for GPU support) #682
Conversation
- libnrnmech is now build as static library if NRN_ENABLE_SHARED=OFF - this is required for GPU support with OpenACC because global variables from shared library are not initialized Also related to issues mentioned in #646
This now allows to embed GPU enabled CoreNEURON into NEURON as:
cc: @iomaganaris This is still not clean but now have all information required to implement clean solution (as separate PR). |
bin/nrnivmodl.in
Outdated
@@ -172,7 +172,7 @@ fi | |||
@NRN_BINARY_SPECIAL_FALSE@ mdir='${NRNHOME}'/share/nrn/demo/release/${MODSUBDIR} | |||
@NRN_BINARY_SPECIAL_FALSE@fi | |||
@NRN_BINARY_SPECIAL_FALSE@@USING_CMAKE_FALSE@make -j 4 -f "$MAKEFILEDIR/nrnmech_makefile" "ROOT=${prefix}" "MODOBJFILES=$MODLO" "COBJFILES=$CLO" "UserLDFLAGS=$UserLDFLAGS" "UserINCFLAGS=$UserINCFLAGS" libnrnmech.la | |||
@NRN_BINARY_SPECIAL_FALSE@@USING_CMAKE_TRUE@make -j 4 -f "$MAKEFILEDIR/nrnmech_makefile" "ROOT=${prefix}" "MODOBJFILES=$MODOBJS" "COBJFILES=$COBJS" "UserLDFLAGS=$UserLDFLAGS" "UserINCFLAGS=$UserINCFLAGS" libnrnmech.la VERBOSE=1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nrnhines : was there any specific need to have libnrnmech.la
target here?
With this PR I have seen:
and also below for static library build:
Working on fix locally. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This kind of thing seems to be almost entirely experimental and one never knows a priori when a different linker or machine or style (wheel, package, etc.) will need a slightly differen tweak. I don't know whether it would ever be possible or worthwhile to (try to) eliminate certain types of library dependency.
* Enable GitLab logfile upload. * Install GCC-8 on Mac OS to fix the Azure CI
variables from shared library are not initialized
Also related to issues mentioned in #646