ccm_testing

Set and/ or set the CCM error checking flag

Routine:

ccm_testing

Purpose:

Close the CCM package.

Minimal calling sequence:

call ccm_testing()

Required Arguments:

NONE (although if called with no arguments, it does nothing)

Call with all Optional Arguments:

call ccm_testing(get_test,set_test)
get_test :: integer, intent (out)
The current value for the error checking flag, 0=off
set_test :: integer, intent (in)
The new value for the error checking flag, 0 = off
See Specifying Optional Arguments for the syntax for using optional arguments.

Notes:

The call to ccm_testing gets and/or sets the error checking flag. The value of the flag determines the type of error checking the collective communications routines perform. If the error checking flag is set to zero then there is essentially no run-time error checking performed by the routines. Possible values for the flag include:

Value Effect
ccm_alloff ccm_alloff=0, turn off all checking.
ccm_checksize Extensive checking of array sizes consistency across all processors. Will cause a increase in latency.
ccm_deadlock Check for deadlock situations. Essentially this forces a call to ccm_checkin("routine_name") in every collective communications routine call.
ccm_trace Print a message on entry to all collective communications routine calls.
ccm_internal Print a message on entry to some internal communications routine calls.

The value of the flag is additive

    i_test=ior(ccm_checksize,ccm_deadlock)
    call ccm_testing(set_test=i_test)

turns on both size and deadlock checking and

    call ccm_testing(get_test=i_old_test)
    i_test=ieor(i_old_test,ccm_deadlock)
    call ccm_testing(set_test=i_test)

will turn of deadlock testing.

See the individual routines for the type of checking performed when the flag is set to ccm_checksize.

If you call ccm_testing with both parameters it will return the old value of the flag and set it to the new value.

The default value for the flag is ccm_alloff=0.

Example:


program ccm_testing_x1
    use ccm
    integer :: the_err
    integer :: i_test,old_test
    call ccm_init(my_id,num_procs)
    call ccm_testing(get_test=old_test)
    if(my_id .eq. 0)then
    	if(old_test .eq. ccm_alloff)then
    	   write(*,*)"error checking is off"
    	else
           write(*,*)"error checking is on"
        endif
    endif
    call ccm_testing(set_test=ccm_checksize)
    call ccm_testing(get_test=old_test)
    if(my_id .eq. 0)then
        if(iand(old_test,ccm_checksize) .ne. 0)then
    		write(*,*)"checking array sizes"
    	else
    		write(*,*)"not checking array sizes"
        endif
    endif
    call ccm_close()
end program

Example output on 4 processors


[ccm_home:~/ccm/source] % ccm_testing_x1
error checking is off
checking array sizes
[ccm_home:~/ccm/source] % 

The call to ccm_init initializes the communication package. We get the testing flag and print that it is zero. Then we set it to ccm_checksize, get it again, and compare it to what we expect.

Error conditions:

NONE
Back to API and user's guide