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

aligned_alloc may not be supported: error: 'aligned_alloc' is not a member of 'std'; did you mean 'aligned_union'? #558

Open
barracuda156 opened this issue Nov 17, 2024 · 1 comment · May be fixed by #559
Assignees

Comments

@barracuda156
Copy link

In file included from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_science_madness/madness/work/madness-67ea7b5b533583ba7e0989cff91df738fda8b85b/src/madness/world/MADworld.h:46,
                 from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_science_madness/madness/work/madness-67ea7b5b533583ba7e0989cff91df738fda8b85b/src/madness/tensor/elem.h:36,
                 from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_science_madness/madness/work/madness-67ea7b5b533583ba7e0989cff91df738fda8b85b/src/madness/tensor/tensor_lapack.h:212,
                 from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_science_madness/madness/work/madness-67ea7b5b533583ba7e0989cff91df738fda8b85b/src/madness/tensor/lapack.cc:55:
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_science_madness/madness/work/madness-67ea7b5b533583ba7e0989cff91df738fda8b85b/src/madness/world/worldgop.h: In member function 'std::vector<T> madness::WorldGopInterface::concat0(const std::vector<T>&, size_t)':
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_science_madness/madness/work/madness-67ea7b5b533583ba7e0989cff91df738fda8b85b/src/madness/world/worldgop.h:971:38: error: 'aligned_alloc' is not a member of 'std'; did you mean 'aligned_union'?
  971 |                                 std::aligned_alloc(sizeof(void *), bufsz)),
      |                                      ^~~~~~~~~~~~~
      |                                      aligned_union
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_science_madness/madness/work/madness-67ea7b5b533583ba7e0989cff91df738fda8b85b/src/madness/world/worldgop.h:974:38: error: 'aligned_alloc' is not a member of 'std'; did you mean 'aligned_union'?
  974 |                                 std::aligned_alloc(sizeof(void *), bufsz)),
      |                                      ^~~~~~~~~~~~~
      |                                      aligned_union
In file included from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_science_madness/madness/work/madness-67ea7b5b533583ba7e0989cff91df738fda8b85b/src/madness/world/MADworld.h:47:
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_science_madness/madness/work/madness-67ea7b5b533583ba7e0989cff91df738fda8b85b/src/madness/world/worlddc.h: In static member function 'static void madness::archive::ArchiveStoreImpl<madness::archive::ParallelOutputArchive<madness::archive::VectorOutputArchive>, madness::WorldContainer<keyT, valueT> >::store(const madness::archive::ParallelOutputArchive<madness::archive::VectorOutputArchive>&, const madness::WorldContainer<keyT, valueT>&)':
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_science_madness/madness/work/madness-67ea7b5b533583ba7e0989cff91df738fda8b85b/src/madness/world/worlddc.h:1912:17: warning: there are no arguments to 'MPI_Gather' that depend on a template parameter, so a declaration of 'MPI_Gather' must be available [-fpermissive]
 1912 |                 MPI_Gather(&size, 1, MPI_INT, sizes.data(), 1, MPI_INT, 0, world->mpi.comm().Get_mpi_comm());
      |                 ^~~~~~~~~~
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_science_madness/madness/work/madness-67ea7b5b533583ba7e0989cff91df738fda8b85b/src/madness/world/worlddc.h:1932:17: warning: there are no arguments to 'MPI_Gatherv' that depend on a template parameter, so a declaration of 'MPI_Gatherv' must be available [-fpermissive]
 1932 |                 MPI_Gatherv(buf, local_size, MPI_BYTE, all_data, sizes.data(), offsets.data(), MPI_BYTE, 0, world->mpi.comm().Get_mpi_comm());
      |                 ^~~~~~~~~~~
make[2]: *** [src/madness/tensor/CMakeFiles/MADlinalg-obj.dir/lapack.cc.o] Error 1
make[2]: *** Waiting for unfinished jobs....

The code should check for availability of aligned_alloc and fall back to posix_memalign or malloc.

@barracuda156
Copy link
Author

Breakage apparently introduced by c7e2673 where in that spot the check for HAVE_POSIX_MEMALIGN was forgotten.

@EricaCMitchell @evaleev FYI

@EricaCMitchell EricaCMitchell self-assigned this Nov 18, 2024
@EricaCMitchell EricaCMitchell linked a pull request Nov 18, 2024 that will close this issue
@EricaCMitchell EricaCMitchell linked a pull request Nov 18, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants