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

Need help for openmp #231

Open
vineetmoraybfab opened this issue May 11, 2018 · 4 comments
Open

Need help for openmp #231

vineetmoraybfab opened this issue May 11, 2018 · 4 comments

Comments

@vineetmoraybfab
Copy link

vineetmoraybfab commented May 11, 2018

Hi, I want to run the application on Intel's KNL arch using threads. I have created FMS, Ocean only and SIS using the online documentation and with providing flag OPENMP=on (also with icc flags: -O3 -axCOMMON-AVX512) while running make utility. Everything goes fine. Afterwards when i run the application (ocean_only benchmark with NIGLOBAL = 720, NJGLOBAL = 360 and days = 20 provided in the benchmark) using:
export OMP_NUM_THREADS=4
ulimit -s unlimited
mpirun -np 68 -genv OMP_NUM_THREADS=4 ../../build/gnu/ocean_only_repro/MOM6
I am not able to get an expected performance. Also it seems I am using 25% of the CPU.
So is it that the application is not using OMP threads or is it that I am doing something wrong?
Thanks

@nikizadehgfdl
Copy link
Contributor

OMP performance in MOM6 is still under investigation/development.

@vineetmoraybfab
Copy link
Author

Ok, no problem..
I will be waiting :-)
Thanks

@Youwei-Ma
Copy link

Hi.

An instability warning, 'btstep: eta has dropped below bathyT' shows at the beginning of an ocean_only/global benchmark in an OPENMP and openMPI hybrid run.

The machine is Cheyenne. I successfully compiled the FMS2 and MOM6 by intel2022.1 with flag -qopenmp in the make file and OPENMP=1 in the compile scripts, for example
../../../../src/mkmf/bin/list_paths -l $ROOTDIR/FMS2; \ ../../../../src/mkmf/bin/mkmf -t ../../cheyenne-intel.mk -p libfms.a -c "-Duse_libMPI -Duse_netCDF -DSPMD" path_names) (cd /shared_openmp/repro/; make NETCDF=4 OPENMP=1 REPRO=1 libfms.a -j)
and
../../../../src/mkmf/bin/list_paths -l ./ ../../../../src/MOM6/{config_src/infra/FMS2,config_src/memory/dynamic_symmetric,config_src/drivers/solo_driver,config_src/external,src/{*,*/*}}/ ; \ ../../../../src/mkmf/bin/mkmf -t ../../cheyenne-intel.mk -o '-I../../shared_openmp/repro' -p MOM6 -l '-L../../shared_openmp/repro -lfms' path_names) (cd ./ocean_only_openmp/repro; make NETCDF=4 REPRO=1 OPENMP=1 MOM6 -j)

I hired 4 nodes, each node with 2 sockets and 18 CPUs per socket, so each node has 2 MPI processes and 18 threads per socket. Part of my PBS job script shown below:

#PBS -l select=4:ncpus=36:mpiprocs=2:ompthreads=18  
module load intel/2022.1  
module load openmpi/4.1.1  
module load netcdf/4.9.0  
....  
ulimit -s unlimited  
mpiexec --map-by ppr:2:node:pe=18 --report-bindings /glade/u/home/youweima/MOM6-examples/build/intel2022.1/ocean_only_openmp/repro/MOM6

The fatal message from the output is

WARNING from PE     2: btstep: eta has dropped below bathyT:  -9.7544129261137066E+09 vs.  -4.7494283999060144E+02 at  -6.0500E+01 -7.6250E+01    221      3

FATAL from PE     1: NaN in input field of reproducing_EFP_sum(_2d).

The full output file is attached below.

ocean_only_global_test.o8066956.txt

Is there anything I missed? I would be appreciated if someone has any idea about this issue.
Thanks!

@marshallward
Copy link
Member

marshallward commented Jan 17, 2023

@Youwei-Ma It looks like you have correctly compiled the model with OpenMP, so I don't think you have made any error.

More likely, you may have found a bug in the OpenMP implementation somewhere, perhaps an uninitialized variable inside one of the OpenMP loops.

As mentioned by @nikizadehgfdl, we don't actually use OpenMP in production with MOM6. Although some parts have been configured to use it, we do not see any speedup from using OpenMP threads and haven't pursued it any further.

You could submit this as a bug report to the MOM6 repository, but I can't say when we would have a chance to look into it.

marshallward added a commit that referenced this issue Apr 6, 2023
- NOAA-GFDL/MOM6@fc823f5d7 Merge branch 'main' into merge_main_20230405
- NOAA-GFDL/MOM6@a6f813e05 (*)Fix MOM_calc_grad_Coriolis GLOBAL_INDEXING bug
- NOAA-GFDL/MOM6@1e54bed6a Merge pull request #1594 from NCAR/dev-ncar-main-candidate-2023-03-02
- NOAA-GFDL/MOM6@d1d53bcb4 remove inadvertent reassignment of layer_frac
- NOAA-GFDL/MOM6@ed93a232a  add SMOOTH_RI to MOM_obsolete_params.F90
- NOAA-GFDL/MOM6@774074ff9 minor styling fixes to address PR #1594 reviews.
- NOAA-GFDL/MOM6@9786710c3 Merge pull request #235 from mom-ocean/main
- NOAA-GFDL/MOM6@c142e4c39 Merge pull request #231 from jedwards4b/cesm_logging_improvements
- NOAA-GFDL/MOM6@4959ee12f update more write units to stdout in mom6 nuopc cap and let only rootpe write logs.
- NOAA-GFDL/MOM6@b693dd2d8 remove more direct calls to FMS in mom_cap.F90
- NOAA-GFDL/MOM6@1dce6df13 merge latest dev/ncar and resolve conflicts
- NOAA-GFDL/MOM6@5b274bbde Merge pull request #234 from alperaltuntas/fix_gnu_restart
- NOAA-GFDL/MOM6@0f1fc0386 fix gnu restart issue by removing leading spaces in restartfiles list
- NOAA-GFDL/MOM6@9d5d9bb40 Merge pull request #233 from marshallward/siglongjmp_name_fix
- NOAA-GFDL/MOM6@de8023d10 POSIX: siglongjmp and sigsetjmp_missing fixes
- NOAA-GFDL/MOM6@7f024685f Merge pull request #229 from gustavo-marques/merge_main_08Dec22
- NOAA-GFDL/MOM6@a789254e0 get the variable name correct
- NOAA-GFDL/MOM6@8bc69f67e further improvement to logunit setting
- NOAA-GFDL/MOM6@cac67d1e7 revert change to github action
- NOAA-GFDL/MOM6@12238ae21 remove whitespace
- NOAA-GFDL/MOM6@7824dcec7 switch to openmpi for github tests
- NOAA-GFDL/MOM6@a80b91ded use more cesm style logging
- NOAA-GFDL/MOM6@380864138 Switch from mpich to openmpi
- NOAA-GFDL/MOM6@ed252790d Merge branch 'dev/ncar' into main_08Dec22
- NOAA-GFDL/MOM6@1eb6be9c8 Merge pull request #222 from NCAR/willy_tracer
- NOAA-GFDL/MOM6@4840c6fdb Merge pull request #226 from gustavo-marques/fix_diags_docs
- NOAA-GFDL/MOM6@d5bd437b7 Merge pull request #225 from gustavo-marques/multiple_ri_smooth
- NOAA-GFDL/MOM6@0cf34d352 Fix string order in regional_section
- NOAA-GFDL/MOM6@b4440417c Adds option to smooth gradient Ri multiple times
- NOAA-GFDL/MOM6@09278521c Modify gradient Richarson number diagnostics
- NOAA-GFDL/MOM6@cfd7c0bde Rename parameter SMOOTH_RI to N_SMOOTH_RI
- NOAA-GFDL/MOM6@fe3cb4d69 Merge pull request #224 from gustavo-marques/merge-dev-gfdl-candidate-main-2022-08-10
- NOAA-GFDL/MOM6@36487d828 Merge branch 'main' into merge-dev-gfdl-candidate-main-2022-08-10
- NOAA-GFDL/MOM6@0b5cd6ff7 Merge pull request #223 from mom-ocean/main
- NOAA-GFDL/MOM6@dfb37154a Changed parameter reference for ideal_age_physics to Hbl=Hml
- NOAA-GFDL/MOM6@e300296ac Changed GV%nkbl back to GV%nkml
- NOAA-GFDL/MOM6@5ac624241 All references to "mixed layer" in the ideal age module now refer to "boundary layer" instead.
- NOAA-GFDL/MOM6@0d86acd52 Shortened line length to make dOxygen happy
- NOAA-GFDL/MOM6@2428684ac !! ---->  !<
- NOAA-GFDL/MOM6@f415a7f5c Shortens a line and removes whitespace
- NOAA-GFDL/MOM6@bb02a51be A new tracer that keeps track of "mixed layer age" has been added to the ideal age module. This PR also adds the ability to use the actual BL depth that is diagnosed by the active BL scheme inside the ideal age module (for all ideal age tracers).
- NOAA-GFDL/MOM6@d9ec82e4d Merge branch 'mom-ocean:main' into dev/ncar
- NOAA-GFDL/MOM6@605771423 Follow MOM6 code style guide
- NOAA-GFDL/MOM6@8e833d4d9 Add missing units
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants