Hello,
I am trying to build sitecmp.exe (in /AMET_v14/tools_src/sitecmp). Here is what I did:
I change the FC flag in Makefile to pgf90 (as I am using pgi compiler) and IOAPI/NETCDF libraries path as my systems path (attached Makefile Makefile.txt (2.7 KB) ).
Modified path:
EXEC = sitecmp_v53.exe
FC = pgf90
CC = cc
IOAPI_INC = /root/Documents/softwares/ioapi3.2_install/ioapi-3.2-20200828/ioapi/fixed_src
IOAPI_LIB = /root/Documents/softwares/ioapi3.2_install/ioapi-3.2-20200828/Linux3
NETCDF_LIB = /usr/local/netcdf-4.7.4/lib
include_path = -I (IOAPI_LIB) \
-I (IOAPI_INC)
-I /usr/local/netcdf-4.7.4/include
-I /usr/local/netcdf-4.7.4/include
Hi @cjcoats
Thank you for your response. I am sorry I couldnât understand what you mean by " you need to re-start the CMAQ build from scratch using compiler-case pgi ".
I actually ran CAMx which was built by using pgi compiler and all other subsequent software such as IOPAI, COMBINE, NETCDF etc., were also built by pgi compiler.
AMET uses several of the CMAQ post-processors as tools for doing its own tasks, and generally the way it gets them is from a CMAQ-installation.
If youâre going to build them outside CMAQ, then you need a set of compile flags for the compiler youâre using; in my non-humble opinion, the way to get them ought to be to borrow them from the ioapi/Makeinclude.$BIN that was used to build your I/O API installation. Be aware that they are written using a non-Standard-conforming âfixed-132â source-code format (thatâs what the ioapi/fixed_src directory fir INCLUDE-files is about); the E132 make-variable in the Makeinclude.$BIN is your compilerâs flags for âfixed-132â source-code formatâŚ
I am using Makeinclude.Linux2_x86pg as you can see the first line of this file here : Makeinclude.Linux3.txt (1.9 KB) .
**While I was building ioapi; I modified following (as your suggestion in this post : Airs2m3 error 2 while compiling ioapi3.2 - #4 by cjcoats ** 1. In Makeinclude.$BIN file , I added -DIOAPI_NCF4=1 to the ARCHFLAGS as i did not create my netcdf library with --disable-netcdf-4 --disable-dap. 2. Used, FOPTFLAGS = -O2 -V -Mnosecond_underscore in ioapi/Makeinclude.$BIN
I couldnât find " FSTD = -Mextend -O2 -fast -V -Msecond_underscore" in $BIN (Linux3 folder in my system). Where can I find it? And how this is related to âsitecmpâ makefile (what changes to make in the makefile)?
OK, the sitecmp compile doesnât need any of the definitions ("-DâŚ" stuff), and you are using the -Mnosecond_underscore (contrary to your post above).
The FSTD stuff is one of the lines in your sitecmpMakefile, not the I/O API Makeinclude file; it needs to have a set of flags compatible with your ioapi/Makeinclude.$BIN
By the way, PGI changed the fixed-132-source-format from -extend to -Mextend at some point; thatâs one difference; isnât upward compatibility and the way it affects Makefiles wonderful ;-( ?
So, I changed FSTD flag in âsitecmpâ makefile ( Makefile.txt (2.7 KB) as your suggestion. WARN = **
** FSTD = -Mextend -O2 -fast -V -Msecond_underscore