bnmurphy / PMCAMx-2008

This Repository is for testing version control between SU, Patras, and CMU
Other
3 stars 1 forks source link

does PMCAMx already have OpenMP #6

Open sebarn opened 11 years ago

sebarn commented 11 years ago

I just tried to compile using the linux bash (won't work, however compiling with NetBeans works). While doing this, I got the output below. This indicated that at least CAMx already features OpenMP, since it has the OMP option.. How do you feel about this ;-)?

'This is the Makefile for CAMx v4.00

Syntax is: "make platform DOMAIN=string"

Acceptable platforms are: dec -- configure for DEC/Alpha platform linux -- configure for Linux platform linuxomp -- configure for Linux platform w/OMP sgi -- configure for SGI platform sgiomp -- configure for SGI platform w/OMP sun -- configure for SUN platform hp -- configure for HP platform ibm -- configure for IBM platform

Do not use OMP for modeling PM with mechanism 4 '

sebarn commented 11 years ago

btw, this is the error that I get when I try to make in the linux bash, oddly I don't get this when I build from inside NetBeans. That means that there are probably some bugs in the Makefile (which NetBeans catches). I'll try to create a new makefile from scratch tomorrow. I also plan to run valgrind on this baby tomorrow. Cheers

make model FC="pgf77" FLGS="-I./Inc -O2 -tp k8-32 -pc 64 -Kieee -Mdalign -Mextend -Mnoframe -byteswapio -Wl,-Bstatic" TARGT="CAMx.otag.linux" DUM=dummy make[1]: Entering directory/home/seb/NetBeansProjects/PMCAMx-2008' make[1]: No rule to make target Inc/camx.prm', needed byCAMx.o'. Stop. make[1]: Leaving directory `/home/seb/NetBeansProjects/PMCAMx-2008' make: [linux] Error 2`

sebarn commented 11 years ago

Oh, and I suspect that the -Bstatic flag is causing some error. Gonna check that out tomorrow as well.

bnmurphy commented 11 years ago

Not a problem with Bstatic. At least that's not the problem causing this error. You have to add a value to a variable for the Makefile to compile correctly. The correct make statement for our code is: "make linux DOMAIN=ladco"

The fact that netbeans compiles without a value for DOMAIN is what makes me suspicious about the quality of the executable. I saw the OMP statements and that gives me lots of hope. However, nowhere in the code do I recall seeing the actual OpenMP code, so it's something we have to take one step at a time.

Maybe sometime this week you and I can try to understand what's exactly required to implement OpenMP in Fortran (90, 95 and 77)?

sebarn commented 11 years ago

ahhh. ok, let's lay out a plan for next week tomorrow then. what is the Bstatic for? this makes me suspicous :-). I trust NetBeans more than a makefile that is written by hand though ;-).

sebarn commented 11 years ago

this code has omp functionality to some extent. you can find it by searching the repository for "omp". This is a screen shot of what I'm getting:

omp-capture

Marshlight commented 11 years ago

I think Kristina Wagstrom has experience implementing openMP or something similar - I have asked her about it before, anyway. When I suggested looking into it, Spyros asked about the difference between that and what a computer already does to allocate resources, and I wasn't prepared to respond to that adequately I'm afraid. Maybe someone could explain it better to me at some point? In any case, I think Peter Adams has sufficiently convinced Spyros that it won't be that bad, but still, a primer might be nice.

sebarn commented 11 years ago

@Marshlight in short: OpenMP is awesome. It let's you parallelize portions of code with much more ease than MPI. I can explain more tomorrow via Skype. There's no need to be afraid. Cheers.

bnmurphy commented 11 years ago

Oh, we have much discuss... and the code WILL be faster. How much faster is still an open issue.