CMAQ compilation

Hello,

I use a precompiled CMAQ code for a project. The owner of the project asked me to do the modeling using the current code. So, in order to be in a safe side, although it is a precompiled code, I run Makefile (using “make |& tee ./make.log” command), however, no new *.o file were generated. So, I did my modeling. For the second part, the owner of the project asked me to change some parameters in the code and then run Makefile (using “make |& tee ./make.log” command) to recompile it. Hence, some new *.o file and a new executable file were generated. Then, I started to run the model and submit my jobs in HPC. However, after sending the reports and CMAQ plots to the project’s owner, he told me I have not compiled the code. So, please tell me how I can prove that I compiled it?

Thank you in advance.

What does the command ls -lrt say in your BLD directory? If the executable is newer than the object files for the changed code is newer than the source-files for your changed code, that should be authoritative.

Before using “make |& tee ./make.log” command, I renamed the executable to *_OLD. I also deleted relevant *.o files.

Then use “make |& tee ./make.log” command and generate new *.o files and new executable in BLD directory (following screenshots).

Based on my above explanation and these screenshot, I am sure that I re-compile the code. However, I am curious why the project owner did not accept my reasoning and stated that the code was not re-compiled. Can you please help me in this regard?

I’m clueless (or, rather, he is).

For purposes of the future, if you had done cp -p … with the old executable, that would have preserved the time stamp. However, you do demonstrate the build-time of the new executable, and that it has a different size than the old one.

Hello,

Thank you very much for your response.

Here is “ls -lrt” command results for both DUST* (*.F and *.o) and both executables (old one and new one):

For your information, I changed fine- and coarse-mode split factors in DUST_EMIS.F on Feb. 11 2021 at 12:43pm (based on the above time stamp). Then, using “make |& tee ./make.log”, I re-compiled the code and new DUST_EMIS.o and new executable (i.e. CCTM_D502a_Linux3_x86_64intel) were generated on 12:45pm and 12:47pm, respectively.

How can I prove myself regarding re-compilation of the code?

Hello again,

Referring to my above explanation, I changed fine- and coarse-mode split factors in DUST_EMIS.F on Feb. 11 2021 at 12:43pm (based on the above time stamp). Then, using “make |& tee ./make.log”, I re-compiled the code and new DUST_EMIS.o and new executable (i.e. CCTM_D502a_Linux3_x86_64intel) were generated on 12:45pm and 12:47pm, respectively.

Can you please confirm if I follow the above instruction process, does it mean I do compilation of the code? Correct?

Thank you in advance.

Yes, you have generated a new DUST_EMIS.o and new executable by editing the DUST_EMIS.F and recompiling.
If you want to verify, put in a print statement inside your DUST_EMIS.F subroutine.

print*,‘Inside modified DUST_EMIS.F’
Then recompile again.
When you run CMAQ, you should see the above statement in the CTM_LOG* files.

Once you have verified, you should comment out that print statement and recompile.