00001 """
00002 Definitions of RSF package
00003 """
00004
00005 __copyright__ = """
00006 Copyright 2008 Sean Ross-Ross
00007 """
00008 __license__ = """
00009 This file is part of SLIMpy .
00010
00011 SLIMpy is free software: you can redistribute it and/or modify
00012 it under the terms of the GNU Lesser General Public License as published by
00013 the Free Software Foundation, either version 3 of the License, or
00014 (at your option) any later version.
00015
00016 SLIMpy is distributed in the hope that it will be useful,
00017 but WITHOUT ANY WARRANTY; without even the implied warranty of
00018 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00019 GNU Lesser General Public License for more details.
00020
00021 You should have received a copy of the GNU Lesser General Public License
00022 along with SLIMpy . If not, see <http://www.gnu.org/licenses/>.
00023 """
00024
00025
00026 from slimpy_base.Environment.InstanceManager import InstanceManager
00027 from os import environ as _env
00028 from os.path import join
00029 from rsfContainer import rsf_data_container
00030 from rsf_mpi_contianer import rsf_mpidata_container
00031 from sfcommands import element, linear_ops, boolcmp, mpi_commands
00032
00033
00034
00035
00036 env = InstanceManager()
00037
00038
00039 def get_containers():
00040 """
00041 returns the rsf plugin data container
00042 """
00043
00044 if not _env.get( "RSFROOT", None ):
00045 raise NotImplementedError( "Environment Variable 'RSFROOT'"
00046 " needed for slim2rsf plugin, was not found" )
00047 slimvars = env['slimvars']
00048
00049 slimvars['RSFROOT'] = _env.get( "RSFROOT", "" ),'main rsf path'
00050 slimvars['RSFBIN'] = join( slimvars['RSFROOT'], "bin" ),'rsf binary path'
00051 slimvars['SEPROOT'] = _env.get( "RSFROOT", slimvars['RSFROOT'] ),'sep path set to RSFROOT if no sep environment'
00052 slimvars['SEPBIN'] = join( slimvars['SEPROOT'], "bin" ),'sep binary path'
00053
00054 slimvars['abridgeMap'][ slimvars['RSFBIN'] +'/'] = ''
00055 slimvars['abridgeMap'][ slimvars['SEPBIN'] +'/'] = ''
00056
00057
00058
00059 rsf_plugins = {}
00060 rsf_plugins[rsf_data_container.name] = rsf_data_container
00061 rsf_plugins['slim2rsf'] = rsf_data_container
00062 rsf_plugins["rsfmpi"] = rsf_mpidata_container
00063
00064 return rsf_plugins