Displaying differences for changeset
 
display as  

src/java/m/wrfhydro/V1_0.java

@@ -34,20 +34,19 @@
   protected void doProcess() throws Exception {
 
     // allow for num cores configuration
-    int act_cores = Runtime.getRuntime().availableProcessors() / 2;
-    int threads = act_cores + (act_cores / 2);
+    int threads = (int) (Runtime.getRuntime().availableProcessors() * 0.75);
     threads = Config.getInt("mpi.cores", threads);
-    threads = getIntParam("mpi.cores", threads);
+    threads = metainfo().getInt("mpi.cores", threads);
 
-    Executable mpi = getResourceExe(MPI);
-    File wh = getResourceFile(WRF_HYDRO);
+    Executable mpi = resources().getExe(MPI);
+    File wrf_hydro = resources().getFile(WRF_HYDRO);
 
     mpi.addArguments("--allow-run-as-root",
-        "--path", wh.getParent(),
+        "--path", wrf_hydro.getParent(),
         "-wdir", getWorkspaceDir(),
         "--oversubscribe",
         "-np", threads,
-        wh.getName()
+        wrf_hydro.getName()
     );
 
     int ret = mpi.exec();
@@ -55,5 +54,5 @@
       throw new ServiceException("Error running mpi wrf_hydro:" + ret);
     }
   }
-
+  
 }