#!/usr/bin/env perl use strict; my @dirs = ('../../ccsm_utils/Tools/per5lib', '../../ccsm_utils/Tools/perl5lib/Build'); unshift @INC, @dirs; require XML::Lite; use lib "../../ccsm_utils/Tools/perl5lib"; my $image_dir = "./images"; print <<"END_of_Start"; CESM Component Models Namelist Definitions

Search or Browse supported Machines

This page contains the complete list of machines available. They are grouped by categories designed to aid browsing. Clicking on the name of a variable will display descriptive information. If search terms are entered in the text box below, the list will be condensed to contain only matched variables. Note that the entries for each machine are placed into different xml files in the CASEROOT directory. A summary follows:
xml variable CASEROOT file
COMPILERS env_build.xml
COMPILER env_build.xml
MPILIBS env_build.xml
OS env_build.xml
GMAKE_J env_build.xml
EXEROOT env_build.xml
RUNDIR env_run.xml
DIN_LOC_ROOT env_run.xml
DIN_LOC_ROOT_CLMFORC env_run.xml
DOUT_S_ROOT env_run.xml
DOUT_L_MSROOT env_run.xml
CCSM_BASELINE env_run.xml
CCSM_CPRNC env_run.xml
BATCHQUERY env_run.xml
BATCHSUBMIT env_run.xml
MAX_TASKS_PER_NODE env_mach_pes.xml
PES_PER_NODE env_mach_pes.xml
SUPPORTED_BY documentation only


(separate search terms with spaces)

END_of_Start my ($file) = "../../ccsm_utils/Machines/config_machines.xml"; my $xml = XML::Lite->new( $file ); my $root = $xml->root_element(); # Check for valid root node my $name = $root->get_name(); $name eq "config_machines" or die "file $file is not a machines description file\n"; # Print table print_start_table("config_machines.xml variables"); my @e = $xml->elements_by_name( "machine" ); my %a = (); my $compilers; my $mpilibs; my $os; my $support; while ( my $e = shift @e ) { %a = $e->get_attributes(); my $var = $a{'MACH'}; my @children = $e->get_children(); my $doc = " All xml variables are in env_run.xml OTHER than \n MAX_TASKS_PER_NODE (env_mach_pes.xml),\n EXEROOT,GMAKE_J,COMPILERS,OS,MPILIBS (env_build.xml) \n\n"; foreach my $child (@children) { my $name = $child->get_name() ; my $text = $child->get_text() ; if ($name =~ m/COMPILERS/) { $compilers = $text; } if ($name =~ m/MPILIBS/) { $mpilibs = $text; } if ($name =~ m/OS/) { $os = $text; } if ($name =~ m/SUPPORTED_/) { $support = $text; } $doc = $doc . " $name: $text \n"; } print_row($var, $doc, $os, $compilers, $mpilibs, $support); } print_end_table(); # Finish print <<"END_of_html"; END_of_html #-------------------------------------------------------------------------------------------- sub print_start_table { my $hdr = shift; print <<"START_table";

$hdr

START_table } #-------------------------------------------------------------------------------------------- sub print_row { my $name = shift; my $doc = shift; my $os = shift; my $compilers = shift; my $mpilibs = shift; my $support = shift; print <<"END_of_row"; END_of_row } #-------------------------------------------------------------------------------------------- sub print_end_table { print <<"END_table";
Machine Name OS Compilers MPI Libs Support
$name $os $compilers $mpilibs $support
END_table } #--------------------------------------------------------------------------------------------