Skip to content

Conversation

@sanjayankur31
Copy link
Member

See #165
See #216

Copy link
Contributor

@borismarin borismarin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great. I have also tested (locally) the case when nrnivmodl fails to compile (by introducing a syntax error into the mod file by hand), in which case we return 1 (maybe not the best error handling) - should our tests catch that as well?

@borismarin
Copy link
Contributor

borismarin commented Mar 20, 2023

I am also foreseeing trouble with the hardcoded path for the compiled mechs. Seems to work fine for my machine (Linux x86_64) as well as the CI virtual machine - but I do not know what neuron does nowadays for other architectures. We could try and build the path using platform.processor(), but I am not sure nrnivmodl will always agree to that. Maybe we could have someone with a fancy new Apple silicon test it?

@sanjayankur31
Copy link
Member Author

Great. I have also tested (locally) the case when nrnivmodl fails to compile (by introducing a syntax error into the mod file by hand), in which case we return 1 (maybe not the best error handling) - should our tests catch that as well?

Yeh, that'll be good to have as well---the more tests, the better!

I am also foreseeing trouble with the hardcoded path for the compiled mechs. Seems to work fine for my machine (Linux x86_64) as well as the CI virtual machine - but I do not know what neuron does nowadays for other architectures. We could try and build the path using platform.processor(), but I am not sure nrnivmodl will always agree to that. Maybe we could have someone with a fancy new Apple silicon test it?

Ah yeh. I think there are some bits in org.neuroml.export etc too that also need to be updated for this. nrnivmodl uses @host_cpu@ which is set to ${CMAKE_SYSTEM_PROCESSOR}:

https://github.com/neuronsimulator/nrn/blob/master/bin/nrnivmodl.in#L4

https://github.com/neuronsimulator/nrn/blob/master/cmake/ConfigFileSetting.cmake#L36

https://cmake.org/cmake/help/latest/variable/CMAKE_SYSTEM_PROCESSOR.html?highlight=cmake_system_processor

https://cmake.org/cmake/help/latest/variable/CMAKE_HOST_SYSTEM_PROCESSOR.html#variable:CMAKE_HOST_SYSTEM_PROCESSOR

I think platform.processor should be find to use---it's used in the platform.uname output, which we'd expect to be similar/same as uname?

I think @pgleeson did just recently get a fancy new macbook to test this out for us :P

@sanjayankur31 sanjayankur31 merged commit b39c102 into issue202 Mar 21, 2023
@sanjayankur31
Copy link
Member Author

I'll merge this and we can make more tweaks to the original PR, and continue the discussion etc. there too.

@sanjayankur31 sanjayankur31 deleted the issue202-add-tests branch March 21, 2023 07:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S: ready for review Status: ready for review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants