Skip to content

Commit

Permalink
slightly update 'dont use nprocs'
Browse files Browse the repository at this point in the history
  • Loading branch information
minghangli-uni committed Apr 29, 2024
1 parent 5341473 commit fda7c92
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions cicecore/cicedyn/infrastructure/ice_domain.F90
Original file line number Diff line number Diff line change
Expand Up @@ -205,14 +205,18 @@ subroutine init_domain_blocks

endif

if (nprocs .ne. -1) then
if (my_task == master_task) then
#if (defined CESMCOUPLED)
if (my_task == master_task) then
write(nu_diag,*) subname//' WARNING: nprocs is deprecated, please remove from namelist'
endif
endif

nprocs = get_num_procs()

#else
write(nu_diag,*) subname,'ERROR: nprocs, get_num_procs = ',nprocs,get_num_procs()
call abort_ice(subname//'ERROR: Input nprocs not same as system request')
#endif

call broadcast_scalar(nprocs, master_task)
call broadcast_scalar(processor_shape, master_task)
call broadcast_scalar(distribution_type, master_task)
Expand Down

4 comments on commit fda7c92

@anton-seaice
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure what you are trying to achieve here? I was trying to totally get rid of nprocs from ice_in?

@minghangli-uni
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe we use CESMCOUPLED directive right? This is consistent with the overall code structure if CESMCOUPLED is defined. I just copied these from the original code.

if (nprocs .ne. -1) should be included, I can add it back in.

@anton-seaice
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah we do - but I think we can get rid of nprocs irrespective of whether CESMCOUPLED is set or not.

@minghangli-uni
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright, I'm okay with you resetting it back or reverting it :)

Please sign in to comment.