File tree Expand file tree Collapse file tree
source/source_lcao/module_operator_lcao/test Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33np=` cat /proc/cpuinfo | grep " cpu cores" | uniq| awk ' {print $NF}' `
44echo " nprocs in this machine is $np "
55
6+ # Allow OpenMPI run as root
7+ export OMPI_ALLOW_RUN_AS_ROOT=1
8+ export OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1
9+
610for i in 2 3 4; do
711 if [[ $i -gt $np ]]; then
812 continue
913 fi
1014 echo " TEST in parallel, nprocs=$i "
11- mpirun --allow-run-as-root - np $i ./MODULE_LCAO_operator_overlap_cd_test
15+ mpirun -np $i ./MODULE_LCAO_operator_overlap_cd_test
1216 e1=$?
13- mpirun --allow-run-as-root - np $i ./MODULE_LCAO_operator_overlap_test
17+ mpirun -np $i ./MODULE_LCAO_operator_overlap_test
1418 e2=$?
15- mpirun --allow-run-as-root - np $i ./MODULE_LCAO_operator_ekinetic_test
19+ mpirun -np $i ./MODULE_LCAO_operator_ekinetic_test
1620 e3=$?
17- mpirun --allow-run-as-root - np $i ./MODULE_LCAO_operator_nonlocal_test
21+ mpirun -np $i ./MODULE_LCAO_operator_nonlocal_test
1822 e4=$?
19- mpirun --allow-run-as-root - np $i ./MODULE_LCAO_operator_T_NL_cd_test
23+ mpirun -np $i ./MODULE_LCAO_operator_T_NL_cd_test
2024 e5=$?
2125 if [[ $e1 -ne 0 || $e2 -ne 0 || $e3 -ne 0 || $e4 -ne 0 || $e5 -ne 0 ]]; then
2226 echo -e " \e[1;33m [ FAILED ] \e[0m" \
Original file line number Diff line number Diff line change @@ -31,6 +31,10 @@ MPI_NP="${2:-4}"
3131SCRIPT_DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd) "
3232TEST_DIR=" $( pwd) "
3333
34+ # Allow OpenMPI run as root
35+ export OMPI_ALLOW_RUN_AS_ROOT=1
36+ export OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1
37+
3438echo " ========================================"
3539echo " SCF + NSCF Workflow"
3640echo " ========================================"
@@ -94,7 +98,7 @@ echo "-----------------"
9498echo " "
9599echo " [1/4] Running SCF calculation..."
96100cd " ${SCF_DIR} "
97- mpirun -np ${MPI_NP} --allow-run-as-root " ${ABACUS} " > scf.log 2>&1 || {
101+ mpirun -np ${MPI_NP} " ${ABACUS} " > scf.log 2>&1 || {
98102 echo " ERROR: SCF calculation failed!"
99103 echo " Check ${SCF_DIR} /scf.log for details"
100104 cd " ${TEST_DIR} "
146150# Step 4: Run NSCF calculation
147151# -------------------------------------------------------
148152echo " [3/4] Running NSCF calculation..."
149- mpirun -np ${MPI_NP} --allow-run-as-root " ${ABACUS} " > nscf.log 2>&1 || {
153+ mpirun -np ${MPI_NP} " ${ABACUS} " > nscf.log 2>&1 || {
150154 echo " ERROR: NSCF calculation failed!"
151155 echo " Check ${TEST_DIR} /nscf.log for details"
152156 exit 1
You can’t perform that action at this time.
0 commit comments