Help needed - remote debug in VS2017 hangs when MPI_InitFinalize is called

43 views
Skip to first unread message

Yuxiang Wang

unread,
Jul 11, 2018, 3:17:36 AM7/11/18
to deal.II User Group
Dear all,

I am stuck in this remote debug issue - any pointer would be really appreciated.

I have set up Windows Subsystem Linux with Ubuntu 18.04 as instructed in https://github.com/dealii/dealii/wiki/Windows and it worked perfectly for tutorials without MPI, such as stpe-1 and step-6. The version for deal.II is 8.5.1.

However, when I use it for step-18, when I step into line 1894 where Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); is called, the program hangs there and does nothing (no progress shows up in the Linux Console Window). Waiting for 30 minutes doesn't help.

Interestingly:

1) The compilation and linking worked fine; if I open Ubuntu terminal and run step-18 from there, everything works immediately;
2) Before when I used candi (rather than apt install) to install deal.II 9.0.0 it worked, making me think that whether I made a mistake somewhere in installing/upgrading the openmp related libraries;
3) The same workflow worked on my home computer but not my work computer - same Ubuntu version and deal.II version.

Could anyone please help?

Thank you,
Shawn

Yuxiang Wang

unread,
Jul 11, 2018, 4:43:02 PM7/11/18
to deal.II User Group
Update - I used gdb in the Ubuntu terminal and the problem still exists, meaning that it has nothing to do with the remote ssh.

I did:

gdb step-18
b main
r

And then either stepping into or over the line 

1898          Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1);

Will hang the program.

I'm now trying to use candi to build locally to see whether this will get around the issue.

Shawn

Jean-Paul Pelteret

unread,
Jul 12, 2018, 2:50:45 PM7/12/18
to dea...@googlegroups.com
Hi Shawn,

Thanks for reporting this problem. I must admit that I have no experience with building deal.II on Windows, so I don’t have much advice to offer you. I suppose its fair to say that using deal.II on native Windows still experimental, even though we’ve had some success with getting it running through WSL. Would you be willing to open a issue for this on GitHub? Hopefully someone could reproduce the problem and help look into it.

Regards,
Jean-Paul

--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en
---
You received this message because you are subscribed to the Google Groups "deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dealii+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Wolfgang Bangerth

unread,
Jul 12, 2018, 3:52:15 PM7/12/18
to dea...@googlegroups.com
On 07/11/2018 02:43 PM, Yuxiang Wang wrote:
>
> gdb step-18
> b main
> r
>
> And then either stepping into or over the line
>
> 1898          Utilities::MPI::MPI_InitFinalize mpi_initialization(argc,
> argv, 1);
>
> Will hang the program.
>
> I'm now trying to use candi to build locally to see whether this will
> get around the issue.

What you show above suggests that you run with just one processor? If
you single step into this function, where does it actually hang?

Best
W.

--
------------------------------------------------------------------------
Wolfgang Bangerth email: bang...@colostate.edu
www: http://www.math.colostate.edu/~bangerth/

Yuxiang Wang

unread,
Jul 12, 2018, 6:26:03 PM7/12/18
to deal.II User Group
Hi Jean-Paul,

Thank you for your response! Yes I would be happy to open an issue on GitHub. That said, I would like to note that I am not using deal.II on native Windows - the issue was during use of WSL. 

Best,
Shawn

Yuxiang Wang

unread,
Jul 12, 2018, 6:36:09 PM7/12/18
to deal.II User Group
Thank you Professor Bangerth for your response!


I tried and I can neither step over (n) nor step into (s) that line of code - either way, it hangs right there.

As for I run with just one processor - sorry but I am not sure about the question. The workstation is dual processor with 8 cores each; the program was unchanged from the documentation. Or were you inquiring about something else?

Best,
Shawn

Yuxiang Wang

unread,
Jul 13, 2018, 12:30:38 PM7/13/18
to deal.II User Group
A quick update 7/13/2018 - just used candi to build and install all (including PETSc and deal.II 9.0.0) and the same problem still persists.

Wolfgang Bangerth

unread,
Jul 13, 2018, 7:59:56 PM7/13/18
to dea...@googlegroups.com
On 07/12/2018 04:36 PM, Yuxiang Wang wrote:
>
> I tried and I can neither step over (n) nor step into (s) that line of code -
> either way, it hangs right there.

Can you step into other function calls? That's sort of the point of a
debugger, that you can get into functions :-)

When it hangs, hit Ctrl-C (maybe twice, if necessary). This should stop
execution at the place where it hangs. You can then type 'backtrace' to get a
listing of where execution currently is.


> As for I run with just one processor - sorry but I am not sure about the
> question. The workstation is dual processor with 8 cores each; the program was
> unchanged from the documentation. Or were you inquiring about something else?

The number of processors doesn't matter. If you just say
./step-xy
then it's going to use just one MPI process. (Though each MPI process may use
multiple cores for shared memory parallelization, but that's a separate matter.)

If you want to use multiple MPI processes, you need to run the code as in
mpirun -np 8 ./step-xy
for example.

Yuxiang Wang

unread,
Aug 2, 2018, 1:00:23 PM8/2/18
to deal.II User Group
Hi Professor Bangerth,

Thank you for the reply! And sorry for the late response.

1. Yes I can step into other lines of code fine :)

2. Hitting Ctrl-C twice does not do anything and it still hangs there.

However, good news - we tracked it down on GitHub!

The initial discussion started here:

And then went here:

And it should be resolved for now. I'm still waiting for our IT department to upgrade my Windows to be able to see it, so I'll report back when I try it!

Thanks to everyone who helped!

Shawn
Reply all
Reply to author
Forward
0 new messages