File: compile_nwchem.sh

package info (click to toggle)
nwchem 7.0.2-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 1,134,820 kB
  • sloc: fortran: 4,903,090; ansic: 67,501; f90: 19,555; python: 17,912; java: 12,311; sh: 12,023; cpp: 9,896; perl: 6,123; csh: 4,345; makefile: 1,856; sed: 246; awk: 115; exp: 111; pascal: 76
file content (60 lines) | stat: -rwxr-xr-x 1,995 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/bin/bash
echo "start compile"
set -ev
# source env. variables
 source $TRAVIS_BUILD_DIR/travis/nwchem.bashrc
ls -lrt $TRAVIS_BUILD_DIR|tail -3
os=`uname`
arch=`uname -m`
if [[ "$NWCHEM_MODULES" == "tce" ]]; then 
    export EACCSD=1
    export IPCCSD=1
fi
cd $TRAVIS_BUILD_DIR/src
if [[ "$arch" == "aarch64" ]]; then 
    if [[ "$NWCHEM_MODULES" == "tce" ]]; then 
	FOPT2="-O0 -fno-aggressive-loop-optimizations"
    else
	FOPT2="-O1 -fno-aggressive-loop-optimizations"
    fi
else    
    FOPT2="-O2 -fno-aggressive-loop-optimizations"
fi    
 if [[ "$os" == "Darwin" ]]; then 
   if [[ "$NWCHEM_MODULES" == "tce" ]]; then
     FOPT2="-O1 -fno-aggressive-loop-optimizations"
   fi
   if [[ ! -z "$USE_SIMINT" ]] ; then 
       FOPT2="-O0 -fno-aggressive-loop-optimizations"
       SIMINT_BUILD_TYPE=Debug
       export PATH="/usr/local/opt/python@3.8/bin:$PATH"
#       export LDFLAGS="-L/usr/local/opt/python@3.8/lib:$LDFLAGS"
   fi
     ../travis/sleep_loop.sh make  FDEBUG="-O0 -g" FOPTIMIZE="$FOPT2" -j3
     cd $TRAVIS_BUILD_DIR/src/64to32blas 
     make
     cd $TRAVIS_BUILD_DIR/src
     ../contrib/getmem.nwchem 1000
     otool -L ../bin/MACX64/nwchem
#     printenv DYLD_LIBRARY_PATH
#     ls -lrt $DYLD_LIBRARY_PATH
#      tail -120 make.log
 elif [[ "$os" == "Linux" ]]; then
     if [[ "$arch" == "aarch64" ]]; then 
	 export MAKEFLAGS=-j8
     else    
	 export MAKEFLAGS=-j3
     fi
     ../travis/sleep_loop.sh make  FDEBUG="-O0 -g" FOPTIMIZE="$FOPT2" 
     cd $TRAVIS_BUILD_DIR/src/64to32blas 
     make
     cd $TRAVIS_BUILD_DIR/src
     $TRAVIS_BUILD_DIR/contrib/getmem.nwchem 1000
 fi
 #caching
 mkdir -p $TRAVIS_BUILD_DIR/.cachedir/binaries/$NWCHEM_TARGET $TRAVIS_BUILD_DIR/.cachedir/files
 cp $TRAVIS_BUILD_DIR/bin/$NWCHEM_TARGET/nwchem  $NWCHEM_EXECUTABLE
 echo === ls binaries cache ===
 ls -lrt $TRAVIS_BUILD_DIR/.cachedir/binaries/$NWCHEM_TARGET/ 
 echo =========================
 rsync -av $TRAVIS_BUILD_DIR/src/basis/libraries  $TRAVIS_BUILD_DIR/.cachedir/files/.