I have checked the directory and found under this version of Ubuntu, the extraction of NWCHEM6.8 automatically went into two clips, which caused the strange mistakes during the compilation, and when they had been combined, the compilation of it on openmpi was successful.
I will retry mpich when I am free.