0001 function install_LUKE
0002
0003
0004
0005
0006
0007
0008
0009
0010 disp(' ');
0011 disp(' ============= LUKE INSTALL =============');
0012 disp(' ');
0013 disp('The standard setup of LUKE is to add a function startup_LUKE.m in the startup.m file and save it in the same folder.');
0014 disp(' ');
0015 opt = input('Do you want to setup your startup file automatically? (y/n) [y] ? ','s');
0016 if isempty(opt),
0017 opt = 'y';
0018 end
0019
0020
0021
0022 if strcmp(opt,'y')
0023 [MatToolspath,MatRemotepath,MatHelppath] = LUKE_startup_jd;
0024
0025 addpath(MatToolspath)
0026 addpath(MatRemotepath)
0027 addpath([MatRemotepath,filesep,'Profiles'])
0028 addpath([MatRemotepath,filesep,'Bridge'])
0029 addpath(MatHelppath)
0030 addpath([MatHelppath,filesep,'m2html'])
0031 end
0032
0033
0034
0035 disp(' ');
0036 if isempty(which('select_LUKE.m')),
0037 disp('No path set to MatTools toolbox. Please download and/or set path to toolbox.')
0038 return
0039 end
0040 if isempty(which('load_remoteprofiles_jd.m')),
0041 disp('No path set to MatRemote toolbox. Please download and/or set path to toolbox.')
0042 return
0043 end
0044 if isempty(which('htmldocbuilder_yp.m')),
0045 disp('No path set to MatHelp toolbox. Please download and/or set path to toolbox.')
0046 return
0047 end
0048
0049 luke_root = [fileparts(which(mfilename)),filesep];
0050
0051
0052
0053 addpath([luke_root,'Project_DKE/Database/PATH_files']);
0054 make_path_LOCAL;
0055
0056
0057
0058 addpath([luke_root,'Project_DKE/DKE']);
0059 setpath_luke_jd(luke_root);
0060
0061 disp(' ');
0062 disp('The LUKE paths have been installed.');
0063 disp(' ');
0064
0065
0066
0067 dkepath = load_structures_yp('dkepath','','');
0068
0069
0070
0071
0072 disp(' ');
0073 opt = input_dke_yp('Do you want to rebuild the database (necessary for new installs and upgrades)','y',{'y','n'});
0074
0075 if opt == 'y',
0076 cd([luke_root,'Project_DKE/Database']);
0077 make_all;
0078 cd(luke_root);
0079 end
0080
0081
0082
0083 dkepathfields1 = fieldnames(dkepath);
0084
0085 for ifields1 = 1:length(dkepathfields1)
0086 if isstruct(dkepath.(dkepathfields1{ifields1})),
0087 dkepathfields2 = fieldnames(dkepath.(dkepathfields1{ifields1}));
0088 for ifields2 = 1:length(dkepathfields2)
0089 if ~isempty(strfind(dkepathfields2{ifields2},'mex')) && ~strcmp(dkepathfields2{ifields2},'helmex'),
0090 info_dke_yp(6,['Check that all external MEXfiles in ''',dkepath.(dkepathfields1{ifields1}).(dkepathfields2{ifields2}),''' folder have been been well compiled.'],0,'blue');
0091 end
0092 end
0093 end
0094 end
0095
0096 disp(['WARNING: automatic generation of the documentation can be a rather long process !']);
0097
0098 opt = input_dke_yp('Do you want to automatically generate the documentation','n',{'y','n'});
0099
0100 if opt == 'y',
0101 install_doc_LUKE;
0102 end
0103
0104 opt = input_dke_yp('Do you want to test MDCE capabilities','n',{'y','n'});
0105
0106 if opt == 'y' && isfield(dkepath,'remote') && ~isempty(dkepath.remote),
0107 test_mdce(3);
0108 else
0109 disp('distributed calculation with remcomputing not set up')
0110 end
0111
0112 opt = input_dke_yp('Do you want to run a simple test case','y',{'y','n'});
0113
0114 if opt == 'y',
0115
0116 cd([luke_root,'Simulations/Benchmarks/TScyl/LH_Karney']);
0117 disp('---------------------------------------------------------------------------')
0118 disp('-------------------------- SEQUENTIAL COMPUTING ---------------------------')
0119 disp('---------------------------------------------------------------------------')
0120 rundke;
0121 cd(dkepath.luke_root);
0122 end
0123
0124 opt = input_dke_yp('Do you want to run the test case with distributed calculation of collision integrals','n',{'y','n'});
0125
0126 if opt == 'y' && isfield(dkepath,'remote') && ~isempty(dkepath.remote),
0127 cd([dkepath.luke_root,'Simulations/Benchmarks/TScyl/LH_Karney']);
0128 disp('---------------------------------------------------------------------------')
0129 disp('-------------------------- DISTRIBUTED COMPUTING --------------------------')
0130 disp('---------------------------------------------------------------------------')
0131 rundke_cluster;
0132 cd(dkepath.luke_root);
0133 else
0134 disp('remote calculation not set up')
0135 end
0136
0137 opt = input_dke_yp('Do you want to run all tests and examples (long process, several hours)','n',{'y','n'});
0138 if opt == 'y',
0139 alltests_LUKE
0140 end
0141
0142 info_dke_yp(1,'The installation of LUKE is successfully done',1,'green');
0143
0144 end
0145
0146
0147
0148
0149