-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrungms.MPI
131 lines (103 loc) · 4.36 KB
/
rungms.MPI
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
#!/bin/csh
# rungms.MPI is a rungms-like script for executing GAMESS calculation on
# distributed memory parallel system using MPI protocol.
#
# This script is tested on TAIWANIA cluster, NCHC, Taiwan, Intel Xeon
# cluster equiped with Intel Omni-Path high-speed interconnect.
# GAMESS on TAIWANIA was built with Intel Parallel Studio XE 2018 update 1
# and Intel Math Kernel Library (MKL) and Intel MPI library.
#
# Updated 20180708 Rangsiman Ketkaew [email protected]
# https://github.com/rangsimanketkaew/QM-on-TAIWANIA/
###########################################################################
# All welcome messages, general infomation, program resource,
# CPU timing summary, and job summary woule not be printed
# because this is not real rungms.
echo "/*****************************************************************************"
echo "This calculation was carried out by GAMESS program package executed by using"
echo "subgmsmpi program and rungms.MPI script, written by Rangsiman Ketkaew"
echo "Computational Chemistry Research Unit, Department of Chemistry,"
echo "Faculty of Science and Technology, Thammasat University, Thailand."
echo "[email protected] and https://github.com/rangsimanketkaew/QM-on-TAIWANIA"
echo "*****************************************************************************/"
echo ""
# TARGET is normally set to mpi in order to enable MPI method.
# SCR & USERSCR directories are set to directory where is
# network shared-file system, which large enough to store the
# temporary scratch files.
set TARGET=mpi
set SCR=TEMPLATE_1
set USERSCR=TEMPLATE_2
set GMSPATH=TEMPLATE_3
echo "Configuration and Settings created by rungms.MPI script."
echo "========================================================"
echo "TARGET is set to $TARGET"
echo "SCR is set to $SCR"
echo "USERSCR is set to $USERSCR"
echo "GMSPATH is set to $GMSPATH"
echo ""
# USER-defined MPI executable. Default setting is 'mpiexec' of
# Intel Studio Suite 2018
set CHECK_MPI = `which mpiexec.hydra`
if ( -e $CHECK_MPI ) then
set MPIEXE = "$CHECK_MPI"
echo "MPI executable is $MPIEXE"
echo ""
else
echo "Error: Intel MPI executable 'mpiexec.hydra' not found."
echo "This GAMESS runtime was built with Intel compiler and Intel MPI library."
echo "please purge all loaded module and load Intel module, e.g. 'intel/2018_u1'."
echo "If you have problem about Intel MPI, please talk to admin/staff of HPC."
exit 1
endif
# The following command lines are carefuly extracted from the
# original rungms. Please carefully modify the code in case
# you want to change the default setting. However, the default
# setting is the best solution.
set GET_JOB=$1
set VERNO=$2
set NCPUS=$3
echo "Assgined input file is $GET_JOB"
echo "GAMESS program version is $VERNO"
echo "Number of processors is $NCPUS"
echo ""
set JOB = `basename $GET_JOB .inp`
# Copy input to scratch directory.
# and define the path of all relavant files.
cp $JOB.inp $SCR/$JOB.F05
setenv INPUT $SCR/$JOB.F05
setenv TRAJECT $USERSCR/$JOB.trj
setenv RESTART $USERSCR/$JOB.rst
setenv DATA $USERSCR/$JOB.dat
echo "Following environment variables were set by SETENV command."
echo '$INPUT ' "Input file is $INPUT"
echo '$TRAJECT' "Trajectory file is $TRAJECT"
echo '$RESTART' "Restarting file is $RESTART"
echo '$DATA ' "Data file is $DATA"
# Delete trajectory and scratch files of previous calculation.
if ( -e $TRAJECT ) then
rm $TRAJECT
echo "$TRAJECT of previous calculation has been deleted."
endif
if ( -e $RESTART ) then
rm $RESTART
echo "$RESTART of previous calculation has been deleted."
endif
if ( -e $DATA ) then
rm $DATA
echo "$DATA of previous calculation has been deleted."
endif
echo ""
if ( ! -e $GMSPATH/gms-files.csh ) then
echo "Error: gms-files.csh not found in $GMSPATH directory."
exit 1
endif
source $GMSPATH/gms-files.csh
echo "GAMESS execute command: $MPIEXE -n $NCPUS $GMSPATH/gamess.$VERNO.x $INPUT"
echo ""
# GAMESS is clever to recognize input file from $JOB environment variable.
# Print of output will be defined in submission script of server scheduler.
# Normally, as default setting, base name of input will be used to name
# output automatically.
$MPIEXE -n $NCPUS $GMSPATH/gamess.$VERNO.x
# For run quick test on front-end node, the above command is validate.