IffGit has a new shared runner for building Docker images in GitLab CI. Visit https://iffgit.fz-juelich.de/examples/ci-docker-in-docker for more details.

machines.sh 2.84 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#This file contains the defaults for compiling FLEUR on known machines

#please add further definitions here and also add code below!
read -r -d '' known_machines << EOM
   IFF         -- cluster @ PGI of FZJ
   JURECA      -- @JSC
   JUQUEEN     -- @JSC
   CLAIX       -- @RWTH
   MARCONI     -- @CINECA 
EOM


function configure_machine(){
    
    if [ "$machine" = "JURECA" ] 
    then
	echo "JURECA configuration used"
18
	if module list 2>&1 |grep -q -i intel
19
20
	then
	    echo "Intel toolchain used"
21
	    if module list 2>&1| grep -q Python &&
22
23
               module list 2>&1| grep -q CMake &&
	       module list 2>&1| grep -q ELPA
24
               #module list 2>&1| grep -q HDF5 
25
	    then
26
		echo "All required modules load loaded"
27
	    else
28
29
		echo "You have to load the required modules"
		echo "module load Python/2.7.12 CMake HDF5 ELPA/2016.05.003-hybrid"
30
31
		exit
	    fi
Daniel Wortmann's avatar
Daniel Wortmann committed
32
	    cp $DIR/cmake/JURECA.cmake config.cmake
33
34
35
	elif module list 2>&1 |grep -q PGI
	then
	    echo "PGI toolchain used"
36
37
38
39
40
41
42
43
44
45
46
47
48
	    if module list 2>&1| grep -q MVAPICH2 &&
               module list 2>&1| grep -q CMake &&
	       [ -n "${MAGMA_ROOT}" ] &&
	       [ -n "${XML2_ROOT}" ] 
            then
		echo "All required modules loaded, all variables set"
	    else
		echo "Please do at least"
		echo "module load MVAPICH2 CMake"
		echo "And set the variables XML2_ROOT and MAGMA_ROOT"
		exit
	    fi
	    cp $DIR/cmake/JURECAGPU.cmake config.cmake
49
50
	else
	    echo "You have to load the correct modules for compiling"
Daniel Wortmann's avatar
Daniel Wortmann committed
51
	    echo " a) intel-para"
52
53
54
55
56
57
58
59
	    echo " or"
	    echo " b) PGI"
	    exit
	fi
    # JUQUEEN
    elif [ "$machine" = "JUQUEEN" ]
    then 
   	echo "JUQUEEN configuration used"
Daniel Wortmann's avatar
Daniel Wortmann committed
60
61
62
63
64
65
66
67
68
69
	if module list 2>&1| grep -q hdf5 &&
           module list 2>&1| grep -q scalapack
        then
           echo "All required modules load loaded"
	else
	   echo "You have to load the required modules"
	   echo "module load hdf5/1.8.15_BGQ scalapack/2.0.2_elpa_simd"
	   exit
	fi
        cp $DIR/cmake/JUQUEEN.cmake config.cmake
70
71
72
73
74
	
    #IFF linux cluster
    elif [ "$machine" = "IFF" ]
    then
	echo "IFF cluster configuration used"
Daniel Wortmann's avatar
Daniel Wortmann committed
75
76
	cp $DIR/cmake/IFF.cmake config.cmake

77
78
79
80
81
82
83
84
85
    #RWTH cluster
    elif [ "$machine" = "CLAIX" ]
    then
	echo "CLAIX@RWTH configuration used"
	if ! module list 2>&1| grep -q intelmpi
	then
	    echo "Please use intelmpi, e.g. do a module switch openmpi intelmpi"
	    exit
	fi
Daniel Wortmann's avatar
Daniel Wortmann committed
86
87
	cp $DIR/cmake/CLAIX.cmake config.cmake
module load LIBRARIES
88
89
90
91
92
93
94
    elif [ "$machine" = "MARCONI" ]
    then
	if ! module list 2>&1| grep -q " intel\/" || ! module list 2>&1| grep -q " intelmpi" ||! module list 2>&1| grep -q cmake
	then
	    echo "Load the modules needed to compile: intel,intelmpi,cmake"
	    exit
	fi
Daniel Wortmann's avatar
Daniel Wortmann committed
95
	cp $DIR/cmake/MARCONI.cmake config.cmake
96
97
98
99
100
101
102
103
104
105
    elif [ "$machine" = "AUTO" ] 
    then
	echo "No machine specific settings used"
	echo "GOOD LUCK!"
    else
	echo "No valid machine configuration specified"
	exit
    fi
}