FAQ  •  Login

Compiling MPI code

Moderator: Dan Negrut

<<

ME964BrianD

Jr. Member
Jr. Member

Posts: 77

Joined: Wed Jan 12, 2011 1:53 pm

Unread post Mon Apr 04, 2011 5:01 pm

Compiling MPI code

lecture 03/29 slide 9 states

Define the MPICH_IGNORE_CXX_SEEK macro at compilation stage to avoid
this issue. For instance,
mpicc -DMPICH_IGNORE_CXX_SEEK


Is there a mpicc compiler installed. I installed the deps as listed on 03/24 slide 26 and searched my drive for mpicc, but did not find it.

Reason I ask is I am unable to break at a breakpoint and the dos window just states "Press any key to continue" after configuring as per "Debugging MPI Code" slide.
<<

ME964BrianD

Jr. Member
Jr. Member

Posts: 77

Joined: Wed Jan 12, 2011 1:53 pm

Unread post Mon Apr 04, 2011 8:43 pm

Re: Compiling MPI code

Adding a x64 bit build to the configuration manager and specifying C:\Program Files\Microsoft HPC Pack 2008 R2\Lib\amd64 in link libs dirs fixed it. Thought I would try the Win32 approach first as that is what appears everyone else was doing and it was mentioned in class that there was a "dead end" or impass reached on x64 bit. Maybe I will run in to that, but at least the debugger attached.
<<

ME964BrianD

Jr. Member
Jr. Member

Posts: 77

Joined: Wed Jan 12, 2011 1:53 pm

Unread post Mon Apr 04, 2011 8:46 pm

Re: Compiling MPI code

I spoke too soon. Windows configuration manager when copying settings did not switch the debugger to mpi cluster debugger.
<<

Dan Negrut

Global Moderator
Global Moderator

Posts: 833

Joined: Wed Sep 03, 2008 12:24 pm

Unread post Wed Apr 06, 2011 7:54 am

Re: Compiling MPI code

Brian - where are you on this one?
You are not supposed to work with mpicc, that was shown to explain the issue with the stdio.h and mpi.h colliding. when you compile code simply do an Ctrl+Alt+7 in Visual Studio 2008 and once you have the HPC 2008 R2 properly installed you pick up all the needed library support once you include msmpi.h and the msmpi.lib import library.

For debugging, I got it to work under 32 bit following the steps i provided in the notes. 64 bit didn't work for me.
Dan
<<

ME964BrianD

Jr. Member
Jr. Member

Posts: 77

Joined: Wed Jan 12, 2011 1:53 pm

Unread post Wed Apr 06, 2011 8:39 am

Re: Compiling MPI code

I was able to compile and get the my program to run on my machine and on Newton. I was not able to get the debugger to attach locally so I resulted to the poor mans debugger (gobs of printf statements). I am running a Win7 box with all the bits installed as per the slides, but I was not able to get the debugger to attach. Guess it is not that important now. I just need to rerun on Newton after fixing one bug and resubmit my HW.

As far as mpicc, I was never using this. I was just looking for reasons as to why the debugger would not attach. I tried every flavor of win32/x64 and the libs with no luck so I was combing the slides looking for any place where I could be doing something wrong.

Return to ME964 Spring 2011: High Performance Computing

Who is online

Users browsing this forum: No registered users and 2 guests

cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software.