Index: src/sas/sasgui/guiframe/gui_manager.py
===================================================================
--- src/sas/sasgui/guiframe/gui_manager.py	(revision 67b0a99ce9f69a9dfef035e8e4a06588c9f1602f)
+++ src/sas/sasgui/guiframe/gui_manager.py	(revision 62243aeb8f20c8cfefb5567c634b33a9f0c23f81)
@@ -152,4 +152,5 @@
 SPLASH_SCREEN_HEIGHT = config.SPLASH_SCREEN_HEIGHT
 SS_MAX_DISPLAY_TIME = config.SS_MAX_DISPLAY_TIME
+SAS_OPENCL = config.SAS_OPENCL
 if not WELCOME_PANEL_ON:
     WELCOME_PANEL_SHOW = False
@@ -176,4 +177,5 @@
     else:
         DEFAULT_OPEN_FOLDER = PATH_APP
+    SAS_OPENCL = custom_config.SAS_OPENCL
 except:
     DATALOADER_SHOW = True
@@ -190,5 +192,5 @@
     CLEANUP_PLOT = False
     DEFAULT_OPEN_FOLDER = PATH_APP
-
+    SAS_OPENCL = None
 DEFAULT_STYLE = config.DEFAULT_STYLE
 
@@ -225,4 +227,7 @@
         CHILD_FRAME = wx.Frame
 
+#Initiliaze enviromental variable with custom setting but only if variable not set
+if SAS_OPENCL and not "SAS_OPENCL" in os.environ:
+    os.environ["SAS_OPENCL"] = SAS_OPENCL
 
 class ViewerFrame(PARENT_FRAME):
Index: src/sas/sasgui/guiframe/startup_configuration.py
===================================================================
--- src/sas/sasgui/guiframe/startup_configuration.py	(revision d85c194ea2f78cb2b9b3de9c969e1b8ebea6b6d2)
+++ src/sas/sasgui/guiframe/startup_configuration.py	(revision 62243aeb8f20c8cfefb5567c634b33a9f0c23f81)
@@ -31,5 +31,6 @@
                    'CLEANUP_PLOT':False,
                    'DEFAULT_PERSPECTIVE':'Fitting',
-                   'DEFAULT_OPEN_FOLDER': None}
+                   'DEFAULT_OPEN_FOLDER': None,
+                   'SAS_OPENCL': None}
 try:
     CURRENT_STRINGS = {'GUIFRAME_WIDTH':CURRENT.GUIFRAME_WIDTH,
@@ -45,5 +46,6 @@
                        'CLEANUP_PLOT':CURRENT.CLEANUP_PLOT,
                        'DEFAULT_PERSPECTIVE':CURRENT.DEFAULT_PERSPECTIVE,
-                       'DEFAULT_OPEN_FOLDER':CURRENT.DEFAULT_OPEN_FOLDER}
+                       'DEFAULT_OPEN_FOLDER':CURRENT.DEFAULT_OPEN_FOLDER,
+                       'SAS_OPENCL': None}
 except:
     CURRENT_STRINGS = DEFAULT_STRINGS
Index: src/sas/sasgui/perspectives/fitting/gpu_options.py
===================================================================
--- src/sas/sasgui/perspectives/fitting/gpu_options.py	(revision 6af411b914d5660ac9c7e007d69a3bf2c4cbf52f)
+++ src/sas/sasgui/perspectives/fitting/gpu_options.py	(revision 62243aeb8f20c8cfefb5567c634b33a9f0c23f81)
@@ -13,4 +13,5 @@
 import logging
 from sas.sasgui.guiframe.documentation_window import DocumentationWindow
+import imp
 
 class GpuOptions(wx.Dialog):
@@ -25,18 +26,23 @@
     def __init__(self, *args, **kwds):
 
-        from sas.sasgui.guiframe.customdir import SetupCustom
-
-        c_conf_dir = SetupCustom().setup_dir(PATH_APP)
-        self.custom_config = _find_local_config('custom_config', c_conf_dir)
-        if self.custom_config is None:
-            self.custom_config = _find_local_config('custom_config', os.getcwd())
-            if self.custom_config is None:
-                msgConfig = "Custom_config file was not imported"
-                logging.info(msgConfig)
-            else:
-                logging.info("using custom_config in %s" % os.getcwd())
-        else:
-            logging.info("using custom_config from %s" % c_conf_dir)
-        SAS_OPENCL_CUSTOM = custom_config.SAS_OPENCL
+        # from sas.sasgui.guiframe.customdir import SetupCustom
+        # from sas.sasgui.guiframe.gui_manager import get_app_dir, _find_local_config
+        #
+        # PATH_APP = get_app_dir()
+        # c_conf_dir = SetupCustom().setup_dir(PATH_APP)
+        # self.custom_config = _find_local_config('custom_config', c_conf_dir)
+        # if self.custom_config is None:
+        #     self.custom_config = _find_local_config('custom_config', os.getcwd())
+        #     if self.custom_config is None:
+        #         msgConfig = "Custom_config file was not imported"
+        #         logging.info(msgConfig)
+        #     else:
+        #         logging.info("using custom_config in %s" % os.getcwd())
+        # else:
+        #     logging.info("using custom_config from %s" % c_conf_dir)
+
+        # SAS_OPENCL_CUSTOM = None
+        # if self.custom_config.SAS_OPENCL:
+        #     SAS_OPENCL_CUSTOM = self.custom_config.SAS_OPENCL
 
         kwds["style"] = wx.DEFAULT_DIALOG_STYLE
@@ -52,7 +58,7 @@
         self.buttons = []
         #Check if SAS_OPENCL is already set as enviromental variable
-        self.sas_opencl =  os.environ["SAS_OPENCL"] \
-            if "SAS_OPENCL" in os.environ else SAS_OPENCL_CUSTOM
-        #or as a custom variable in the config file
+        self.sas_opencl = os.environ.get("SAS_OPENCL","")
+        #self.sas_opencl =  os.environ["SAS_OPENCL"] \
+        #    if "SAS_OPENCL" in os.environ else SAS_OPENCL_CUSTOM
 
         for clopt in clinfo:
@@ -65,5 +71,5 @@
             else:
                 self.option_button[clopt] = "None"
-                if self.sas_opencl.lower() == "none" :
+                if self.sas_opencl.lower() == "none":
                     button.SetValue(1)
 
@@ -174,10 +180,16 @@
         if self.sas_opencl:
             os.environ["SAS_OPENCL"] = self.sas_opencl
-            else:
+        else:
             if "SAS_OPENCL" in os.environ:
                 del(os.environ["SAS_OPENCL"])
-        sasmodels.kernelcl.ENV = None
-        #TODO: Write to config.py
-        self.custom_config.SAS_OPENCL = self.sas_opencl
+
+        try:
+            imp.find_module('sasmodels.kernelcl')
+            kernelcl_exist = True
+        except:
+            kernelcl_exist = False
+        if kernelcl_exist:
+            sasmodels.kernelcl.ENV = None
+            #self.custom_config.SAS_OPENCL = self.sas_opencl
 
         #Need to reload sasmodels.core module to account SAS_OPENCL = "None"
