Blowup with OpenMP

Dear CROCO users,

I’m running the test case of RIP.
Using the default cpp setup (undef OPENMP and undef MPI), the codes runs well.
But when I define OPENMP, the codes blow up after a few steps with the identical croco.in.Rip file.
For example, set NPP=2, NSUB_X=1, NSUB_E=NPP, and export OMP_NUM_THREADS=2.
Then I checked the output, the solutions have extremes around the boundary between two tiles.
So I believe the blowup is caused by some parallel bugs.
Could someone please take a look?

Thank you,
Peng

Hi Peng,
I just did a test of RIP case with OpenMP (NPP=2 or 4) and had no problem. What computer and compiler are you using? Did you modify jobcomp?

Hi Pmarches, thank you for your reply.
I’m using Linux and ifort. I did not modify jobcomp except changing the compiler to ifort. (gfortran also has this blowup issue.) I did a few tests and found that the blowup issue depends on how to divide the subdomains and number of threads. For example, set NPP=2, NSUB_X=1, NSUB_E=NPP, and export OMP_NUM_THREADS=2, the codes blow up. But set NPP=4, NSUB_X=1, NSUB_E=NPP, and export OMP_NUM_THREADS=2, the codes had no problem. I am not sure why this happens.

Hi Peng, I don’t see the problem. The RIP case is routinely tested for parallelization (with automatic procedure). I would advise to make sure that your jobcomp, cppdefs.h and param.h are taken from the OCEAN directory. What linux distribution are you on? … Patrick

Hi Peng and Pmarches (and everyone),

I encountered a similar problem with OPENMP and gfortran in UBUNTU. Step2d velocity blowed-up between two tiles. When I turned off OPENMP, this blowing-up was gone.

Do you have more clue about this issue? Thank you.
wf

Are you using the released version available on CROCO web site or the Git Master version?

It was downloaded from CROCO web site https://www.croco-ocean.org/download/croco-project/

Hi Pmarches, I also have similar problem. I use ubuntu 18.04 . thank you. Apri