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

Segmentation fault when running an MPI job on MacOS Monterey with the M1 chip #105

Open
ktbolt opened this issue Jun 14, 2022 · 0 comments
Assignees
Labels

Comments

@ktbolt
Copy link
Contributor

ktbolt commented Jun 14, 2022

I have successfully built svSolver on MacOS Monterey / M1 chip using OpenMPI and a local VTK install.

I can run simulations fine on a single processor but when I try to run using multiple processors I get a Segmentation fault in Metis

Signal: Segmentation fault: 11 (11)
Signal code: Invalid permissions (2)
Failing at address: 0x19
[ 0] 0   libsystem_platform.dylib            0x00000001bb9684e4 _sigtramp + 56
[ 1] 0   ???                                 0xffff800100d9657c 0x0 + 18446603340530410876
[ 2] 0   svsolver                            0x0000000100d91bb8 __GrowBisection + 976
[ 3] 0   svsolver                            0x0000000100d9175c __Init2WayPartition + 140
[ 4] 0   svsolver                            0x0000000100d946a4 __MlevelRecursiveBisection + 208
[ 5] 0   svsolver                            0x0000000100d94514 METIS_WPartGraphRecursive + 520
[ 6] 0   svsolver                            0x0000000100d9a3a4 __MlevelKWayPartitioning + 248
[ 7] 0   svsolver                            0x0000000100d9a210 METIS_WPartGraphKway + 456
[ 8] 0   svsolver                            0x0000000100d9a024 METIS_PartGraphKway + 244
[ 9] 0   svsolver                            0x0000000100d19580 _Z17Partition_ProblemiPcS_ + 2380
[10] 0   svsolver                            0x0000000100d2604c main + 1160

It seems that the problem occurs in the function void GKfree(void **ptr1, ...) that frees memory using a variable argument list. The seg fault occurs when processing arguments

  while ((ptr = va_arg(plist, void **)) != LTERM) {
    if (*ptr != NULL) {
      free(*ptr);
    }
   *ptr = NULL;
  }

The first call to va_arg(plist, void **) returns a bad memory address.

If I modify GKfree() to just return then the simulation runs fine.

@ktbolt ktbolt added the bug label Jun 14, 2022
@ktbolt ktbolt self-assigned this Jun 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant