prism_get_ranklists.F90

Go to the documentation of this file.
00001 !-----------------------------------------------------------------------
00002 ! Copyright 2006-2010, CERFACS, Toulouse, France.
00003 ! Copyright 2006-2010, SGI Germany, Munich, Germany.
00004 ! Copyright 2006-2010, NEC Europe Ltd., London, UK.
00005 ! Copyright 2006-2010, Centre National de la Recherche Scientifique, Paris, France.
00006 ! All rights reserved. Use is subject to OASIS4 license terms.
00007 !-----------------------------------------------------------------------
00008 !BOP
00009 !
00010 ! !ROUTINE: PRISM_Get_ranklists
00011 !
00012 ! !INTERFACE:
00013 
00014    subroutine prism_get_ranklists ( comp_name, nb_ranklists, ranklists, ierror )
00015 !
00016 ! !USES:
00017 !
00018       use PRISM, dummy_interface => PRISM_Get_ranklists
00019 !
00020       use PSMILe_SCC
00021       use PSMILe
00022       implicit none
00023 
00024 !
00025 ! !INPUT PARAMETERS:
00026 !
00027       character(len=*), Intent (In)                    :: comp_name
00028 
00029       integer, Intent (In)                             :: nb_ranklists
00030 
00031 !
00032 ! !OUTPUT PARAMETERS:
00033 !
00034       integer, Dimension(nb_ranklists,3), Intent (Out) :: ranklists
00035 
00036 !     Number of rank lists
00037 
00038       integer, Intent (Out)                            :: ierror
00039 
00040 !     Returns the error code of prism_get_ranklists;
00041 !             ierror = 0 : No error
00042 !             ierror > 0 : Severe error
00043 !
00044 ! !LOCAL VARIABLES
00045 !
00046   Integer :: begin_ranklists, end_ranklists
00047 
00048   Integer :: index
00049 
00050   Integer, Parameter :: nerrp = 2
00051   Integer            :: ierrp(nerrp)
00052 !
00053 ! !DESCRIPTION:
00054 !
00055 !    Subroutine "prism_get_ranklists" gives the rank lists set
00056 !    for the component in the scc file.
00057 !
00058 ! !REVISION HISTORY:
00059 !   Date      Programmer   Description
00060 ! ----------  ----------   -----------
00061 ! 23.08.04    D. Declat    created
00062 !
00063 !EOP
00064 !----------------------------------------------------------------------
00065 !
00066 ! $Id: prism_get_ranklists.F90 2325 2010-04-21 15:00:07Z valcke $
00067 ! $Author: valcke $
00068 !
00069   Character(len=len_cvs_string), save :: mycvs = 
00070       '$Id: prism_get_ranklists.F90 2325 2010-04-21 15:00:07Z valcke $'
00071 !
00072 !----------------------------------------------------------------------
00073 #ifdef VERBOSE
00074       print *, trim(ch_id), ': prism_get_ranklists'
00075       call psmile_flushstd
00076 #endif /* VERBOSE */
00077 
00078 !-----------------------------------------------------------------------
00079 ! 1st Initialization
00080 !-----------------------------------------------------------------------
00081 
00082       ierror = 0
00083 
00084 !-----------------------------------------------------------------------
00085 ! 2nd get the info from the psmile info structure
00086 !-----------------------------------------------------------------------
00087       
00088       do index = 1, noComponents
00089          if ( trim(comp_name) == trim(PRISM_compName(index)) ) then
00090             exit
00091          endif
00092       enddo
00093 
00094       begin_ranklists = sum(PRISM_compRankSets(1:index-1))+1
00095       end_ranklists = begin_ranklists-1+PRISM_compRankSets(index)
00096       ranklists = PRISM_rankSets(begin_ranklists:end_ranklists,1:3)
00097 
00098       if ( ( end_ranklists - begin_ranklists + 1 ) > nb_ranklists ) then
00099 
00100          ierrp(1) = nb_ranklists
00101          ierrp(2) = end_ranklists - begin_ranklists + 1
00102 
00103          call psmile_error ( PRISM_Error_Parameter, 'Sizes of ranklists do not match', &
00104               ierrp, nerrp, __FILE__, __LINE__ )
00105       endif
00106 
00107 #ifdef VERBOSE
00108       print *, trim(ch_id), ': prism_get_ranklists: eof ierror ', ierror
00109       call psmile_flushstd
00110 #endif /* VERBOSE */
00111 !
00112    end subroutine prism_get_ranklists

Generated on 18 Mar 2011 for Oasis4 by  doxygen 1.6.1