Skip to content
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

Simulations aborted on Mac #11

Closed
axiezai opened this issue Sep 20, 2018 · 11 comments
Closed

Simulations aborted on Mac #11

axiezai opened this issue Sep 20, 2018 · 11 comments
Labels
question Further information is requested

Comments

@axiezai
Copy link

axiezai commented Sep 20, 2018

Hello,

I just did a fresh install of HNN on a macOS High Sierra.

When I tried to run the Simulating Rhythmic Proximal Inputs: Alpha Only tutorial, the simulation instantly aborts and the terminal gives off the following message:

Starting simulation. . .

mpiexec noticed that the job aborted, but has no info as to the process
that caused that situation.

WARN: could not read simulation outputs: dict_values(['/Users/ashish/hnn/data/default/dpl.txt', '/Users/ashish/hnn/data/default/rawspec.npz', '/Users/ashish/hnn/data/default/spk.txt', '/Users/ashish/hnn/data/default/param.txt'])

Not really informative as the error message doesn't know what exactly caused the simulation to abort. Please let me know if you need any other info to solve this. Thank you!

@samnemo
Copy link
Member

samnemo commented Sep 20, 2018 via email

@ramcdougal
Copy link
Collaborator

Do any of the tutorials work?

If not, does NEURON load successfully?

e.g. if you do

cd ~/hnn
python

and then in python try "import neuron", does it succeed or fail?

If it fails, try:

cd ~/hnn
rm -fr x86_64
nrnivmodl mod/

and then see if the previous test now succeeds or fails.

@ramcdougal
Copy link
Collaborator

One other thing to check:

Does typing "python" load Python 2 or Python 3? (It should say in the banner.)

@axiezai
Copy link
Author

axiezai commented Sep 20, 2018

After some digging, it seems that the newer versions of MacOS doesn't include openMPI, which is required to run HNN simulations I assume? After installing I am now seeing the following:

Starting simulation. . .
*** An error occurred in MPI_Init_thread
*** on a NULL communicator
*** MPI_ERRORS_ARE_FATAL (processes in this communicator will now abort,
*** and potentially your MPI job)
[iMac-Pro.radiology.ucsf.edu:44424] Local abort before MPI_INIT completed completed successfully, but am not able to aggregate error messages, and not able to guarantee that all other processes were killed!
[iMac-Pro.radiology.ucsf.edu:44424] OPAL ERROR: Not initialized in file pmix2x_client.c at line 109
[iMac-Pro.radiology.ucsf.edu:44425] OPAL ERROR: Not initialized in file pmix2x_client.c at line 109

does this help?

@axiezai
Copy link
Author

axiezai commented Sep 20, 2018

hi @ramcdougal
"import neuron" works

Python version is 3.6.5

@ramcdougal
Copy link
Collaborator

Just to confirm: Are you using Anaconda Python?

I would have expected doing the conda install of mpi4py to install openmpi, but you can try removing the openmpi you installed and explicitly doing the conda install of openmpi:

sudo conda install -c mpi4py openmpi 

(sudo is assuming you've installed for all users; if it's a local install, do not use "sudo").

@axiezai
Copy link
Author

axiezai commented Sep 21, 2018

I did the conda install for mpi4py and openmpi, loaded the tutorial parameters, clicked run simulation and now i'm getting the following:

Starting simulation. . .

[iMac-Pro.radiology.ucsf.edu:46680] PMIX ERROR: UNPACK-PAST-END in file unpack.c at line 122
[iMac-Pro.radiology.ucsf.edu:46680] PMIX ERROR: SUCCESS in file event/pmix_event_registration.c at line 91
[iMac-Pro.radiology.ucsf.edu:46683] PMIX ERROR: UNPACK-PAST-END in file unpack.c at line 122

[iMac-Pro.radiology.ucsf.edu:46683] PMIX ERROR: UNPACK-PAST-END in file unpack.c at line 122
[iMac-Pro.radiology.ucsf.edu:46683] PMIX ERROR: SUCCESS in file event/pmix_event_registration.c at line 91
[iMac-Pro.radiology.ucsf.edu:46684] PMIX ERROR: UNPACK-PAST-END in file unpack.c at line 122
[iMac-Pro.radiology.ucsf.edu:46684] PMIX ERROR: SUCCESS in file event/pmix_event_registration.c at line 91
[iMac-Pro.radiology.ucsf.edu:46685] PMIX ERROR: UNPACK-PAST-END in file unpack.c at line 122

[iMac-Pro.radiology.ucsf.edu:46685] PMIX ERROR: UNPACK-PAST-END in file unpack.c at line 122
[iMac-Pro.radiology.ucsf.edu:46685] PMIX ERROR: SUCCESS in file event/pmix_event_registration.c at line 91
[iMac-Pro.radiology.ucsf.edu:46688] PMIX ERROR: UNPACK-PAST-END in file unpack.c at line 122

[iMac-Pro.radiology.ucsf.edu:46688] PMIX ERROR: UNPACK-PAST-END in file unpack.c at line 122
[iMac-Pro.radiology.ucsf.edu:46688] PMIX ERROR: SUCCESS in file event/pmix_event_registration.c at line 91
[iMac-Pro.radiology.ucsf.edu:46689] PMIX ERROR: UNPACK-PAST-END in file unpack.c at line 122
[iMac-Pro.radiology.ucsf.edu:46689] PMIX ERROR: SUCCESS in file event/pmix_event_registration.c at line 91
[iMac-Pro.radiology.ucsf.edu:46690] PMIX ERROR: UNPACK-PAST-END in file unpack.c at line 122

[iMac-Pro.radiology.ucsf.edu:46690] PMIX ERROR: UNPACK-PAST-END in file unpack.c at line 122
[iMac-Pro.radiology.ucsf.edu:46690] PMIX ERROR: SUCCESS in file event/pmix_event_registration.c at line 91
[iMac-Pro.radiology.ucsf.edu:46691] PMIX ERROR: UNPACK-PAST-END in file unpack.c at line 122

[iMac-Pro.radiology.ucsf.edu:46691] PMIX ERROR: UNPACK-PAST-END in file unpack.c at line 122
[iMac-Pro.radiology.ucsf.edu:46691] PMIX ERROR: SUCCESS in file event/pmix_event_registration.c at line 91
[iMac-Pro.radiology.ucsf.edu:46692] PMIX ERROR: UNPACK-PAST-END in file unpack.c at line 122
[iMac-Pro.radiology.ucsf.edu:46692] PMIX ERROR: SUCCESS in file event/pmix_event_registration.c at line 91
[iMac-Pro.radiology.ucsf.edu:46681] PMIX ERROR: SUCCESS in file event/pmix_event_registration.c at line 91
[iMac-Pro.radiology.ucsf.edu:46682] PMIX ERROR: SUCCESS in file event/pmix_event_registration.c at line 91
[iMac-Pro.radiology.ucsf.edu:46686] PMIX ERROR: UNPACK-PAST-END in file unpack.c at line 122
[iMac-Pro.radiology.ucsf.edu:46686] PMIX ERROR: SUCCESS in file event/pmix_event_registration.c at line 91
[iMac-Pro.radiology.ucsf.edu:46687] PMIX ERROR: SUCCESS in file event/pmix_event_registration.c at line 91
[iMac-Pro.radiology.ucsf.edu:46693] PMIX ERROR: SUCCESS in file event/pmix_event_registration.c at line 91
[iMac-Pro.radiology.ucsf.edu:46694] PMIX ERROR: SUCCESS in file event/pmix_event_registration.c at line 91
[iMac-Pro.radiology.ucsf.edu:46695] PMIX ERROR: SUCCESS in file event/pmix_event_registration.c at line 91
[iMac-Pro.radiology.ucsf.edu:46684] PMIX ERROR: SUCCESS in file event/pmix_event_registration.c at line 91
[iMac-Pro.radiology.ucsf.edu:46686] PMIX ERROR: SUCCESS in file event/pmix_event_registration.c at line 91
[iMac-Pro.radiology.ucsf.edu:46688] PMIX ERROR: SUCCESS in file event/pmix_event_registration.c at line 91
[iMac-Pro.radiology.ucsf.edu:46687] PMIX ERROR: SUCCESS in file event/pmix_event_registration.c at line 91
[iMac-Pro.radiology.ucsf.edu:46691] PMIX ERROR: SUCCESS in file event/pmix_event_registration.c at line 91
WARN: could not read simulation outputs: dict_values(['/Users/ashish/hnn/data/OnlyRhythmicProx/dpl.txt', '/Users/ashish/hnn/data/OnlyRhythmicProx/rawspec.npz', '/Users/ashish/hnn/data/OnlyRhythmicProx/spk.txt', '/Users/ashish/hnn/data/OnlyRhythmicProx/param.txt'])

@nrnhines
Copy link
Collaborator

nrnhines commented Sep 24, 2018

To help diagnose. results of the following tests may be useful. Run tests in a terminal.

  1. Does mpi work?
    <
    $ mpiexec -n 2 echo "hello"
    hello
    hello
  1. does nrniv work without mpi and python
    <
    nrniv -nobanner -nopython -c '{print "hello" quit()}'
    hello
  1. do nrniv and mpi work together but without python
    <
    $ mpiexec -n 2 nrniv -nobanner -nopython -mpi -c '{print "hello" quit()}'
    numprocs=2
    hello
    hello
  1. can you launch nrniv and use python
    <
    $ nrniv -nobanner -python -c 'from neuron import h; print("Hello"); h.quit()'
    Hello
  1. do all three work when launching nrniv
    <
    $ mpiexec -n 2 nrniv -nobanner -mpi -python -c 'from neuron import h; pc = h.ParallelContext(); print ("I am %d of %d" % (int(pc.id()), int(pc.nhost()))); h.quit()'
    numprocs=2
    I am 0 of 2
    I am 1 of 2

@samnemo samnemo added bug Something isn't working question Further information is requested and removed bug Something isn't working labels Nov 15, 2018
@vogdb
Copy link

vogdb commented Nov 21, 2018

@axiezai

I've recently installed HNN. I had the same problem as you. Additionally if you look View->View Simulation Log, you might see a more detailed message. In my case it was
screen shot 2018-11-21 at 19 15 34

Try loading openmpi
load_mpi: dlopen(libmpi.dylib, 10): image not found
Is openmpi installed? If not in default location, need a LD_LIBRARY_PATH.
could not dynamically load libmpi.so or libmpich2.so

To solve it I pointed LD_LIBRARY_PATH to the dir containing libmpi.dylib. I had a separate conda's env hnn for HNN, so I added the below line to my ~/.profile(don't forget to log out) and everything started working.

export LD_LIBRARY_PATH=~/anaconda2/envs/hnn/lib/

You also can use Mac's search utilities to find your libmpi.dylib location.

@blakecaldwell
Copy link
Member

@vogdb thanks for the instructions above.

This error can come about in at least a couple of ways. Even if LD_LIBRARY_PATH is set to where libmpi.dylib exists, the error may not be resolved if libmpi.10.dylib does not exist. I needed to create a link:

cd $CONDA_PREFIX/lib
ln -s libmpi.1.dylib libmpi.10.dylib

I don't know where the 10 comes from. Perhaps @ramcdougal has some insight from the NEURON macOS installer?

@axiezai
Copy link
Author

axiezai commented Apr 13, 2019

I'm glad @vogdb and @blakecaldwell provided some easy solutions!

To be honest, I don't have access to the Mac machine I did this install on anymore, it wasn't my Mac :(

So I can't provide more info on my end, apologies. If we can confirm thatextra 10 in libmpi.10.dylib isn't an issue, perhaps we can close this?

Thanks again for all the help and debugging! Really grateful :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

6 participants