Iāve used the command āwhich mpifortā, output on my system is:
/usr/bin/which: no mpifort in (/usr/local/bin/bin:/home/cmaq/cmaq_zl/installsf/netcdf_install/hdf5/bin:/usr/local/bin/bin:/home/cmaq/cmaq_zl/installsf/netcdf_install/hdf5/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/home/cmaq/.local/bin:/home/cmaq/bin:/usr/local/git/bin:/home/cmaq/cmaq_zl/installsf/mpich-install/bin:/usr/local/netcdf4.1.3/bin:/usr/local/netcdf4.1.3/include:/usr/local/netcdf4.1.3/lib:/usr/local/git/bin:/home/cmaq/cmaq_zl/installsf/mpich-install/bin:/usr/local/netcdf4.1.3/bin:/usr/local/netcdf4.1.3/include:/usr/local/netcdf4.1.3/lib)
And then I check the version of my complier using āgcc -vā&ā gfortran -vā :
**Do I have to upgrade gcc or/and gfortran to the latest versions? ** Do I need to reinstall the mpich-3.2.1 or install openmpi? Which libraries need to be reinstalled or compiled?
Error: Syntax error in COMMON statement at (1)
STATE3.EXT:191:27:
Error: Syntax error in COMMON statement at (1)
make: *** [pshut3.o] Error 1 ERROR while running make command
How did you solve this problem?
Kindly help me, please~
I have pgi available on our servers, I will install openmpi to try and reproduce the issue that you are seeing.
The error message states that you are using a Corrupt or Old Module file: ioapi/lib/m3utilio.mod.
Can you report the versions of underlying software that you are using to compile CMAQ and confirm that you have used the same pgf90 compiler to build openmpi, netCDF, and I/O API following instructions similar to the following draft tutorial
Also, be sure you are following these instructions once the openmpi, netcdf, netcdff and ioapi libraries are built:
pgf90 --version
mpif90 --version
Also be sure that the paths to the ioapi library are correct under the CMAQv5.3 directory
Here is what I have:
/proj/ie/proj/CMAS/CMAQ/CMAQv5.3_branch_pgi/pgi_19.7_openmpi_4.0.2/lib/x86_64/pgi/ioapi
Iāve installed GUN9.1.0 and PGI19.4 on my workstation, and builded netcdf-c-4.7.0, netcdf-f-4.4.5, ioapi3.2 with GUN. Maybe I used PGI because when I āmake checkā in installation of netcdf-f, I got an error: Make [2]: pgf77: command not found. So I have to install PGI7.1.6 and then āln -s pgf77 /PGI19.4install/binā.
Iāve checked the version of OPENMPI which was installed with PGI19.4 is openmpi-3.1.3.
In general, it is best not to mix compilers. If you are using GNU 9.1.0, then stick with that the whole way, to build everything.
For the make check step, you can set the F77 compiler to use the F90 compiler.
Or, if you have the PGI compiler, then use that for building all of the libraries.
If it is available on your server, use the module load command to set up your environment for the compiler, as the paths are automatically set up, along with the LD_LIBRARY_PATH for that compiler. If you donāt have the module load command option for both the compiler, and the openmpi layer, you may need to edit your .cshrc to add the paths so that when you run the configure command that it picks up the correct compiler.
For instance, the command āmodule showā allows you to see all of the environment variables that are set by default when you load that module.
module show openmpi_4.0.1/gcc_9.1.0
According to the ISO Fortran Standard, there are two āsource formatsā for Fortran source code ā the older ( f77 ) āfixedā format with code in columns 7-72 and continuation markers in column 6, and the ( f90 ) āfreeā format, with source in columns 1-132 and ampersand (ā&ā) for trailing continuation markers, as well as a specification for code which is acceptable to both forms.
Since it is used by various models that use āfreeā format, the I/O API carefully follows the Standard in this regard, and uses the ISO-app[roved āboth-formā format for its Fortran INCLUDE files.
Some of the modelsāin particular, CMAQ and SMOKE however, do notāinstead using a āfixed-132ā format. The I/O API Makefile has a way of dealing with this; the commands
cd /ioapi
make fixed_src
will create a new directory ioapi/fixed_src and populate it with copies of the INCLUDE files that have been edited to work with the non-Standard āfixed-132ā format. You will need to use these INCLUDE files with CMAQ and SMOKE.
Thank you for reply, but It didnāt succeed.
After I make fixed_src, I go back to compile CCTM. It still have the same error message.
Could you please give some advise for this situation?
Thank a lot!
Allen
Have you figure out this problem? I meet the same problem.
distr_env.c(36): catastrophic error: cannot open source file āmpi.hā #include āmpi.hā
^
compilation aborted for distr_env.c (code 4)
make: *** [distr_env.o] Error 4 ERROR while running make command
[General rule: include the full text of the compile-line at which the error occurred.]
Is the compiler mpicc?
If not, it should be.
If so, it indicates a mis-installation of your MPI ā mpicc and mpif90 are really wrappers around other āconventionalā compilers, that know about MPI include-files, libraries, etc., and use that knowledge to set up and then execute the conventional compilers, and this ācannot openā indicates that either MPI is not correctly installed or else that something is mucking around with the compile-flags to prevent mpicc from working correctly.
And without the text of the compile-line, I donāt have a clue which.