Skip to content

Commit

Permalink
Merge pull request #1182 from virtualcell/1170-local-sim-M2-mac
Browse files Browse the repository at this point in the history
local sims fail on m2 mac due to hdf5 native libs
  • Loading branch information
jcschaff authored Mar 11, 2024
2 parents 20678d5 + 55f2994 commit 5af5a1e
Show file tree
Hide file tree
Showing 17 changed files with 1,315 additions and 720 deletions.
5 changes: 3 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,10 @@
<commons-discovery.version>0.5</commons-discovery.version>
<commons-io.version>2.4</commons-io.version>
<commons-lang.version>2.6</commons-lang.version>
<commons-lang3.version>3.12.0</commons-lang3.version>
<commons-lang3.version>3.13.0</commons-lang3.version>
<commons-math3.version>3.6.1</commons-math3.version>
<commons-pool2.version>2.5.0</commons-pool2.version>
<commons-text.version>1.11.0</commons-text.version>
<gson.version>2.9.1</gson.version>
<guava.version>33.0.0-jre</guava.version>
<guice.version>7.0.0</guice.version>
Expand All @@ -133,7 +134,7 @@
<jdom-contrib.version>1.1.3</jdom-contrib.version>
<jetty.version>9.4.29.v20200521</jetty.version>
<jfreechart.version>1.5.0</jfreechart.version>
<jhdf5.version>0.6.8</jhdf5.version>
<jhdf5.version>0.7.0-alpha</jhdf5.version>
<jhdf5-2-10.version>2.9</jhdf5-2-10.version>
<jmatio.version>1.0</jmatio.version>
<joda-time.version>2.3</joda-time.version>
Expand Down
11 changes: 0 additions & 11 deletions vcell-cli/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -88,17 +88,6 @@
<artifactId>log4j-core</artifactId>
<version>${log4j-core.version}</version>
</dependency>
<dependency>
<groupId>io.jhdf</groupId>
<artifactId>jhdf</artifactId>
<version>${jhdf5.version}</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j2-impl</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -374,16 +374,16 @@ public void run(Hashtable<String, Object> hashTable) throws Exception {
if(getClientTaskStatusSupport() != null){
getClientTaskStatusSupport().setMessage("Getting Simulation status...");
}
SimulationStatus simStatus =
PDEDataViewerPostProcess.this.getDataViewerManager().getRequestManager().getServerSimulationStatus(PDEDataViewerPostProcess.this.getSimulation().getSimulationInfo());
if(simStatus == null){
hashTable.put(SPATIAL_ERROR_KEY, "PostProcessing Image, no simulation status");
return;
}else if(!simStatus.isCompleted()){
//sim still busy, no postprocessing data
hashTable.put(SPATIAL_ERROR_KEY, "PostProcessing Image, waiting for completed simulation: "+simStatus.toString());
return;
}
// SimulationStatus simStatus =
// PDEDataViewerPostProcess.this.getDataViewerManager().getRequestManager().getServerSimulationStatus(PDEDataViewerPostProcess.this.getSimulation().getSimulationInfo());
// if(simStatus == null){
// hashTable.put(SPATIAL_ERROR_KEY, "PostProcessing Image, no simulation status");
// return;
// }else if(!simStatus.isCompleted()){
// //sim still busy, no postprocessing data
// hashTable.put(SPATIAL_ERROR_KEY, "PostProcessing Image, waiting for completed simulation: "+simStatus.toString());
// return;
// }
if(getClientTaskStatusSupport() != null){
getClientTaskStatusSupport().setMessage("Getting Post Process Info...");
}
Expand Down
30 changes: 30 additions & 0 deletions vcell-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,21 @@
<groupId>org.apache.commons</groupId>
<artifactId>commons-configuration2</artifactId>
<version>${commons-configuration2.version}</version>
<exclusions>
<exclusion>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.commons</groupId>
<artifactId>commons-text</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-text</artifactId>
<version>${commons-text.version}</version>
</dependency>
<dependency>
<groupId>commons-beanutils</groupId>
Expand All @@ -243,6 +258,21 @@
<artifactId>commons-pool2</artifactId>
<version>${commons-pool2.version}</version>
</dependency>
<dependency>
<groupId>io.jhdf</groupId>
<artifactId>jhdf</artifactId>
<version>${jhdf5.version}</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.scala-saddle</groupId>
<artifactId>jhdf5_2.10</artifactId>
Expand Down
12 changes: 5 additions & 7 deletions vcell-core/src/main/java/cbit/vcell/microscopy/FRAPOptData.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import java.io.File;
import java.util.Arrays;

import cbit.vcell.simdata.*;
import org.vcell.optimization.ProfileData;
import org.vcell.optimization.ProfileDataElement;
import org.vcell.util.ClientTaskStatusSupport;
Expand All @@ -27,12 +28,8 @@
import cbit.vcell.field.io.FieldDataFileOperationSpec;
import cbit.vcell.opt.Parameter;
import cbit.vcell.opt.SimpleReferenceData;
import cbit.vcell.simdata.DataOperation;
import cbit.vcell.simdata.DataOperation.DataProcessingOutputDataValuesOP.DataIndexHelper;
import cbit.vcell.simdata.DataOperation.DataProcessingOutputDataValuesOP.TimePointHelper;
import cbit.vcell.simdata.DataOperationResults;
import cbit.vcell.simdata.DataSetControllerImpl;
import cbit.vcell.simdata.SimDataConstants;
import cbit.vcell.solver.DefaultOutputTimeSpec;
import cbit.vcell.solver.Simulation;
import cbit.vcell.solver.TimeBounds;
Expand Down Expand Up @@ -196,11 +193,12 @@ public void refreshDimensionReducedRefData(final ClientTaskStatusSupport progres
//read results from netCDF file
File hdf5File = new File(getLocalWorkspace().getDefaultSimDataDirectory(), vcSimDataID.getID()+SimDataConstants.DATA_PROCESSING_OUTPUT_EXTENSION_HDF5);
//get dataprocessing output
Hdf5DataProcessingReaderPure hdf5DataProcessingReaderPure = new Hdf5DataProcessingReaderPure();
DataOperationResults.DataProcessingOutputInfo dataProcessingOutputInfo =
(DataOperationResults.DataProcessingOutputInfo)DataSetControllerImpl.getDataProcessingOutput(new DataOperation.DataProcessingOutputInfoOP(null/*no vcDataIdentifier OK*/,false,null), hdf5File);
hdf5DataProcessingReaderPure.getDataProcessingOutput(new DataOperation.DataProcessingOutputInfoOP(null/*no vcDataIdentifier OK*/,false,null), hdf5File);
DataOperationResults.DataProcessingOutputDataValues dataProcessingOutputDataValues =
(DataOperationResults.DataProcessingOutputDataValues)DataSetControllerImpl.getDataProcessingOutput(
new DataOperation.DataProcessingOutputDataValuesOP(null/*no vcDataIdentifier OK*/,FRAPStudy.ROI_EXTDATA_NAME,TimePointHelper.createAllTimeTimePointHelper(),DataIndexHelper.createSliceDataIndexHelper(0),null,null), hdf5File);
hdf5DataProcessingReaderPure.getDataProcessingOutput(
new DataOperation.DataProcessingOutputDataValuesOP(null/*no vcDataIdentifier OK*/,FRAPStudy.ROI_EXTDATA_NAME,TimePointHelper.createAllTimeTimePointHelper(),DataIndexHelper.createSliceDataIndexHelper(0),null,null), hdf5File);

// DataProcessingOutput dataProcessingOutput = getRawReferenceDataFromHDF5(hdf5File);
//get ref sim time points
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import java.util.BitSet;
import java.util.Random;

import cbit.vcell.simdata.*;
import org.vcell.util.ClientTaskStatusSupport;
import org.vcell.util.Extent;
import org.vcell.util.ISize;
Expand Down Expand Up @@ -37,13 +38,8 @@
import cbit.vcell.microscopy.FRAPData;
import cbit.vcell.microscopy.FRAPOptimizationUtils;
import cbit.vcell.microscopy.LocalWorkspace;
import cbit.vcell.simdata.Cachetable;
import cbit.vcell.simdata.DataIdentifier;
import cbit.vcell.simdata.DataOperation;
import cbit.vcell.simdata.DataOperation.DataProcessingOutputDataValuesOP.DataIndexHelper;
import cbit.vcell.simdata.DataOperation.DataProcessingOutputDataValuesOP.TimePointHelper;
import cbit.vcell.simdata.DataOperationResults;
import cbit.vcell.simdata.DataSetControllerImpl;
import cbit.vcell.solver.VCSimulationDataIdentifier;
import cbit.vcell.solver.VCSimulationIdentifier;
import cbit.vcell.solvers.CartesianMesh;
Expand Down Expand Up @@ -261,12 +257,13 @@ public void dataJobMessage(DataJobEvent event) {
public static FRAPData importFRAPDataFromHDF5Data(File inputHDF5File, Double maxIntensity, ClientTaskStatusSupport progressListener) throws Exception{
if(progressListener != null){
progressListener.setMessage("Loading HDF5 file " + inputHDF5File.getAbsolutePath() + "...");
}
}
Hdf5DataProcessingReaderPure hdf5DataProcessingReaderPure = new Hdf5DataProcessingReaderPure();
DataOperationResults.DataProcessingOutputInfo dataProcessingOutputInfo =
(DataOperationResults.DataProcessingOutputInfo)DataSetControllerImpl.getDataProcessingOutput(new DataOperation.DataProcessingOutputInfoOP(null/*no vcDataIdentifier OK*/,false,null), inputHDF5File);
hdf5DataProcessingReaderPure.getDataProcessingOutput(new DataOperation.DataProcessingOutputInfoOP(null/*no vcDataIdentifier OK*/,false,null), inputHDF5File);
DataOperationResults.DataProcessingOutputDataValues dataProcessingOutputDataValues =
(DataOperationResults.DataProcessingOutputDataValues)DataSetControllerImpl.getDataProcessingOutput(
new DataOperation.DataProcessingOutputDataValuesOP(null/*no vcDataIdentifier OK*/, SimulationContext.FLUOR_DATA_NAME,TimePointHelper.createAllTimeTimePointHelper(),DataIndexHelper.createSliceDataIndexHelper(0),null,null), inputHDF5File);
hdf5DataProcessingReaderPure.getDataProcessingOutput(
new DataOperation.DataProcessingOutputDataValuesOP(null/*no vcDataIdentifier OK*/, SimulationContext.FLUOR_DATA_NAME,TimePointHelper.createAllTimeTimePointHelper(),DataIndexHelper.createSliceDataIndexHelper(0),null,null), inputHDF5File);
ArrayList<SourceDataInfo> sdiArr =
dataProcessingOutputDataValues.createSourceDataInfos(
dataProcessingOutputInfo.getVariableISize(SimulationContext.FLUOR_DATA_NAME),
Expand Down
Loading

0 comments on commit 5af5a1e

Please sign in to comment.