Salome HOME
Merge remote branch 'origin/V7_dev'
[plugins/ghs3dprlplugin.git] / bin / mg-tetra_hpc.bash
1 #!/bin/bash
2
3 #bash script mg-tetra_hpc.bash
4 #we have renamed binary executable mg-tetra_hpc.exe V1.3.0 as mg-tetra_hpc.exe_Linux_64_avril2014
5 #to assume call of other beta-versions of distene mg-tetra_hpc.exe code in standalone plugin GHS3DPRLPLUGIN sources
6 #and also assume licence file set to overriding licence file of other distene products ( HEXOTIC, GHS3D, etc... )
7 #this script is used for only one call of mg-tetra_hpc.bash from salome plugin GHS3DPRLPLUGIN
8
9 #echo "mg-tetra_hpc.bash initial parameters are:" $1 $2 $3 $4 
10 echo "mg-tetra_hpc.bash initial parameters are:" $*
11 #$0 is ignored
12
13 CURRENTDIR=`pwd`
14 COMPILDIR=`dirname $0`
15 echo "COMPILDIR" $COMPILDIR
16 echo "CURRENTDIR" $CURRENTDIR
17 #if [[ $HOSTNAME == *hpcspot* ]]
18 #  then
19 #    HOST="hpcspot"
20 #  else
21 #    HOST="STANDART_CentOs6" #CentOs6 default
22 #fi
23 #echo "HOST" $HOST
24
25 #we need to compile for mg-tetra_hpc.exe
26 #DISTENE_LICENSE_FILE is for example, have to be set
27 #if [ $HOST == "hpcspot" ]
28 #  then
29     #env openmpi centos6.5 hpcspot.com
30 #    source /apps/mpi/openmpi-1.6-x86_64-gcc48/env.sh
31     #export DISTENE_LICENSE_FILE="Use global envvar: DLIM8VAR"
32     #export DLIM8VAR="dlim8 1:1:29030@10.27.51.1/002590c96d98::8fbdc02cde090ca0369ad028e839065b97709e3c33e640eb6a3c2c7e40fe3985"
33 #  else
34     #env openmpi centos6.5 standart lgls is206786
35 #    export WD2=/usr/lib64/openmpi
36 #    export PATH=$WD2/bin:${PATH}
37 #    export LD_LIBRARY_PATH=$COMPILDIR:$WD2/lib:${LD_LIBRARY_PATH}
38     #export DISTENE_LICENSE_FILE="Use global envvar: DLIM8VAR"
39     #export DLIM8VAR="dlim8 1:1:29030@132.166.151.49/84c419b8::87af196ab2a936ab31363624539bff8096fbe1f3c83028c8f6b399b0a904ef85"
40 #fi
41
42 cd $COMPILDIR
43 if [ ! -f libmeshgems_mpi.so ]
44 then
45   echo "libmeshgems_mpi.sols does not exist, I compile it..."
46   mpicc meshgems_mpi.c -shared -fPIC -o libmeshgems_mpi.so
47   ls -alt lib*
48 fi
49 cd $CURRENTDIR
50
51 echo "mg-tetra_hpc.bash assume licence file set:"
52 env | grep DLIM
53
54 #mg-tetra_hpc.exe_Linux_64_avril2014 --help
55 #ldd `which mg-tetra_hpc.exe_Linux_64_avril2014`
56 #mpirun -n $2 mg-tetra_hpc.exe_Linux_64_avril2014 ${@:3:30}
57 mpirun -n $2 $MESHGEMS_ROOT_DIR/bin/run_mg-tetra_hpc.sh ${@:3:30}
58
59