# scripts / static / binaries
# temporary standalone project version of mg-tetra_hpc.exe
SET(_bin_SCRIPTS
- mg-tetra_hpc.exe
+ mg-tetra_hpc.bash
mg-tetra_hpc.exe_Linux_64_avril2014
meshgems_mpi.c
meshgems_mpi.h
--- /dev/null
+#!/bin/bash
+
+#bash script mg-tetra_hpc.bash
+#we have renamed binary executable mg-tetra_hpc.exe V1.3.0 as mg-tetra_hpc.exe_Linux_64_avril2014
+#to assume call of other beta-versions of distene mg-tetra_hpc.exe code in standalone plugin GHS3DPRLPLUGIN sources
+#and also assume licence file set to overriding licence file of other distene products ( HEXOTIC, GHS3D, etc... )
+#this script is used for only one call of mg-tetra_hpc.bash from salome plugin GHS3DPRLPLUGIN
+
+#echo "mg-tetra_hpc.bash initial parameters are:" $1 $2 $3 $4
+echo "mg-tetra_hpc.bash initial parameters are:" $*
+#$0 is ignored
+
+CURRENTDIR=`pwd`
+COMPILDIR=`dirname $0`
+echo "COMPILDIR" $COMPILDIR
+echo "CURRENTDIR" $CURRENTDIR
+if [[ $HOSTNAME == *hpcspot* ]]
+ then
+ HOST="hpcspot"
+ else
+ HOST="STANDART_CentOs6" #CentOs6 default
+fi
+echo "HOST" $HOST
+
+#we need to compile for mg-tetra_hpc.exe
+if [ $HOST == "hpcspot" ]
+ then
+ #env openmpi centos6.5 hpcspot.com
+ source /apps/mpi/openmpi-1.6-x86_64-gcc48/env.sh
+ export DISTENE_LICENSE_FILE="Use global envvar: DLIM8VAR"
+ export DLIM8VAR="dlim8 1:1:29030@10.27.51.1/002590c96d98::8fbdc02cde090ca0369ad028e839065b97709e3c33e640eb6a3c2c7e40fe3985"
+ else
+ #env openmpi centos6.5 standart lgls is206786
+ export WD2=/usr/lib64/openmpi
+ export PATH=$WD2/bin:${PATH}
+ export LD_LIBRARY_PATH=$COMPILDIR:$WD2/lib:${LD_LIBRARY_PATH}
+ export DISTENE_LICENSE_FILE="Use global envvar: DLIM8VAR"
+ export DLIM8VAR="dlim8 1:1:29030@132.166.151.49/84c419b8::87af196ab2a936ab31363624539bff8096fbe1f3c83028c8f6b399b0a904ef85"
+fi
+
+cd $COMPILDIR
+if [ ! -f libmeshgems_mpi.so ]
+then
+ echo "libmeshgems_mpi.sols does not exist, I compile it..."
+ mpicc meshgems_mpi.c -shared -fPIC -o libmeshgems_mpi.so
+ ls -alt lib*
+fi
+cd $CURRENTDIR
+
+echo "mg-tetra_hpc.bash assume licence file set:"
+env | grep DLIM
+
+#mg-tetra_hpc.exe_Linux_64_avril2014 --help
+#ldd `which mg-tetra_hpc.exe_Linux_64_avril2014`
+mpirun -n $2 mg-tetra_hpc.exe_Linux_64_avril2014 ${@:3:30}
+
+
+++ /dev/null
-#!/bin/bash
-
-#bash script mg-tetra_hpc.exe
-#we have renamed binary executable mg-tetra_hpc.exe V1.3.0 as mg-tetra_hpc.exe_Linux_64_avril2014
-#to assume call of other beta-versions of distene mg-tetra_hpc.exe code in standalone plugin GHS3DPRLPLUGIN sources
-#and also assume licence file set to overriding licence file of other distene products ( HEXOTIC, GHS3D, etc... )
-#all that for for only one call of mg-tetra_hpc.exe from salome plugin GHS3DPRLPLUGIN
-
-#echo "mg-tetra_hpc.exe initial parameters are:" $1 $2 $3 $4
-echo "mg-tetra_hpc.exe initial parameters are:" $*
-#$0 is ignored
-
-export DISTENE_LICENSE_FILE="Use global envvar: DLIM8VAR"
-export DLIM8VAR="dlim8 1:1:29030@132.166.151.49/84c419b8::87af196ab2a936ab31363624539bff8096fbe1f3c83028c8f6b399b0a904ef85"
-
-CURRENTDIR=`pwd`
-COMPILDIR=`dirname $0`
-echo COMPILDIR $COMPILDIR
-echo CURRENTDIR $CURRENTDIR
-#we need to compile for mg-tetra_hpc.exe
-#env openmpi centos6.4
-export WD2=/usr/lib64/openmpi
-export PATH=.:$WD2/bin:${PATH}
-export LD_LIBRARY_PATH=.:$WD2/lib:${LD_LIBRARY_PATH}
-cd $COMPILDIR
-mpicc meshgems_mpi.c -shared -fPIC -o libmeshgems_mpi.so
-cd $CURRENTDIR
-
-echo "mg-tetra_hpc.exe assume licence file set:"
-env | grep DLIM
-
-#mg-tetra_hpc.exe_Linux_64_avril2014 --help
-ldd `which mg-tetra_hpc.exe_Linux_64_avril2014`
-mg-tetra_hpc.exe_Linux_64_avril2014 $*
-
-
Ok = false; //but it is not a problem but if true my message is overwritten
fclose(aResultFile);
cout<<"GHS3DPRL OK output master file "<<casenamemed<<".xml exist !\n\n";
- pluginerror = pluginerror + "new tetaedra not in memory, but stored in files "+ casenamemed + "_*.med";
+ pluginerror = pluginerror + "new tetraedra not in memory, but stored in files "+ casenamemed + "_*.med";
cout<<pluginerror<<endl;
error(COMPERR_ALGO_FAILED, pluginerror.ToCString());
if (!_KeepFiles) system( run_nokeep_files.ToCString() );
Ok = false; //but it is not a problem but if true my message is overwritten
fclose(aResultFile);
cout<<"GHS3DPRL OK output master file "<<casenamemed<<".xml exist !\n\n";
- pluginerror = pluginerror + "new tetaedra not in memory, but stored in files "+ casenamemed + "_*.med";
+ pluginerror = pluginerror + "new tetraedra not in memory, but stored in files "+ casenamemed + "_*.med";
cout<<pluginerror<<endl;
error(COMPERR_ALGO_FAILED, pluginerror.ToCString());
if (!_KeepFiles) system( run_nokeep_files.ToCString() );
//"tetrahpc -f exemple1 -n 4"
if (launchtetra=="yes"){
//tetra_hpc.exe --help
- //mpirun -n 3 tetra_hpc.exe --in GHS3DPRL.mesh --out TOTO.mesh
- cmd="mpirun -n "+cmd.sprintf("%d",nbfiles)+" tetra_hpc.exe --in "+
+ //mpirun -n 3 mg-tetra_hpc.exe --in GHS3DPRL.mesh --out TOTO.mesh
+
+ //direct mpirun cause problem: invalid
+ //cmd="mpirun -n "+cmd.sprintf("%d",nbfiles)+" mg-tetra_hpc.exe --in "+
+
+ //call tetra_hpc.bash is script which assumes mpirun after compilation openmpi etc...
+ cmd="mg-tetra_hpc.bash -n "+cmd.sprintf("%d",nbfiles)+" --in "+
pathini+casename+".mesh --out "+
pathini+casename+".mesh"+
" --merge_subdomains "+ToMergeSubdomains+