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

Unable to run tests on FreeBSD #1331

Open
yurivict opened this issue Jun 20, 2022 · 11 comments
Open

Unable to run tests on FreeBSD #1331

yurivict opened this issue Jun 20, 2022 · 11 comments
Labels
bug preCICE does not behave the way we want and we should look into it (and fix it if possible) good first issue Everybody is invited to help: students, users, externals, ... help wanted I have opened this issue and/or I am assigned to it, but I don't know how to solve it
Milestone

Comments

@yurivict
Copy link

It tries to use an empty string as network name.
MPI isn't setup on this machine. In such case it should run only on this machine and use 127.0.0.1 (?).

Test log:

Running tests...
/usr/local/bin/ctest --force-new-ctest-process 
Test project /disk-samsung/freebsd-ports/science/precice/work/.build
      Start  1: precice.acceleration
 1/35 Test  #1: precice.acceleration .................***Timeout  20.05 sec
[2022-06-20 09:16:42.879669] [0x0000000806412000] [debug]   Initialize MPI
[2022-06-20 09:16:42.884730] [0x0000000806412000] [debug]   Initialize MPI
[2022-06-20 09:16:42.886354] [0x0000000806412000] [debug]   Initialize MPI
[2022-06-20 09:16:42.893663] [0x0000000806412000] [debug]   Initialize MPI
This test suite runs on rank 0 of 4
This test suite runs on rank 3 of 4
Running 15 test cases...
Setup up logging
Running 15 test cases...
Setup up logging
This test suite runs on rank 1 of 4
This test suite runs on rank 2 of 4
Running 15 test cases...
Setup up logging
Running 15 test cases...
Setup up logging
unknown location(0): fatal error: in "AccelerationTests/AccelerationIntraCommTests/testVIQNIMVJpp": memory access violation at address: 0x00000000: no mapping at fault address
/disk-samsung/freebsd-ports/science/precice/work/precice-2.4.0/src/acceleration/test/AccelerationIntraCommTest.cpp(261): last checkpointunknown location(0): : "testVIQNIMVJpp" test entry
Failure occurred in a following context:
    Test context is unnamed and runs on rank 0 out of 4. Initialized: { IntraComm Communication }fatal error: in "AccelerationTests/AccelerationIntraCommTests/testVIQNIMVJpp": memory access violation at address: 0x00000004: no mapping at fault address

/disk-samsung/freebsd-ports/science/precice/work/precice-2.4.0/src/acceleration/test/AccelerationIntraCommTest.cpp(261): last checkpoint: "testVIQNIMVJpp" test entry
Failure occurred in a following context:
    Test context is unnamed and runs on rank 1 out of 4. Initialized: { IntraComm Communication }

*** 1 failure is detected in the test module "preCICE Tests"

*** 1 failure is detected in the test module "preCICE Tests"

      Start  2: precice.action
 2/35 Test  #2: precice.action .......................   Passed    0.14 sec
      Start  3: precice.com
 3/35 Test  #3: precice.com ..........................***Failed    0.12 sec
[2022-06-20 09:17:03.060327] [0x0000000806412000] [debug]   Initialize MPI
[2022-06-20 09:17:03.060327] [0x0000000806412000] [debug]   Initialize MPI
[2022-06-20 09:17:03.074173] [0x0000000806412000] [debug]   Initialize MPI
[2022-06-20 09:17:03.074173] [0x0000000806412000] [debug]   Initialize MPI
This test suite runs on rank 0 of 4
This test suite runs on rank 3 of 4
Running 15 test cases...
Setup up logging
Running 15 test cases...
Setup up logging
This test suite runs on rank 1 of 4
This test suite runs on rank 2 of 4
Running 15 test cases...
Running 15 test cases...
Setup up logging
Setup up logging
09:17:03.107507||0|com::SocketCommunication|l925|getIpAddress|ERROR: Cannot find network interface "". Available interfaces are: msk0 msk1 lo0  Please check "network" attributes in your configuration file.

      Start  4: precice.com.mpiports
 4/35 Test  #4: precice.com.mpiports .................***Timeout  20.06 sec
[2022-06-20 09:17:03.186437] [0x0000000806412000] [debug]   Initialize MPI
[2022-06-20 09:17:03.186818] [0x0000000806412000] [debug]   Initialize MPI
[2022-06-20 09:17:03.188573] [0x0000000806412000] [debug]   Initialize MPI
[2022-06-20 09:17:03.191323] [0x0000000806412000] [debug]   Initialize MPI
This test suite runs on rank 3 of 4
This test suite runs on rank 1 of 4
Running 12 test casesRunning 12 test cases...
...
Setup up logging
Setup up logging
This test suite runs on rank 2 of 4
This test suite runs on rank 0 of 4
Running 12 test cases...
Setup up logging
Running 12 test cases...
Setup up logging
unknown location(0): fatal error: in "CommunicationTests/MPIPorts/SendAndReceiveMM": memory access violation at address: 0x00000000: no mapping at fault address
/disk-samsung/freebsd-ports/science/precice/work/precice-2.4.0/src/com/tests/MPIPortsCommunicationTest.cpp(18): last checkpoint: "SendAndReceiveMM" test entry
Failure occurred in a following context:
    Test context represents "A" and runs on rank 0 out of 1. Initialized: { Events}

*** 1 failure is detected in the test module "preCICE Tests"

      Start  5: precice.cplscheme
 5/35 Test  #5: precice.cplscheme ....................***Failed    0.44 sec
[2022-06-20 09:17:23.243184] [0x0000000806412000] [debug]   Initialize MPI
[2022-06-20 09:17:23.245134] [0x0000000806412000] [debug]   Initialize MPI
[2022-06-20 09:17:23.245181] [0x0000000806412000] [debug]   Initialize MPI
[2022-06-20 09:17:23.250896] [0x0000000806412000] [debug]   Initialize MPI
This test suite runs on rank 3 of 4
This test suite runs on rank 1 of 4
This test suite runs on rank 0 of 4
This test suite runs on rank 2 of 4
Running Running 47 test cases...
47 test cases...
Setup up logging
Setup up logging
Running 47 test cases...
Setup up logging
Running 47 test cases...
Setup up logging
09:17:23.599882||2|com::SocketCommunication|l925|getIpAddress|ERROR: Cannot find network interface "". Available interfaces are: msk0 msk1 lo0  Please check "network" attributes in your configuration file.

      Start  6: precice.io
 6/35 Test  #6: precice.io ...........................   Passed    0.21 sec
      Start  7: precice.m2n
 7/35 Test  #7: precice.m2n ..........................***Failed    0.15 sec
[2022-06-20 09:17:23.889569] [0x0000000806412000] [debug]   Initialize MPI
[2022-06-20 09:17:23.890816] [0x0000000806412000] [debug]   Initialize MPI
[2022-06-20 09:17:23.894165] [0x0000000806412000] [debug]   Initialize MPI
[2022-06-20 09:17:23.902249] [0x0000000806412000] [debug]   Initialize MPI
This test suite runs on rank 3 of 4
This test suite runs on rank 0 of 4
This test suite runs on rank 2 of 4
This test suite runs on rank 1 of 4
Running 8 test cases...
Setup up logging
Running 8 test cases...
Running 8 test cases...
Setup up logging
Setup up logging
Running 8 test cases...
Setup up logging
09:17:23.959531||0|com::SocketCommunication|l925|getIpAddress|ERROR: Cannot find network interface "". Available interfaces are: msk0 msk1 lo0  Please check "network" attributes in your configuration file.

      Start  8: precice.m2n.mpiports
 8/35 Test  #8: precice.m2n.mpiports .................***Timeout  20.05 sec
[2022-06-20 09:17:24.040555] [0x0000000806412000] [debug]   Initialize MPI
[2022-06-20 09:17:24.044443] [0x0000000806412000] [debug]   Initialize MPI
[2022-06-20 09:17:24.049515] [0x0000000806412000] [debug]   Initialize MPI
[2022-06-20 09:17:24.052190] [0x0000000806412000] [debug]   Initialize MPI
This test suite runs on rank 3 of 4
This test suite runs on rank 1 of 4
Running 5 test cases...
Setup up logging
Running 5 test cases...
Setup up logging
This test suite runs on rank This test suite runs on rank 0 of 4
2 of 4
Running Running 5 test cases...
5 test cases...
Setup up logging
Setup up logging
unknown location(0): fatal error: in "M2NTests/MPIPorts/P2PComTest1": memory access violation at address: 0x00000000: no mapping at fault address
/disk-samsung/freebsd-ports/science/precice/work/precice-2.4.0/src/m2n/tests/PointToPointCommunicationTest.cpp(48): last checkpoint
Failure occurred in a following context:
    Test context represents "A" and runs on rank 0 out of 2. Initialized: { IntraComm Communication  Events}

*** 1 failure is detected in the test module "preCICE Tests"

      Start  9: precice.mapping
 9/35 Test  #9: precice.mapping ......................   Passed    0.33 sec
      Start 10: precice.mapping.petrbf
10/35 Test #10: precice.mapping.petrbf ...............   Passed    5.94 sec
      Start 11: precice.math
11/35 Test #11: precice.math .........................   Passed    0.15 sec
      Start 12: precice.mesh
12/35 Test #12: precice.mesh .........................   Passed    0.15 sec
      Start 13: precice.partition
13/35 Test #13: precice.partition ....................***Failed    0.15 sec
[2022-06-20 09:17:50.661641] [0x0000000806412000] [debug]   Initialize MPI
[2022-06-20 09:17:50.666318] [0x0000000806412000] [debug]   Initialize MPI
[2022-06-20 09:17:50.666340] [0x0000000806412000] [debug]   Initialize MPI
[2022-06-20 09:17:50.670092] [0x0000000806412000] [debug]   Initialize MPI
This test suite runs on rank 1 of 4
This test suite runs on rank 0 of 4
Running 24 test cases...
Running 24 test cases...
Setup up logging
Setup up logging
This test suite runs on rank This test suite runs on rank 2 of 4
3 of 4
Running Running 24 test cases...
24 test cases...
Setup up logging
Setup up logging
09:17:50.733635||0|com::SocketCommunication|l925|getIpAddress|ERROR: Cannot find network interface "". Available interfaces are: msk0 msk1 lo0  Please check "network" attributes in your configuration file.

      Start 14: precice.interface
14/35 Test #14: precice.interface ....................   Passed    0.36 sec
      Start 15: precice.query
15/35 Test #15: precice.query ........................   Passed    0.16 sec
      Start 16: precice.testing
16/35 Test #16: precice.testing ......................***Failed    0.13 sec
[2022-06-20 09:17:51.329538] [0x0000000806412000] [debug]   Initialize MPI
[2022-06-20 09:17:51.333049] [0x0000000806412000] [debug]   Initialize MPI
[2022-06-20 09:17:51.333061] [0x0000000806412000] [debug]   Initialize MPI
[2022-06-20 09:17:51.336089] [0x0000000806412000] [debug]   Initialize MPI
This test suite runs on rank This test suite runs on rank 0 of 4
3 of 4
Running 9Running 9 test cases...
 test cases...
Setup up logging
Setup up logging
This test suite runs on rank This test suite runs on rank 1 of 4
2 of 4
Running 9 test cases...
Setup up logging
Running 9 test cases...
Setup up logging
09:17:51.378157||0|com::SocketCommunication|l925|getIpAddress|ERROR: Cannot find network interface "". Available interfaces are: msk0 msk1 lo0  Please check "network" attributes in your configuration file.

      Start 17: precice.utils
17/35 Test #17: precice.utils ........................   Passed    0.15 sec
      Start 18: precice.xml
18/35 Test #18: precice.xml ..........................   Passed    0.23 sec
      Start 19: precice.integration.Parallel
19/35 Test #19: precice.integration.Parallel .........***Timeout 120.04 sec
[2022-06-20 09:17:51.838122] [0x0000000806412000] [debug]   Initialize MPI
[2022-06-20 09:17:51.838122] [0x0000000806412000] [debug]   Initialize MPI
[2022-06-20 09:17:51.838154] [0x0000000806412000] [debug]   Initialize MPI
[2022-06-20 09:17:51.842627] [0x0000000806412000] [debug]   Initialize MPI
This test suite runs on rank 1 of 4
This test suite runs on rank This test suite runs on rank 0 of 4
3 of 4
This test suite runs on rank 2 of 4
Running 38 test cases...
Running Running 38 test cases...
38 test cases...
Setup up logging
Setup up logging
Setup up logging
Running 38 test cases...
Setup up logging
09:17:51.933091|Ateles|0|com::SocketCommunication|l925|getIpAddress|ERROR: Cannot find network interface "". Available interfaces are: msk0 msk1 lo0  Please check "network" attributes in your configuration file.

      Start 20: precice.integration.Serial
20/35 Test #20: precice.integration.Serial ...........***Failed    0.16 sec
[2022-06-20 09:19:51.875859] [0x0000000806412000] [debug]   Initialize MPI
[2022-06-20 09:19:51.878195] [0x0000000806412000] [debug]   Initialize MPI
[2022-06-20 09:19:51.880905] [0x0000000806412000] [debug]   Initialize MPI
[2022-06-20 09:19:51.881101] [0x0000000806412000] [debug]   Initialize MPI
This test suite runs on rank This test suite runs on rank 2 of 4
3 of 4
This test suite runs on rank 0 of 4
This test suite runs on rank 1 of 4
Running 83 test cases...
Running 83 test cases...
Setup up logging
Setup up logging
Running 83 test cases...
Setup up logging
Running 83 test cases...
Setup up logging
09:19:51.961190|A|0|com::SocketCommunication|l925|getIpAddress|ERROR: Cannot find network interface "". Available interfaces are: msk0 msk1 lo0  Please check "network" attributes in your configuration file.

      Start 21: precice.solverdummy.build.cpp
21/35 Test #21: precice.solverdummy.build.cpp ........   Passed    2.73 sec
      Start 22: precice.solverdummy.build.c
22/35 Test #22: precice.solverdummy.build.c ..........   Passed    1.12 sec
      Start 23: precice.solverdummy.run.cpp-cpp
23/35 Test #23: precice.solverdummy.run.cpp-cpp ......***Timeout 120.02 sec
DUMMY: Running solver dummy with preCICE config file "/disk-samsung/freebsd-ports/science/precice/work/precice-2.4.0/examples/solverdummies/precice-config.xml" and participant name "SolverTwo".
DUMMY: Running solver dummy with preCICE config file "/disk-samsung/freebsd-ports/science/precice/work/precice-2.4.0/examples/solverdummies/precice-config.xml" and participant name "SolverOne".
preCICE: This is preCICE version 2.4.0
preCICE: Revision info: 11-eol-26737-gd569b4a1687d
preCICE: Build type: Debug
preCICE: Configuring preCICE with configuration "/disk-samsung/freebsd-ports/science/precice/work/precice-2.4.0/examples/solverdummies/precice-config.xml"
preCICE: I am participant "SolverTwo"
preCICE: Setting up primary communication to coupling partner/s
preCICE:ERROR:  Cannot find network interface "". Available interfaces are: msk0 msk1 lo0  Please check "network" attributes in your configuration file.
preCICE: This is preCICE version 2.4.0
preCICE: Revision info: 11-eol-26737-gd569b4a1687d
preCICE: Build type: Debug
preCICE: Configuring preCICE with configuration "/disk-samsung/freebsd-ports/science/precice/work/precice-2.4.0/examples/solverdummies/precice-config.xml"
preCICE: I am participant "SolverOne"
preCICE: Setting up primary communication to coupling partner/s

      Start 24: precice.solverdummy.run.c-c
24/35 Test #24: precice.solverdummy.run.c-c ..........***Timeout 120.02 sec
DUMMY: Running solver dummy with preCICE config file "/disk-samsung/freebsd-ports/science/precice/work/precice-2.4.0/examples/solverdummies/precice-config.xml" and participant name "SolverTwo".
DUMMY: Running solver dummy with preCICE config file "/disk-samsung/freebsd-ports/science/precice/work/precice-2.4.0/examples/solverdummies/precice-config.xml" and participant name "SolverOne".
preCICE: This is preCICE version 2.4.0
preCICE: Revision info: 11-eol-26737-gd569b4a1687d
preCICE: Build type: Debug
preCICE: Configuring preCICE with configuration "/disk-samsung/freebsd-ports/science/precice/work/precice-2.4.0/examples/solverdummies/precice-config.xml"
preCICE: I am participant "SolverTwo"
preCICE: Setting up primary communication to coupling partner/s
preCICE:ERROR:  Cannot find network interface "". Available interfaces are: msk0 msk1 lo0  Please check "network" attributes in your configuration file.
Bus error
preCICE: This is preCICE version 2.4.0
preCICE: Revision info: 11-eol-26737-gd569b4a1687d
preCICE: Build type: Debug
preCICE: Configuring preCICE with configuration "/disk-samsung/freebsd-ports/science/precice/work/precice-2.4.0/examples/solverdummies/precice-config.xml"
preCICE: I am participant "SolverOne"
preCICE: Setting up primary communication to coupling partner/s

      Start 25: precice.solverdummy.run.cpp-c
25/35 Test #25: precice.solverdummy.run.cpp-c ........***Timeout 120.02 sec
DUMMY: Running solver dummy with preCICE config file "/disk-samsung/freebsd-ports/science/precice/work/precice-2.4.0/examples/solverdummies/precice-config.xml" and participant name "SolverOne".
DUMMY: Running solver dummy with preCICE config file "/disk-samsung/freebsd-ports/science/precice/work/precice-2.4.0/examples/solverdummies/precice-config.xml" and participant name "SolverTwo".
preCICE: This is preCICE version 2.4.0
preCICE: Revision info: 11-eol-26737-gd569b4a1687d
preCICE: Build type: Debug
preCICE: Configuring preCICE with configuration "/disk-samsung/freebsd-ports/science/precice/work/precice-2.4.0/examples/solverdummies/precice-config.xml"
preCICE: I am participant "SolverOne"
preCICE: Setting up primary communication to coupling partner/s
preCICE: This is preCICE version 2.4.0
preCICE: Revision info: 11-eol-26737-gd569b4a1687d
preCICE: Build type: Debug
preCICE: Configuring preCICE with configuration "/disk-samsung/freebsd-ports/science/precice/work/precice-2.4.0/examples/solverdummies/precice-config.xml"
preCICE: I am participant "SolverTwo"
preCICE: Setting up primary communication to coupling partner/s
preCICE:ERROR:  Cannot find network interface "". Available interfaces are: msk0 msk1 lo0  Please check "network" attributes in your configuration file.
Bus error

      Start 26: precice.tools.noarg
26/35 Test #26: precice.tools.noarg ..................   Passed    0.07 sec
      Start 27: precice.tools.invalidcmd
27/35 Test #27: precice.tools.invalidcmd .............   Passed    0.06 sec
      Start 28: precice.tools.version
28/35 Test #28: precice.tools.version ................   Passed    0.06 sec
      Start 29: precice.tools.versionopt
29/35 Test #29: precice.tools.versionopt .............   Passed    0.06 sec
      Start 30: precice.tools.markdown
30/35 Test #30: precice.tools.markdown ...............   Passed    0.09 sec
      Start 31: precice.tools.xml
31/35 Test #31: precice.tools.xml ....................   Passed    0.09 sec
      Start 32: precice.tools.dtd
32/35 Test #32: precice.tools.dtd ....................   Passed    0.08 sec
      Start 33: precice.tools.check.file
33/35 Test #33: precice.tools.check.file .............   Passed    0.11 sec
      Start 34: precice.tools.check.file+name
34/35 Test #34: precice.tools.check.file+name ........   Passed    0.10 sec
      Start 35: precice.tools.check.file+name+size
35/35 Test #35: precice.tools.check.file+name+size ...   Passed    0.10 sec

63% tests passed, 13 tests failed out of 35

Label Time Summary:
Solverdummy    = 363.91 sec*proc (5 tests)
bin            =   0.82 sec*proc (10 tests)
mpiports       =  40.10 sec*proc (2 tests)
petsc          =   5.94 sec*proc (1 test)
tools          =   0.82 sec*proc (10 tests)

Total Test time (real) = 553.92 sec

The following tests FAILED:
	  1 - precice.acceleration (Timeout)
	  3 - precice.com (Failed)
	  4 - precice.com.mpiports (Timeout)
	  5 - precice.cplscheme (Failed)
	  7 - precice.m2n (Failed)
	  8 - precice.m2n.mpiports (Timeout)
	 13 - precice.partition (Failed)
	 16 - precice.testing (Failed)
	 19 - precice.integration.Parallel (Timeout)
	 20 - precice.integration.Serial (Failed)
	 23 - precice.solverdummy.run.cpp-cpp (Timeout)
	 24 - precice.solverdummy.run.c-c (Timeout)
	 25 - precice.solverdummy.run.cpp-c (Timeout)
Errors while running CTest

Version: 2.4.0
FreeBSD 13.1

@yurivict yurivict added the bug preCICE does not behave the way we want and we should look into it (and fix it if possible) label Jun 20, 2022
@fsimonis
Copy link
Member

Thanks for reporting this issue!
I opened a potential fix in #1332.

Could you please test #1332 and let us know if it solves the issue?

@fsimonis fsimonis changed the title Many tests fail: Cannot find network interface "". No default network interface in FreeBSD Jun 21, 2022
@fsimonis fsimonis self-assigned this Jun 21, 2022
@fsimonis fsimonis added this to the Version 2.x.x milestone Jun 21, 2022
@yurivict
Copy link
Author

With this PR all tests crash:

1/33 Test  #1: precice.acceleration .................***Failed    2.39 sec
[2022-06-21 02:25:00.039721] [0x0000000807012000] [debug]   Initialize MPI
[2022-06-21 02:25:00.060578] [0x0000000807012000] [debug]   Initialize MPI
[2022-06-21 02:25:00.089827] [0x0000000807012000] [debug]   Initialize MPI
[2022-06-21 02:25:00.111810] [0x0000000807012000] [debug]   Initialize MPI
[yv:35082] *** Process received signal ***
[yv:35080] *** Process received signal ***
[yv:35079] *** Process received signal ***
[yv:35081] *** Process received signal ***
[yv:35080] Signal: Segmentation fault (11)
[yv:35080] Signal code: Address not mapped (1)
[yv:35080] Failing at address: 0x440000c8
[yv:35079] Signal: Segmentation fault (11)
[yv:35079] Signal code: Address not mapped (1)
[yv:35079] Failing at address: 0x440000c8
[yv:35082] Signal: Segmentation fault (11)
[yv:35082] Signal code: Address not mapped (1)
[yv:35082] Failing at address: 0x440000c8
[yv:35080] [ 0] [yv:35081] Signal: Segmentation fault (11)
[yv:35081] Signal code: Address not mapped (1)
[yv:35081] Failing at address: 0x440000c8
[yv:35079] [ 0] [yv:35082] [ 0] [yv:35081] [ 0] 0x8019dd60e <pthread_sigmask+0x54e> at /lib/libthr.so.3
[yv:35080] [ 1] 0x8019dd60e <pthread_sigmask+0x54e> at /lib/libthr.so.3
[yv:35079] [ 1] 0x8019dd60e <pthread_sigmask+0x54e> at /lib/libthr.so.3
[yv:35081] [ 1] 0x8019dd60e <pthread_sigmask+0x54e> at /lib/libthr.so.3
[yv:35082] [ 1] 0x8019dcbbf <pthread_setschedparam+0x82f> at /lib/libthr.so.3
[yv:35079] [ 2] 0x8019dcbbf <pthread_setschedparam+0x82f> at /lib/libthr.so.3
[yv:35080] [ 2] 0x7ffffffff8a3 <__gxx_personality_v0+0x7fffff5fbba3> at ???
0x7ffffffff8a3 <__gxx_personality_v0+0x7fffff5fbba3> at ???
[yv:35080] [ 3] 0x8019dcbbf <pthread_setschedparam+0x82f> at /lib/libthr.so.3
[yv:35081] [ 2] 0x8019dcbbf <pthread_setschedparam+0x82f> at /lib/libthr.so.3
[yv:35082] [ 2] [yv:35079] [ 3] 0x7ffffffff8a3 <__gxx_personality_v0+0x7fffff5fbba3> at ???
[yv:35082] [ 3] 0x7ffffffff8a3 <__gxx_personality_v0+0x7fffff5fbba3> at ???
[yv:35081] [ 3] 0x8015eb118 <PMPI_Comm_rank+0x38> at /usr/local/mpi/openmpi/lib/libmpi.so.40
[yv:35080] [ 4] 0x8015eb118 <PMPI_Comm_rank+0x38> at /usr/local/mpi/openmpi/lib/libmpi.so.40
[yv:35079] [ 4] 0x800fe7f4a <_ZNK7precice5utils8Parallel9CommState4rankEv+0x2a> at /disk-samsung/freebsd-ports/science/precice/work/.build/libprecice.so.2
0x8015eb118 <PMPI_Comm_rank+0x38> at /usr/local/mpi/openmpi/lib/libmpi.so.40
[yv:35082] [ 4] [yv:35080] [ 5] 0x8015eb118 <PMPI_Comm_rank+0x38> at /usr/local/mpi/openmpi/lib/libmpi.so.40
[yv:35081] [ 4] 0x800fe7f4a <_ZNK7precice5utils8Parallel9CommState4rankEv+0x2a> at /disk-samsung/freebsd-ports/science/precice/work/.build/libprecice.so.2
[yv:35079] [ 5] 0x32ffe5 <main+0x45> at /disk-samsung/freebsd-ports/science/precice/work/.build/testprecice
[yv:35080] *** End of error message ***
0x800fe7f4a <_ZNK7precice5utils8Parallel9CommState4rankEv+0x2a> at /disk-samsung/freebsd-ports/science/precice/work/.build/libprecice.so.2
0x800fe7f4a <_ZNK7precice5utils8Parallel9CommState4rankEv+0x2a> at /disk-samsung/freebsd-ports/science/precice/work/.build/libprecice.so.2
[yv:35081] [ 5] [yv:35082] [ 5] 0x32ffe5 <main+0x45> at /disk-samsung/freebsd-ports/science/precice/work/.build/testprecice
[yv:35079] *** End of error message ***
0x32ffe5 <main+0x45> at /disk-samsung/freebsd-ports/science/precice/work/.build/testprecice
[yv:35081] *** End of error message ***
0x32ffe5 <main+0x45> at /disk-samsung/freebsd-ports/science/precice/work/.build/testprecice
[yv:35082] *** End of error message ***
--------------------------------------------------------------------------
Primary job  terminated normally, but 1 process returned
a non-zero exit code. Per user-direction, the job has been aborted.
--------------------------------------------------------------------------
--------------------------------------------------------------------------
mpiexec noticed that process rank 1 with PID 0 on node yv exited on signal 11 (Segmentation fault).
--------------------------------------------------------------------------

      Start  2: precice.action
 2/33 Test  #2: precice.action .......................***Failed    2.46 sec
[2022-06-21 02:25:02.488999] [0x0000000807012000] [debug]   Initialize MPI
[2022-06-21 02:25:02.506454] [0x0000000807012000] [debug]   Initialize MPI
[2022-06-21 02:25:02.537578] [0x0000000807012000] [debug]   Initialize MPI
[2022-06-21 02:25:02.569416] [0x0000000807012000] [debug]   Initialize MPI
[yv:35091] *** Process received signal ***
[yv:35089] *** Process received signal ***
[yv:35090] *** Process received signal ***
[yv:35088] *** Process received signal ***
[yv:35091] Signal: Segmentation fault (11)
[yv:35091] Signal code: Address not mapped (1)
[yv:35091] Failing at address: 0x440000c8
[yv:35089] Signal: Segmentation fault (11)
[yv:35089] Signal code: Address not mapped (1)
[yv:35089] Failing at address: 0x440000c8
[yv:35091] [ 0] [yv:35088] Signal: Segmentation fault (11)
[yv:35088] Signal code: Address not mapped (1)
[yv:35088] Failing at address: 0x440000c8
[yv:35090] Signal: Segmentation fault (11)
[yv:35090] Signal code: Address not mapped (1)
[yv:35090] Failing at address: 0x440000c8
[yv:35089] [ 0] [yv:35088] [ 0] [yv:35090] [ 0] 0x8019dd60e <pthread_sigmask+0x54e> at /lib/libthr.so.3
[yv:35091] [ 1] 0x8019dd60e <pthread_sigmask+0x54e> at /lib/libthr.so.3
[yv:35089] [ 1] 0x8019dd60e <pthread_sigmask+0x54e> at /lib/libthr.so.3
[yv:35090] [ 1] 0x8019dd60e <pthread_sigmask+0x54e> at /lib/libthr.so.3
[yv:35088] [ 1] 0x8019dcbbf <pthread_setschedparam+0x82f> at /lib/libthr.so.3
[yv:35091] [ 2] 0x8019dcbbf <pthread_setschedparam+0x82f> at /lib/libthr.so.3
[yv:35090] [ 2] 0x8019dcbbf <pthread_setschedparam+0x82f> at /lib/libthr.so.3
[yv:35089] [ 2] 0x8019dcbbf <pthread_setschedparam+0x82f> at /lib/libthr.so.3
[yv:35088] [ 2] 0x7ffffffff8a3 <__gxx_personality_v0+0x7fffff5fbba3> at ???
[yv:35091] [ 3] 0x7ffffffff8a3 <__gxx_personality_v0+0x7fffff5fbba3> at ???
[yv:35090] [ 3] 0x7ffffffff8a3 <__gxx_personality_v0+0x7fffff5fbba3> at ???
[yv:35089] [ 3] 0x7ffffffff8a3 <__gxx_personality_v0+0x7fffff5fbba3> at ???
[yv:35088] [ 3] 0x8015eb118 <PMPI_Comm_rank+0x38> at /usr/local/mpi/openmpi/lib/libmpi.so.40
[yv:35090] [ 4] 0x8015eb118 <PMPI_Comm_rank+0x38> at /usr/local/mpi/openmpi/lib/libmpi.so.40
[yv:35091] [ 4] 0x8015eb118 <PMPI_Comm_rank+0x38> at /usr/local/mpi/openmpi/lib/libmpi.so.40
[yv:35089] [ 4] 0x8015eb118 <PMPI_Comm_rank+0x38> at /usr/local/mpi/openmpi/lib/libmpi.so.40
[yv:35088] [ 4] 0x800fe7f4a <_ZNK7precice5utils8Parallel9CommState4rankEv+0x2a> at /disk-samsung/freebsd-ports/science/precice/work/.build/libprecice.so.2
[yv:35090] [ 5] 0x800fe7f4a <_ZNK7precice5utils8Parallel9CommState4rankEv+0x2a> at /disk-samsung/freebsd-ports/science/precice/work/.build/libprecice.so.2
[yv:35091] [ 5] 0x800fe7f4a <_ZNK7precice5utils8Parallel9CommState4rankEv+0x2a> at /disk-samsung/freebsd-ports/science/precice/work/.build/libprecice.so.2
[yv:35089] [ 5] 0x800fe7f4a <_ZNK7precice5utils8Parallel9CommState4rankEv+0x2a> at /disk-samsung/freebsd-ports/science/precice/work/.build/libprecice.so.2
[yv:35088] [ 5] 0x32ffe5 <main+0x45> at /disk-samsung/freebsd-ports/science/precice/work/.build/testprecice
[yv:35090] *** End of error message ***
0x32ffe5 <main+0x45> at /disk-samsung/freebsd-ports/science/precice/work/.build/testprecice
[yv:35089] *** End of error message ***
0x32ffe5 <main+0x45> at /disk-samsung/freebsd-ports/science/precice/work/.build/testprecice
[yv:35091] *** End of error message ***
0x32ffe5 <main+0x45> at /disk-samsung/freebsd-ports/science/precice/work/.build/testprecice
[yv:35088] *** End of error message ***
--------------------------------------------------------------------------
Primary job  terminated normally, but 1 process returned
a non-zero exit code. Per user-direction, the job has been aborted.
--------------------------------------------------------------------------
--------------------------------------------------------------------------
mpiexec noticed that process rank 2 with PID 0 on node yv exited on signal 11 (Segmentation fault).
--------------------------------------------------------------------------

@fsimonis
Copy link
Member

Do really all tests fail?

All precice tests except the solverdummy tests require a working MPI installation.
Some tests in your initial bug report pass, hence there is something else wrong.

You could try building precice without MPI enabled (can be disabled via cmake). This should work.

@yurivict
Copy link
Author

yurivict commented Jun 21, 2022

With MPI and PETSC disabled 3 tests time out:

      Start  1: precice.solverdummy.build.cpp
 1/15 Test  #1: precice.solverdummy.build.cpp ........   Passed    3.14 sec
      Start  2: precice.solverdummy.build.c
 2/15 Test  #2: precice.solverdummy.build.c ..........   Passed    1.33 sec
      Start  3: precice.solverdummy.run.cpp-cpp
 3/15 Test  #3: precice.solverdummy.run.cpp-cpp ......***Timeout 120.04 sec
      Start  4: precice.solverdummy.run.c-c
 4/15 Test  #4: precice.solverdummy.run.c-c ..........***Timeout 120.03 sec
      Start  5: precice.solverdummy.run.cpp-c
 5/15 Test  #5: precice.solverdummy.run.cpp-c ........***Timeout 120.02 sec
      Start  6: precice.tools.noarg
 6/15 Test  #6: precice.tools.noarg ..................   Passed    0.02 sec
      Start  7: precice.tools.invalidcmd
 7/15 Test  #7: precice.tools.invalidcmd .............   Passed    0.02 sec
      Start  8: precice.tools.version
 8/15 Test  #8: precice.tools.version ................   Passed    0.02 sec
      Start  9: precice.tools.versionopt
 9/15 Test  #9: precice.tools.versionopt .............   Passed    0.02 sec
      Start 10: precice.tools.markdown
10/15 Test #10: precice.tools.markdown ...............   Passed    0.05 sec
      Start 11: precice.tools.xml
11/15 Test #11: precice.tools.xml ....................   Passed    0.04 sec
      Start 12: precice.tools.dtd
12/15 Test #12: precice.tools.dtd ....................   Passed    0.04 sec
      Start 13: precice.tools.check.file
13/15 Test #13: precice.tools.check.file .............   Passed    0.07 sec
      Start 14: precice.tools.check.file+name
14/15 Test #14: precice.tools.check.file+name ........   Passed    0.07 sec
      Start 15: precice.tools.check.file+name+size
15/15 Test #15: precice.tools.check.file+name+size ...   Passed    0.08 sec

80% tests passed, 3 tests failed out of 15

But with MPI enabled all tests now crash with the PR patch. It links to OpenMPI.

@fsimonis
Copy link
Member

Can you have a look why these solverdummies don't run?

cd build
rm -r TestOutput
cmake .
ctest -VV -R solverdummy

We have no experience with FreeBSD, so this will be a bit more tricky than usual.

Also, can you get a simple MPI program to run? You could compile an MPI hello world and run it using mpirun -n 2 ./hello_world.

@fsimonis fsimonis changed the title No default network interface in FreeBSD Unable to run tests on FreeBSD Jun 25, 2022
@fsimonis fsimonis added the help wanted I have opened this issue and/or I am assigned to it, but I don't know how to solve it label Jun 28, 2022
@fsimonis
Copy link
Member

@yurivict is the problem still persistent? Would be great to get this fixed.

@yurivict
Copy link
Author

Current revision (b51fd77) still has 3 timeouts in tests:

      Start  1: precice.solverdummy.build.cpp
 1/15 Test  #1: precice.solverdummy.build.cpp ........   Passed    2.15 sec
      Start  2: precice.solverdummy.build.c
 2/15 Test  #2: precice.solverdummy.build.c ..........   Passed    0.77 sec
      Start  3: precice.solverdummy.run.cpp-cpp
 3/15 Test  #3: precice.solverdummy.run.cpp-cpp ......***Timeout 120.02 sec
      Start  4: precice.solverdummy.run.c-c
 4/15 Test  #4: precice.solverdummy.run.c-c ..........***Timeout 120.02 sec
      Start  5: precice.solverdummy.run.cpp-c
 5/15 Test  #5: precice.solverdummy.run.cpp-c ........***Timeout 120.03 sec
      Start  6: precice.tools.noarg
 6/15 Test  #6: precice.tools.noarg ..................   Passed    0.01 sec
      Start  7: precice.tools.invalidcmd
 7/15 Test  #7: precice.tools.invalidcmd .............   Passed    0.01 sec
      Start  8: precice.tools.version
 8/15 Test  #8: precice.tools.version ................   Passed    0.01 sec
      Start  9: precice.tools.versionopt
 9/15 Test  #9: precice.tools.versionopt .............   Passed    0.01 sec
      Start 10: precice.tools.markdown
10/15 Test #10: precice.tools.markdown ...............   Passed    0.04 sec
      Start 11: precice.tools.xml
11/15 Test #11: precice.tools.xml ....................   Passed    0.04 sec
      Start 12: precice.tools.dtd
12/15 Test #12: precice.tools.dtd ....................   Passed    0.03 sec
      Start 13: precice.tools.check.file
13/15 Test #13: precice.tools.check.file .............   Passed    0.05 sec
      Start 14: precice.tools.check.file+name
14/15 Test #14: precice.tools.check.file+name ........   Passed    0.05 sec
      Start 15: precice.tools.check.file+name+size
15/15 Test #15: precice.tools.check.file+name+size ...   Passed    0.05 sec

80% tests passed, 3 tests failed out of 15

Label Time Summary:
Solverdummy    = 363.00 sec*proc (5 tests)
bin            =   0.32 sec*proc (10 tests)
tools          =   0.32 sec*proc (10 tests)

Total Test time (real) = 363.32 sec

The following tests FAILED:
	  3 - precice.solverdummy.run.cpp-cpp (Timeout)
	  4 - precice.solverdummy.run.c-c (Timeout)
	  5 - precice.solverdummy.run.cpp-c (Timeout)
Errors while running CTest

@fsimonis
Copy link
Member

Can you run the tests with ctest -VV to include their output?

@yurivict
Copy link
Author

2.5.1 still has test failures.
See the log.
It says:

Cannot find network interface "". Available interfaces are: msk0 msk1 lo0 Please check "network" attributes in your configuration file.

However, it's not clear where the configuration file is since the project doesn't install any config files.

@fsimonis
Copy link
Member

@yurivict We have no experience with BSD. If you use BSD and would like preCICE to support it out of the box, then we need your help.

The default loopback selection seems to be broken for BSD. Could you port this function to work with (Free)BSD?

std::string loopbackInterfaceName()
{
#if defined(__linux__)
return "lo";
#elif defined(__APPLE__) || defined(BSD)
return "lo0";
#elif defined(__WIN32)
// Not required as we directly use the 127.0.0.1 under Windows
return "";
#else
#warning "Your target architecture does not define a loopback interface. Please consider reporting this to the preCICE developers."
return "";
#endif
}

There may also be some necessary changes in the interface detection:

std::vector<Interface> detectInterfaces()
{
std::vector<Interface> interfaces;
// Collect interface indices and names
struct if_nameindex *nameInterface = if_nameindex();
for (struct if_nameindex *itNameInterface = nameInterface; itNameInterface->if_index != 0; ++itNameInterface) {
Interface interface;
interface.index = itNameInterface->if_index;
interface.name = itNameInterface->if_name;
interfaces.emplace_back(std::move(interface));
}
if_freenameindex(nameInterface);
// Resolve addresses for interfaces
for (auto &interface : interfaces) {
struct ifreq request;
strncpy(request.ifr_name,
interface.name.c_str(),
IFNAMSIZ - 1); // Copy interface name
auto socketfd = socket(AF_INET, SOCK_STREAM, 0);
if (socketfd == -1) {
continue;
}
auto err = ioctl(socketfd, SIOCGIFADDR, &request);
close(socketfd);
if (err) {
continue;
}
const char *addr = inet_ntoa((reinterpret_cast<struct sockaddr_in *>(&request.ifr_addr))->sin_addr);
if (!addr) {
continue;
}
interface.address = addr;
}
return interfaces;
}
} // namespace
#endif
std::string SocketCommunication::getIpAddress()
{
PRECICE_TRACE();
#ifdef _WIN32
return "127.0.0.1";
#else
PRECICE_DEBUG("Looking for IP address of network \"{}\"", _networkName);
auto interfaces = detectInterfaces();
auto pos = std::find_if(interfaces.begin(), interfaces.end(),
[&](Interface const &interface) { return interface.name == _networkName; });
if (pos == interfaces.end()) {
PRECICE_DEBUG("There's NOTHING");
std::ostringstream err;
err << "Cannot find network interface \"" << _networkName << "\". Available interfaces are: ";
for (const auto &interface : interfaces) {
err << interface.name << ' ';
}
err << " Please check \"network\" attributes in your configuration file.";
PRECICE_ERROR(err.str());
}
// Unconnected interfaces don't have an IP address.
PRECICE_CHECK(not pos->address.empty(), "The interface \"{}\" does not have an IP address. Please select another interface.", _networkName);
PRECICE_DEBUG("Detected network IP address of interface \"{}\": {}.", _networkName, pos->address);
return pos->address;
#endif
}

Our documentation explains how to specify a network.

@fsimonis
Copy link
Member

Evidently, there is no motivation to getting this fixed from our FreeBSD users, therefore I'll unassign myself and leave the issue open for documentation purposes.

@fsimonis fsimonis removed their assignment Aug 16, 2024
@fsimonis fsimonis added the good first issue Everybody is invited to help: students, users, externals, ... label Aug 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug preCICE does not behave the way we want and we should look into it (and fix it if possible) good first issue Everybody is invited to help: students, users, externals, ... help wanted I have opened this issue and/or I am assigned to it, but I don't know how to solve it
Projects
None yet
Development

No branches or pull requests

2 participants