diff --git a/Classes/DataBaseHandler/DBHandler.m b/Classes/DataBaseHandler/DBHandler.m index 6810357..e5fdc9b 100644 --- a/Classes/DataBaseHandler/DBHandler.m +++ b/Classes/DataBaseHandler/DBHandler.m @@ -47,15 +47,20 @@ classdef DBHandler < handle elseif options.type == "mysql" % datasource = "jdbc:mysql://134.245.243.254:3306/labor"; - - obj.conn = database( ... + if ismac + driverlocation = "/Users/silas/Documents/mysql-connector-j-9.6.0/mysql-connector-j-9.6.0.jar"; + else + driverlocation = "C:\Users\Silas\Documents\mysql-connector-j-9.3.0\mysql-connector-j-9.3.0.jar"; + end + + obj.conn = database( ... string(obj.dataBase), ... % Database name options.user, ... % Username options.password, ... % Password (or getSecret) "Vendor", "MySQL", ... "Server", options.server, ... "PortNumber", options.port, ... - "JDBCDriverLocation", "C:\Users\Silas\Documents\mysql-connector-j-9.3.0\mysql-connector-j-9.3.0.jar"); + "JDBCDriverLocation", driverlocation); end diff --git a/Functions/Job_Processing/loadAndSyncRunSignals.m b/Functions/Job_Processing/loadAndSyncRunSignals.m index 2c6e633..d1e03fa 100644 --- a/Functions/Job_Processing/loadAndSyncRunSignals.m +++ b/Functions/Job_Processing/loadAndSyncRunSignals.m @@ -112,6 +112,11 @@ end function path = composeStoragePath(storagePath, relativePath) relativePath = firstValue(relativePath); path = char(string(storagePath) + string(relativePath)); +if ismac + path = strrep(path,'\','/'); +else + path = strrep(path,'/','\'); +end end function value = firstValue(value) diff --git a/projects/Diss/MPI_revisit/investigate_mpi_algorithms.m b/projects/Diss/MPI_revisit/investigate_mpi_algorithms.m index 7dc53ac..61e4fac 100644 --- a/projects/Diss/MPI_revisit/investigate_mpi_algorithms.m +++ b/projects/Diss/MPI_revisit/investigate_mpi_algorithms.m @@ -4,11 +4,11 @@ dsp_options.mode = "run_id"; dsp_options.recipe = @mpi_recipe_dev; dsp_options.append_to_db = false; dsp_options.start_occurence = 1; -dsp_options.max_occurences = 15; -dsp_options.debug_plots = false; +dsp_options.max_occurences = 1; +dsp_options.debug_plots = true; -write_mpi_reduction_db = 1; -stream_mpi_reduction_db = 1; +write_mpi_reduction_db = 0; +stream_mpi_reduction_db = 0; mpi_reduction_study_name = "block_update_sweep"; mpi_reduction_writer_path = fullfile(fileparts(mfilename('fullpath')),"db"); addpath(mpi_reduction_writer_path); @@ -16,8 +16,13 @@ addpath(mpi_reduction_writer_path); dsp_options.database_type = "mysql"; dsp_options.dataBase = "labor"; -dsp_options.storage_path = "W:\labdata\ECOC Silas\ecoc_2025"; + +if ismac + dsp_options.storage_path = "/Volumes/media/labdata/ECOC Silas/ecoc_2025"; +else + dsp_options.storage_path = "W:\labdata\ECOC Silas\ecoc_2025"; +end dsp_options.server = "192.168.178.192"; dsp_options.port = 3306; dsp_options.user = "silas"; @@ -63,7 +68,7 @@ for i = 1 %% === Warehouse setup === dsp_options.userParameters = struct(); - dsp_options.userParameters.block_update = [1,2,4,8,16,32,64,112,224,448,448*2,1024,2048,4096,8192,16384];%%logspace(-3.8,-1,22);%[linspace(2,4096,22)]; + dsp_options.userParameters.block_update = 1;%[1,2,4,8,16,32,64,112,224,448,448*2,1024,2048,4096,8192,16384];%%logspace(-3.8,-1,22);%[linspace(2,4096,22)]; % dsp_options.userParameters.block_update = linspace(1,224,22); wh = DataStorage(dsp_options.userParameters);