Changeset 12155
- Timestamp:
- 05/01/12 07:28:25 (13 years ago)
- Location:
- issm/trunk-jpl/src
- Files:
-
- 2 added
- 1 deleted
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified issm/trunk-jpl/src/c/EnumDefinitions/Synchronize.sh ¶
r11643 r12155 6 6 7 7 #Removed existing files 8 rm $ISSM_ TIER/src/m/enum/*.m9 rm $ISSM_ TIER/src/c/modules/EnumToStringx/EnumToStringx.cpp10 rm $ISSM_ TIER/src/c/modules/StringToEnumx/StringToEnumx.cpp8 rm $ISSM_DIR/src/m/enum/*.m 9 rm $ISSM_DIR/src/c/modules/EnumToStringx/EnumToStringx.cpp 10 rm $ISSM_DIR/src/c/modules/StringToEnumx/StringToEnumx.cpp 11 11 12 12 #Get number of enums … … 15 15 #Build EnumToStringx.cpp {{{1 16 16 #Header 17 cat <<END > $ISSM_ TIER/src/c/modules/EnumToStringx/EnumToStringx.cpp17 cat <<END > $ISSM_DIR/src/c/modules/EnumToStringx/EnumToStringx.cpp 18 18 /* 19 19 * \file EnumToStringx.cpp: … … 35 35 END 36 36 #core 37 cat temp | awk '{print "\t\t" "case " $2" : return \"" substr($2,1,length($2)-4) "\";"}' >> $ISSM_ TIER/src/c/modules/EnumToStringx/EnumToStringx.cpp37 cat temp | awk '{print "\t\t" "case " $2" : return \"" substr($2,1,length($2)-4) "\";"}' >> $ISSM_DIR/src/c/modules/EnumToStringx/EnumToStringx.cpp 38 38 #Footer 39 cat <<END >> $ISSM_ TIER/src/c/modules/EnumToStringx/EnumToStringx.cpp39 cat <<END >> $ISSM_DIR/src/c/modules/EnumToStringx/EnumToStringx.cpp 40 40 default : return "unknown"; 41 41 … … 57 57 #Build StringToEnumx.cpp {{{1 58 58 #Header 59 cat <<END > $ISSM_ TIER/src/c/modules/StringToEnumx/StringToEnumx.cpp59 cat <<END > $ISSM_DIR/src/c/modules/StringToEnumx/StringToEnumx.cpp 60 60 /* 61 61 * \file StringToEnumx.cpp: … … 81 81 i2=120; 82 82 for (( i=1 ; i<=100 ; i++ )); do 83 echo " if(stage==$i){" >> $ISSM_ TIER//src/c/modules/StringToEnumx/StringToEnumx.cpp83 echo " if(stage==$i){" >> $ISSM_DIR//src/c/modules/StringToEnumx/StringToEnumx.cpp 84 84 awk -v i1=$i1 -v i2=$i2 '{if(NR>=i1 && NR<=i2) print $0 }' temp | 85 awk '{print "\t" ((NR==1)?" if":" else if") " (strcmp(name,\"" substr($2,1,length($2)-4) "\")==0) return " $2 ";"}' >> $ISSM_ TIER//src/c/modules/StringToEnumx/StringToEnumx.cpp86 echo " else stage=$(($i+1));" >> $ISSM_ TIER//src/c/modules/StringToEnumx/StringToEnumx.cpp87 echo " }" >> $ISSM_ TIER//src/c/modules/StringToEnumx/StringToEnumx.cpp85 awk '{print "\t" ((NR==1)?" if":" else if") " (strcmp(name,\"" substr($2,1,length($2)-4) "\")==0) return " $2 ";"}' >> $ISSM_DIR//src/c/modules/StringToEnumx/StringToEnumx.cpp 86 echo " else stage=$(($i+1));" >> $ISSM_DIR//src/c/modules/StringToEnumx/StringToEnumx.cpp 87 echo " }" >> $ISSM_DIR//src/c/modules/StringToEnumx/StringToEnumx.cpp 88 88 89 89 if [ $i2 -ge $NUMENUMS ]; then break; fi … … 93 93 94 94 #footer 95 cat <<END >> $ISSM_ TIER/src/c/modules/StringToEnumx/StringToEnumx.cpp95 cat <<END >> $ISSM_DIR/src/c/modules/StringToEnumx/StringToEnumx.cpp 96 96 /*If we reach this point, the string provided has not been found*/ 97 97 _error_("Enum %s not found",name); … … 127 127 #}}} 128 128 #Add case to matlabenum file{{{ 129 cat <<END > $ISSM_ TIER"/src/m/enum/"$(echo $NAMEENUM".m")129 cat <<END > $ISSM_DIR"/src/m/enum/"$(echo $NAMEENUM".m") 130 130 function macro=$(echo $NAMEENUM)() 131 131 %$(echo $NAMEENUM | awk {'print toupper($1)'}) - Enum of $(echo $NAME) -
TabularUnified issm/trunk-jpl/src/c/modules/MeshProfileIntersectionx/SegmentIntersect.cpp ¶
r11112 r12155 6 6 int SegmentIntersect(double* palpha, double* pbeta, double* x1, double* y1, double* x2, double* y2){ 7 7 8 /*See ISSM_ TIER/src/m/utils/Geometry/SegIntersect.m for matlab routine from which we take this routine: */8 /*See ISSM_DIR/src/m/utils/Geometry/SegIntersect.m for matlab routine from which we take this routine: */ 9 9 10 10 /*output: */ -
TabularUnified issm/trunk-jpl/src/c/shared/Numerics/Synchronize.sh ¶
r12018 r12155 2 2 #Synchronize Verbosity 3 3 #first remove existing files 4 rm $ISSM_ TIER/src/m/shared/Verb*.m4 rm $ISSM_DIR/src/m/shared/Verb*.m 5 5 6 6 echo "Synchronizing Verbosity levels..." … … 51 51 52 52 #Add Verbosity Matlab file{{{ 53 cat <<END > $ISSM_ TIER"/src/m/shared/"$(echo $FILENAME".m")53 cat <<END > $ISSM_DIR"/src/m/shared/"$(echo $FILENAME".m") 54 54 function bool=$(echo $FILENAME)() 55 55 %$(echo $FILENAME | awk {'print toupper($1)'}) - Return true if $(echo $LEVELNAME | awk {'print tolower($1)'}) level is activated … … 148 148 #}}} 149 149 #Complete verbose.m {{{1 150 VERBOSEPATH="$ISSM_ TIER/src/m/classes/verbose.m"150 VERBOSEPATH="$ISSM_DIR/src/m/classes/verbose.m" 151 151 cat $VERBOSEPATH | sed "/%BEGINFIELDS/,$ d" > temp_begin 152 152 cat $VERBOSEPATH | sed "1,/%ENDFIELDS/d" > temp_end -
TabularUnified issm/trunk-jpl/src/m/classes/clusters/generic.m ¶
r12030 r12155 13 13 port=0; 14 14 interactive=1; 15 codepath=[issm tier() '/bin'];16 executionpath=[issm tier() '/execution'];17 valgrind=[issm tier() '/externalpackages/valgrind/install/bin/valgrind'];18 valgrindlib=[issm tier() '/externalpackages/valgrind/install/lib/libmpidebug.so'];19 valgrindsup=[issm tier() '/externalpackages/valgrind/issm.supp'];15 codepath=[issmdir() '/bin']; 16 executionpath=[issmdir() '/execution']; 17 valgrind=[issmdir() '/externalpackages/valgrind/install/bin/valgrind']; 18 valgrindlib=[issmdir() '/externalpackages/valgrind/install/lib/libmpidebug.so']; 19 valgrindsup=[issmdir() '/externalpackages/valgrind/issm.supp']; 20 20 %}}} 21 21 end -
TabularUnified issm/trunk-jpl/src/m/classes/clusters/generic.py ¶
r12038 r12155 16 16 self.port=0 17 17 self.interactive=1 18 self.codepath=issm tier() + '/bin'19 self.executionpath=issm tier() + '/execution'20 self.valgrind=issm tier() + '/externalpackages/valgrind/install/bin/valgrind'21 self.valgrindlib=issm tier() + '/externalpackages/valgrind/install/lib/libmpidebug.so'22 self.valgrindsup=issm tier() + '/externalpackages/valgrind/issm.supp'18 self.codepath=issmdir() + '/bin' 19 self.executionpath=issmdir() + '/execution' 20 self.valgrind=issmdir() + '/externalpackages/valgrind/install/bin/valgrind' 21 self.valgrindlib=issmdir() + '/externalpackages/valgrind/install/lib/libmpidebug.so' 22 self.valgrindsup=issmdir() + '/externalpackages/valgrind/issm.supp' 23 23 #}}} 24 24 def __repr__(obj): -
TabularUnified issm/trunk-jpl/src/m/model/modis.m ¶
r9620 r12155 14 14 15 15 %Get path to gdal binaries 16 path_gdal=[issm tier() '/externalpackages/gdal/install/bin/'];16 path_gdal=[issmdir() '/externalpackages/gdal/install/bin/']; 17 17 18 18 %Was gdal compiled? 19 19 if ~exist([path_gdal 'gdal_translate']), 20 error(['modis error message: GDAL library needs to be compiled to use this routine. Compile GDAL in ' issm tier() '/externalpackages/gdal to use this routine.']);20 error(['modis error message: GDAL library needs to be compiled to use this routine. Compile GDAL in ' issmdir() '/externalpackages/gdal to use this routine.']); 21 21 end 22 22 -
TabularUnified issm/trunk-jpl/src/m/model/petscversion.m ¶
r11728 r12155 8 8 PETSC_VERSION=3; 9 9 10 configfile=[issm tier() '/config.h'];10 configfile=[issmdir() '/config.h']; 11 11 if ~exist(configfile,'file'), 12 12 error(['File ' configfile ' not found. ISSM has not been configured yet!']); -
TabularUnified issm/trunk-jpl/src/m/utils/DataProcessing/TracksToMatrix.m ¶
r8298 r12155 26 26 27 27 %Add path to dace 28 addpath([issm tier() '/externalpackages/dace/install'])28 addpath([issmdir() '/externalpackages/dace/install']) 29 29 30 30 %First create the x_m and y_m fot the matrix … … 82 82 83 83 %remove DACE path 84 rmpath([issm tier() '/externalpackages/dace/install']);84 rmpath([issmdir() '/externalpackages/dace/install']); -
TabularUnified issm/trunk-jpl/src/m/utils/Miscellaneous/issmdoc.m ¶
r11507 r12155 2 2 3 3 %First get ISSM tier: 4 ISSM_ TIER=issmtier;4 ISSM_DIR=issmdir; 5 5 6 6 disp(sprintf('\n%s',' A comprehensive documentation is available on http://issm.jpl.nasa.gov')); 7 7 disp(sprintf('\n%s',' Example: how to create a square ice shelf')); 8 disp(sprintf('%s',' go to ',ISSM_ TIER,'/examples/SquareIceshelf'));8 disp(sprintf('%s',' go to ',ISSM_DIR,'/examples/SquareIceshelf')); 9 9 disp(sprintf('%s',' md=model; %creates a new empty model structure')); 10 10 disp(sprintf('%s',' md=triangle(md,''DomainOutline.exp'',50000); %creates a mesh of the domain outline with a resolution of 50000m')); -
TabularUnified issm/trunk-jpl/src/m/utils/OS/ismumps.m ¶
r11596 r12155 6 6 7 7 8 configfile=[issm tier() '/bin/config.h']; %should find it in the install target8 configfile=[issmdir() '/bin/config.h']; %should find it in the install target 9 9 if ~exist(configfile,'file'), 10 10 error(['File ' configfile ' not found. ISSM has not been configured yet!']); -
TabularUnified issm/trunk-jpl/src/m/utils/OS/ispetsc.m ¶
r11727 r12155 6 6 7 7 8 configfile=[issm tier() '/bin/config.h']; %should find it in the install target8 configfile=[issmdir() '/bin/config.h']; %should find it in the install target 9 9 if ~exist(configfile,'file'), 10 10 error(['File ' configfile ' not found. ISSM has not been configured yet!']); -
TabularUnified issm/trunk-jpl/src/m/utils/OS/issmscpin.m ¶
r11525 r12155 32 32 %use the putty project pscp.exe: it should be in the path. 33 33 34 %get ISSM_ TIER variable35 [status,ISSM_ TIER]=system('echo [%ISSM_TIER_WIN%]');34 %get ISSM_DIR variable 35 [status,ISSM_DIR]=system('echo [%ISSM_DIR_WIN%]'); 36 36 if status, 37 error('scpin error message: could not find ISSM_ TIER_WIN envirnoment variable');37 error('scpin error message: could not find ISSM_DIR_WIN envirnoment variable'); 38 38 end 39 ISSM_ TIER=ISSM_TIER(2:end-2);39 ISSM_DIR=ISSM_DIR(2:end-2); 40 40 41 41 username=input('Username: (quoted string) '); … … 43 43 44 44 for i=1:numel(packages), 45 [status,result]=system([ISSM_ TIER '/externalpackages/ssh/pscp.exe -l "' username '" -pw "' key '" ' host ':' path '/' packages{i} ' ./']);45 [status,result]=system([ISSM_DIR '/externalpackages/ssh/pscp.exe -l "' username '" -pw "' key '" ' host ':' path '/' packages{i} ' ./']); 46 46 if status, 47 47 error('scpin error message: could not call putty pscp'); -
TabularUnified issm/trunk-jpl/src/m/utils/OS/issmscpout.m ¶
r9369 r12155 23 23 %use the putty project pscp.exe: it should be in the path. 24 24 25 %get ISSM_ TIER variable26 [status,ISSM_ TIER]=system('echo [%ISSM_TIER_WIN%]');25 %get ISSM_DIR variable 26 [status,ISSM_DIR]=system('echo [%ISSM_DIR_WIN%]'); 27 27 if status, 28 error('scpout error message: could not find ISSM_ TIER_WIN envirnoment variable');28 error('scpout error message: could not find ISSM_DIR_WIN envirnoment variable'); 29 29 end 30 ISSM_ TIER=ISSM_TIER(2:end-2);30 ISSM_DIR=ISSM_DIR(2:end-2); 31 31 32 32 username=input('Username: (quoted string) '); … … 34 34 35 35 for i=1:numel(packages), 36 [status,result]=system([ISSM_ TIER '/externalpackages/ssh/pscp.exe -l "' username '" -pw "' key '" ' packages{i} ' ' host ':' path]);36 [status,result]=system([ISSM_DIR '/externalpackages/ssh/pscp.exe -l "' username '" -pw "' key '" ' packages{i} ' ' host ':' path]); 37 37 if status, 38 38 error('scpout error message: could not call putty pscp'); -
TabularUnified issm/trunk-jpl/src/m/utils/OS/issmssh.m ¶
r9369 r12155 15 15 %use the putty project plink.exe: it should be in the path. 16 16 17 %get ISSM_ TIER variable18 [status,ISSM_ TIER]=system('echo [%ISSM_TIER_WIN%]');17 %get ISSM_DIR variable 18 [status,ISSM_DIR]=system('echo [%ISSM_DIR_WIN%]'); 19 19 if status, 20 error('issmssh error message: could not find ISSM_ TIER_WIN envirnoment variable');20 error('issmssh error message: could not find ISSM_DIR_WIN envirnoment variable'); 21 21 end 22 ISSM_ TIER=ISSM_TIER(2:end-2);22 ISSM_DIR=ISSM_DIR(2:end-2); 23 23 24 24 username=input('Username: (quoted string) '); 25 25 key=input('Key: (quoted string) '); 26 26 27 system([ISSM_ TIER '/externalpackages/ssh/plink.exe -ssh -l "' username '" -pw "' key '" ' host ' "' command '"']);27 system([ISSM_DIR '/externalpackages/ssh/plink.exe -ssh -l "' username '" -pw "' key '" ' host ' "' command '"']); 28 28 29 29 else -
TabularUnified issm/trunk-jpl/src/m/utils/Shell/flaimdir.m ¶
r11180 r12155 5 5 % FLAIM_DIR=flaimdir() 6 6 7 FLAIM_DIR=[issm tier '/externalpackages/flaim/install'];7 FLAIM_DIR=[issmdir '/externalpackages/flaim/install']; -
TabularUnified issm/trunk-jpl/src/m/utils/Shell/issmdir.m ¶
r11453 r12155 1 1 function ISSM_DIR=issmdir() 2 %ISSMDIR - Get ISSM_DIR environment variable contents.2 %ISSMDIR - Get ISSM_DIR environment variable 3 3 % 4 4 % Usage: … … 9 9 else 10 10 ISSM_DIR =getenv('ISSM_DIR_WIN'); 11 if strcmpi(ISSM_DIR(end),'/') | strcmpi(ISSM_DIR(end),'\'), 12 ISSM_DIR = ISSM_DIR(1:end-1); %shave off the last '/' 13 end 11 14 end 12 15
Note:
See TracChangeset
for help on using the changeset viewer.