Changeset 22656


Ignore:
Timestamp:
04/02/18 11:22:11 (7 years ago)
Author:
seroussi
Message:

CHG: cleaning up ocean information exchange

Location:
issm/trunk-jpl/src/c
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/cores/transient_core.cpp

    r22654 r22656  
    7777
    7878        if(isoceancoupling){
    79                 _printf_("startin ocean coupling \n");
     79                if(VerboseSolution()) _printf0_("   ocean coupling: initialization \n");
    8080                int my_rank;
    8181                int oceannxsize,oceannysize;
     
    9494                tomitgcmcomm=parcom->GetParameterValue();
    9595                if(my_rank==0){
    96                         _printf_("starting ocean coupling rank 0 \n");
    97                         _printf_("coupling time: "<< coupling_time <<"\n");
    9896                        ISSM_MPI_Send(&coupling_time,1,ISSM_MPI_DOUBLE,0,10001000,tomitgcmcomm);
    9997                        ISSM_MPI_Send(&time,1,ISSM_MPI_DOUBLE,0,10001001,tomitgcmcomm);
     
    10199                        ISSM_MPI_Recv(&oceannxsize,1,ISSM_MPI_INT,0,10001003,tomitgcmcomm,&status);
    102100                        ISSM_MPI_Recv(&oceannysize,1,ISSM_MPI_INT,0,10001004,tomitgcmcomm,&status);
    103                         _printf_("ocean time: "<< oceantime<<"\n");
    104                         _printf_("nx size : "<< oceannxsize<<"\n");
    105                         _printf_("ny size : "<< oceannysize<<"\n");
    106101                        oceangridx = xNew<IssmDouble>(oceannxsize*oceannysize);
    107102                        ISSM_MPI_Recv(oceangridx,oceannxsize*oceannysize,ISSM_MPI_DOUBLE,0,10001005,tomitgcmcomm,&status);
    108                         _printf_("gridx received \n");
    109103                        oceangridy = xNew<IssmDouble>(oceannxsize*oceannysize);
    110104                        ISSM_MPI_Recv(oceangridy,oceannxsize*oceannysize,ISSM_MPI_DOUBLE,0,10001006,tomitgcmcomm,&status);
    111                         _printf_("gridy received \n");
    112105                        icebase = xNew<IssmDouble>(oceannxsize*oceannysize);
    113106                        for(int i=0;i<oceannxsize;i++){
     
    117110                        }
    118111                        ISSM_MPI_Send(icebase,oceannxsize*oceannysize,ISSM_MPI_DOUBLE,0,10001008,tomitgcmcomm);
    119                         _printf_("base sent\n");
    120112                        oceanmelt = xNew<IssmDouble>(oceannxsize*oceannysize);
    121113                        ISSM_MPI_Recv(oceanmelt,oceannxsize*oceannysize,ISSM_MPI_DOUBLE,0,10001007,tomitgcmcomm,&status);
    122                         _printf_("ocean melt received\n");
    123114                        xDelete<IssmDouble>(icebase);
    124115                        xDelete<IssmDouble>(oceangridx);
  • issm/trunk-jpl/src/c/main/issm_ocean.cpp

    r22490 r22656  
    3131        icecommsize=(int) strtol(argv[2], (char **)NULL, 10);
    3232
    33         printf("Ice: My global rank: %i My world size: %i \n",my_rank,my_size);
    34 
    3533        /*Split world into sub-communicators for each and every model:*/
    3634        ISSM_MPI_Comm_split(worldcomm,0, my_rank, &modelcomm);
     
    3836        ISSM_MPI_Comm_size(modelcomm,&my_local_size);
    3937
    40         printf("Ice: My global rank: %i My local rank: %i My world size: %i My local size: %i\n",my_rank,my_local_rank,my_size,my_local_size);
    41 
    4238        ISSM_MPI_Intercomm_create( modelcomm, 0, worldcomm, my_local_size, 0, &tomitgcmcomm);
    4339
    44 //      /*send an integer:*/
    45 //      int dummy1,dummy2;
    46 //      dummy1=3; dummy2=0;
    47 //      if(my_local_rank==0){
    48 //              MPI_Send(&dummy1,1,MPI_INT,0,1,tomitgcmcomm);
    49 //              MPI_Recv(&dummy2,1,MPI_INT,0,1,tomitgcmcomm,&status);
    50 //      }
    51 //      MPI_Bcast(&dummy2,1,MPI_INT,0,modelcomm);
    52 //      printf("Ice: dummy received: %i\n",dummy2);
    53 
    54         /*Initialize femmodel from arguments provided command line: */
    5540        FemModel *femmodel = new FemModel(argc,argv,modelcomm);
    5641       
Note: See TracChangeset for help on using the changeset viewer.