[issm-svn] r22771 - in issm/trunk: packagers/macosx src/m/mesh/planet/gmsh
morlighe at issm.ess.uci.edu
morlighe at issm.ess.uci.edu
Tue May 15 08:27:05 PDT 2018
Author: morlighe
Date: 2018-05-15 08:27:05 -0700 (Tue, 15 May 2018)
New Revision: 22771
Modified:
issm/trunk/packagers/macosx/package.sh
issm/trunk/src/m/mesh/planet/gmsh/gmshplanet.m
Log:
CHG: fixing call to gmsh for workshop binaries
Modified: issm/trunk/packagers/macosx/package.sh
===================================================================
--- issm/trunk/packagers/macosx/package.sh 2018-05-15 15:23:55 UTC (rev 22770)
+++ issm/trunk/packagers/macosx/package.sh 2018-05-15 15:27:05 UTC (rev 22771)
@@ -6,11 +6,18 @@
echo "move mpiexec to bin"
cp ../externalpackages/mpich/install/bin/mpiexec .
cp ../externalpackages/mpich/install/bin/hydra_pmi_proxy .
+echo "move gmsh to bin"
if [ -f ../externalpackages/gmsh/install/gmsh ]; then
cp ../externalpackages/gmsh/install/gmsh .
else
echo "gmsh not found"
fi
+echo "move gmt to bin"
+if [ -f ../externalpackages/gmt/install/gmt ]; then
+ cp ../externalpackages/gmt/install/gmt .
+else
+ echo "gmt not found"
+fi
#Check that test101 runs
cd $ISSM_DIR/test/NightlyRun
Modified: issm/trunk/src/m/mesh/planet/gmsh/gmshplanet.m
===================================================================
--- issm/trunk/src/m/mesh/planet/gmsh/gmshplanet.m 2018-05-15 15:23:55 UTC (rev 22770)
+++ issm/trunk/src/m/mesh/planet/gmsh/gmshplanet.m 2018-05-15 15:27:05 UTC (rev 22771)
@@ -101,12 +101,23 @@
% }}}
end
+ %Find path to gmsh
+ paths = {[issmdir() '/bin/gmsh'],[issmdir() '/externalpackages/gmsh/install/gmsh']};
+ gmshpath = '';
+ for i=paths
+ if exist(i{1},'file'),
+ gmshpath = i{1}
+ end
+ end
+ if isempty(gmshpath),
+ error('gmt not found, make sure it is properly installed');
+ end
+
%call gmsh
if exist(options,'refine'),
- eval(['!gmsh -tol 1e-8 -2 sphere.geo -bgm sphere.pos']);
+ system([gmshpath ' -tol 1e-8 -2 sphere.geo -bgm sphere.pos']);
else
- %call gmsh
- eval(['!gmsh -tol 1e-8 -2 sphere.geo']);
+ system([gmshpath ' -tol 1e-8 -2 sphere.geo']);
end
%import mesh: {{{
@@ -162,7 +173,7 @@
mesh.long = atan2(mesh.y,mesh.x)/pi*180;
%erase files:
- eval(['!rm -rf sphere.geo sphere.msh sphere.pos']);
+ system('rm -rf sphere.geo sphere.msh sphere.pos');
%return mesh:
return;
More information about the issm-svn
mailing list