ccm_close

CCM finalization

Routine:

ccm_close

Purpose:

Close the CCM package.

Minimal calling sequence:

call ccm_close()

Required Arguments:

NONE

Call with all Optional Arguments:

call ccm_close(the_err)
the_err :: integer, intent (out)
Error code 0 - success, != 0 failure.
See Specifying Optional Arguments for the syntax for using optional arguments.

Notes:

The call to Ccm_close is the last CCM routine in a program. If there is another communication package in use, such as MPI, then the finalization routines for that package needs to be called after ccm_init. Ccm_close sets a warning condition and the_err != 0 if ccm_init has not been called, or if ccm_close is called a second time.

Example:


program ccm_close_x1
    use ccm
    integer :: time_info_array(8),hour,min,sec,millisec
    integer :: the_err
    call ccm_init()
    call date_and_time(values=time_info_array)
    hour=time_info_array(5)
    min=time_info_array(6)
    sec=time_info_array(7)
    millisec=time_info_array(8)
    write(*,fmt="(""hello at "",i2.2,"":"",i2.2,"":"",i2.2,""."",i3.3)") &
        hour,min,sec,millisec
    call ccm_close(the_err)
    if(the_err .ne. 0)write(*,*)"error in ccm_close"
end program

Example output on 4 processors


[ccm_home:~/ccm/source] % ccm_close_x1
hello at 14:03:36.135
hello at 14:03:36.138
hello at 14:03:36.141
hello at 14:03:36.143
[ccm_home:~/ccm/source] % 

The call to ccm_init initializes the communication package. Each task gets and prints the time. The call to ccm_close closes the communication package.

Error conditions:


Back to API and user's guide