3 #bash script mg-tetra_hpc.bash
4 #could assume overriding set licence file of user/other new version distene products
5 #this script is used for only one call of mg-tetra_hpc.bash from salome plugin GHS3DPRLPLUGIN
7 #$0 have to be ignored: name of script
8 echo "mg-tetra_hpc.bash initial parameters are:\n "$@"\n"
10 #example mg-tetra_hpc_mpi v2.1.11
11 #mpirun -n 6 mg-tetra_hpc_mpi.exe --gradation 1.05 --max_size 0 --min_size 0 --verbose 3 --in /tmp/GHS3DPRL.mesh --out /tmp/GHS3DPRL_out.mesh
14 #this is for example, sometimes DISTENE_LICENSE_FILE have to be overriden
15 #if [ $HOST == "hpcspot" ]
17 # export DISTENE_LICENSE_FILE="Use global envvar: DLIM8VAR"
18 # export DLIM8VAR="dlim8 1:1:29030@10.27.51.1/002590c96d98::8fbdc02cde090ca0369ad028e839065b97709e3c33e640eb6a3c2c7e40fe3985"
20 # export DISTENE_LICENSE_FILE="Use global envvar: DLIM8VAR"
21 # export DLIM8VAR="dlim8 1:1:29030@132.166.151.49/84c419b8::87af196ab2a936ab31363624539bff8096fbe1f3c83028c8f6b399b0a904ef85"
25 #this is for example, sometimes need to compile stubs/libmeshgems_mpi.so for mg-tetra_hpc.exe, depends of openmpi system or not#CURRENTDIR=`pwd`
27 COMPILDIR=$MESHGEMSHOME/stubs #/export/home/prerequisites_SALOME_780/MeshGems-2.1-11/FROM_nothing/stubs
28 MPI_EXE=`which mg-tetra_hpc_mpi.exe`
29 TARGETDIR=$MESHGEMSHOME/lib/Linux_64 #/export/home/prerequisites_SALOME_780/MeshGems-2.1-11/FROM_nothing/lib/Linux_64
30 echo "CURRENTDIR=" $CURRENTDIR
31 #rm $TARGETDIR/libmeshgems_mpi.so #compile every times
32 #if [ ! -f $TARGETDIR/libmeshgems_mpi.so ]
34 echo "Compile libmeshgems_mpi.so with current openmpi:"
36 echo "COMPILDIR=" $COMPILDIR
37 echo "TARGETDIR=" $TARGETDIR
39 mpicc meshgems_mpi.c -DMESHGEMS_LINUX_BUILD -I../include -shared -fPIC -o $TARGETDIR/libmeshgems_mpi.so
40 find $MESHGEMSHOME -name "libmeshgems_mpi.so"
44 #example version mpi a mano
45 #cd /export/home/prerequisites_SALOME_780/MeshGems-2.1-11/FROM_nothing/stubs
46 #mpicc meshgems_mpi.c -DMESHGEMS_LINUX_BUILD -I../include -shared -fPIC -o libmeshgems_mpi.so
47 #cp -f libmeshgems_mpi.so /export/home/prerequisites_SALOME_780/MeshGems-2.1-11/FROM_nothing/lib/Linux_64/.
49 echo "mg-tetra_hpc.bash assume licence file set:"
50 echo DLIM8VAR=$DLIM8VAR
51 echo DISTENE_LICENSE_FILE=$DISTENE_LICENSE_FILE
53 #version multithread: why not use plugin/hypothesis mg-tetra.exe instead?
54 #which mg-tetra_hpc.exe
55 #echo mg-tetra_hpc.exe --max_number_of_threads $2 --number_of_subdomains $2 --in ... --out /tmp/GHS3DPRL_out.mesh --verbose 3
56 #for multithread only one /tmp/GHS3DPRL_out.mesh created...
57 #TODO create one med file from /tmp/GHS3DPRL_out.mesh if utile later
60 which mg-tetra_hpc_mpi.exe
61 #echo mpirun -n $2 mg-tetra_hpc_mpi.exe ${@:3:30}
62 echo mpirun -n $2 mg-tetra_hpc_mpi.exe --in /tmp/GHS3DPRL.mesh --out /tmp/GHS3DPRL_out.mesh
63 mpirun -n $2 mg-tetra_hpc_mpi.exe --in /tmp/GHS3DPRL.mesh --out /tmp/GHS3DPRL_out.mesh
65 #typically write files /tmp/GHS3DPRL_out.00000?.mesh & /tmp/GHS3DPRL_out.00000?.global