Index: /issm/trunk-jpl/src/m/classes/clusters/generic.py
===================================================================
--- /issm/trunk-jpl/src/m/classes/clusters/generic.py	(revision 24600)
+++ /issm/trunk-jpl/src/m/classes/clusters/generic.py	(revision 24601)
@@ -1,6 +1,4 @@
-import socket
-import os
-import math
-import subprocess
+from socket import gethostname
+from subprocess import call
 from IssmConfig import IssmConfig
 from issmdir import issmdir
@@ -9,5 +7,5 @@
 from issmscpin import issmscpin
 from issmscpout import issmscpout
-import MatlabFuncs as m
+from MatlabFuncs import ispc
 try:
     from generic_settings import generic_settings
@@ -43,5 +41,5 @@
 
         #get name
-        self.name = socket.gethostname()
+        self.name = gethostname()
 
         #initialize cluster using user settings if provided
@@ -77,7 +75,7 @@
     def checkconsistency(self, md, solution, analyses):  # {{{
         if self.np < 1:
-            md = checkmessage(md, 'number of processors should be at least 1')
-        if math.isnan(self.np):
-            md = checkmessage(md, 'number of processors should not be NaN!')
+            md.checkmessage('number of processors should be at least 1')
+        if np.isnan(self.np):
+            md.checkmessage('number of processors should not be NaN!')
 
         return md
@@ -97,5 +95,5 @@
 
         # Write queueing script
-        if not m.ispc():
+        if not ispc():
             fid = open(modelname + '.queue', 'w')
             fid.write('#!/bin/sh\n')
@@ -153,5 +151,5 @@
     def BuildKrigingQueueScript(self, modelname, solution, io_gather, isvalgrind, isgprof):  # {{{
         #write queuing script
-        if not m.ispc():
+        if not ispc():
             fid = open(modelname + '.queue', 'w')
             fid.write('#!/bin/sh\n')
@@ -196,5 +194,5 @@
         if self.interactive:
             compressstring += ' {}.errlog {}.outlog '.format(modelname, modelname)
-        subprocess.call(compressstring, shell=True)
+        call(compressstring, shell=True)
 
         print('uploading input file and queueing script')
