Skip to content
Snippets Groups Projects
Commit 3a6dd0f8 authored by Olivier Sauter's avatar Olivier Sauter
Browse files

add LD_LIBRARY_PATH for running torbeam from matlab

git-svn-id: https://spcsvn.epfl.ch/repos/TCV/gdat/trunk@12004 d63d8f72-b253-0410-a779-e742ad2e26cf
parent 857d5567
No related branches found
No related tags found
No related merge requests found
......@@ -66,8 +66,12 @@ for i=1:length(zzz.tb_out_files_to_cp_var)
catch
end
end
zzz.tbeg_abs=load('cntpr.dat');
zzz.tbeg_abs(2) = zzz.tbeg_abs(2) + 1; % counted from 0?
try
zzz.tbeg_abs=load('cntpr.dat');
zzz.tbeg_abs(2) = zzz.tbeg_abs(2) + 1; % counted from 0?
catch
warning('no cntpr.dat?')
end
% plots
......
......@@ -117,10 +117,10 @@ end
r0exp = torbeam_in.eqd_all.eqdsk{1}.r0;
if doload; disp(['time for reading data: ' num2str(toc)]); end
if doload,
nb_points_prof = 46;
rhofit = linspace(0,1,nb_points_prof);
rhofit = linspace(0,1,nb_points_prof)';
tb_par_fields=fieldnames(torbeam_in.inbeam.tb_par);
......@@ -141,7 +141,7 @@ if doload,
fprintf(fid,'%d\n',nb_points_prof);
% tefit = interpos(torbeam_in.nete.fit.rhopolnorm(:,it_te) , torbeam_in.nete.fit.te.data(:,it_te),rhofit,-1,[1 2],[0 0]);
tefit = interpos(torbeam_in.nete.fit.rhopolnorm(:,it_te) , torbeam_in.nete.fit.te.data(:,it_te),rhofit,-0.1,[1 0],[0 0]);
aa=[rhofit(end:-1:1)' , abs(tefit(end:-1:1))/1e3]; % in keV
aa=[rhofit(end:-1:1) , abs(tefit(end:-1:1))/1e3]; % in keV
fprintf(fid,'%.7f %.7f\n',aa');
fclose(fid);
% ne
......@@ -150,7 +150,7 @@ if doload,
fid=fopen(torbeam_in.fname{it}.ne,'w'); % ne.dat file etc per time
fprintf(fid,'%d\n',nb_points_prof);
nefit = interpos(torbeam_in.nete.fit.rhopolnorm(:,it_ne) , torbeam_in.nete.fit.ne.data(:,it_ne),rhofit,-0.1,[1 0],[0 0]);
aa=[rhofit(end:-1:1)' , abs(nefit(end:-1:1))/1e19]; % in 1e19
aa=[rhofit(end:-1:1) , abs(nefit(end:-1:1))/1e19]; % in 1e19
fprintf(fid,'%.6f %.6f\n',aa');
fclose(fid);
% topfile
......@@ -210,7 +210,7 @@ if doload,
end
disp(['time for creating all input files: ' num2str(toc)])
end
% run TORBEAM
current_dir = pwd;
eval(['cd ' torbeam_in.dir_torbeam])
......@@ -228,6 +228,11 @@ torbeam_out.shotfile.shot = shot;
torbeam_out.shotfile.t = torbeam_out.t;
tic
icount = 0;
ld_library_path=getenv('LD_LIBRARY_PATH'); % need /afs/@cell/common/soft/intel/ics2013/14.0/compiler/lib/intel64 (ok on toks but not toki now)
ij_intel = findstr(ld_library_path,'intel');
if isempty(ij_intel)
warning('no intel in LD_LIBRARY_PATH, torbeam may not run properly');
end
for it_eff=1:length(times_for_torbeam_eff)
it = it_inb_beam_on(it_eff);
unix(['cp ' torbeam_in.fname{it}.te ' Te.dat']);
......@@ -236,7 +241,7 @@ for it_eff=1:length(times_for_torbeam_eff)
disp([' t=' num2str(torbeam_in.inbeam.t(it_inb(it_eff))) ' beam=' num2str(find(torbeam_in.inbeam.beam_on(:,it_inb(it_eff)))','%d')]);
for ibeam=find(torbeam_in.inbeam.beam_on(:,it_inb(it_eff)))',
unix(['cp ' torbeam_in.fname{it}.inbeam{ibeam} ' inbeam.dat']);
[a,b]=unix('/afs/ipp-garching.mpg.de/home/o/osauter/TORBEAM/lib-OUT/a.out');
[a,b]=unix(['setenv LD_LIBRARY_PATH ' ld_library_path '; /afs/ipp-garching.mpg.de/home/o/osauter/TORBEAM/lib-OUT/a.out']);
icount = icount + 1;
imw = findstr('(MW)',b);
if ~isempty(imw)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment