fzenke / auryn

Auryn: A fast simulator for spiking neural networks with synaptic plasticity
https://fzenke.net/auryn/
GNU General Public License v3.0
98 stars 42 forks source link

Version 0.8.3 fails to compile with OpenMPI #42

Open penguinpee opened 9 months ago

penguinpee commented 9 months ago

When updating auryn for Fedora from 0.8.2m to 0.8.3, I ran into the following error compiling auryn with OpenMPI:

/home/devel/auryn/src/auryn/SyncBuffer.cpp: In member function ‘void auryn::SyncBuffer::sync()’:
/home/devel/auryn/src/auryn/SyncBuffer.cpp:308:17: error: ‘MPI’ has not been declared
  308 |                 MPI::COMM_WORLD.Abort(-1);
      |                 ^~~
/home/devel/auryn/src/auryn/SyncBuffer.cpp: At global scope:
/home/devel/auryn/src/auryn/SyncBuffer.cpp:384:5: error: no declaration matches ‘int auryn::SyncBuffer::get_overflow_count()’
  384 | int SyncBuffer::get_overflow_count()
      |     ^~~~~~~~~~

Above is from a local build using OpenMPI 4.1.5. Yet, the same happens compiling against version 5.0.1, which is currently in the development branch (rawhide).

I had no issues compiling with MPICH 4.1.2. The same setup works for both OpenMPI and MPICH compiling auryn 0.8.2m.

Bisecting higlighted commit 03da36a as introducing the issue. That's when MPI::COMM_WORLD.Abort(-1) was added to SyncBuffer.cpp. I'm none the wiser, though, since the same code does compile with MPICH and the #include statements appear to be correct.

This could be a bug in OpenMPI or in Fedora's package. But I wanted to run this by upstream first. I'm happy to provide more details on request.

fzenke commented 9 months ago

Thanks for reporting this. Could you try whether the problem persists using the development branch? We fixed this two weeks ago, but it's still in testing phase.

penguinpee commented 9 months ago

Could you try whether the problem persists using the development branch? We fixed this two weeks ago, but it's still in testing phase.

Sure. Would that be develop or dev-syncbuffer?

penguinpee commented 9 months ago

Yes, using develop branch works. I'll apply 687725a as a patch to 0.8.3.

Thanks for the quick reply!