...
In essence an inherited build is where the build (i.e. compilation) settings for OpenIFS are not altered but are used or inherited by a new FCM configuration file placed in a separate directory. The new FCM configuration file only needs to specify what's different about the build, either the sources or compilation settings. The rest of the information is obtained by telling FCM to look at the OpenIFS configuration. A user may have a number of these separate configuration files each in separate directories for developing or testing independent code changes.
Note |
---|
Note! Before running these examples, make sure you have built the model by using the ' |
Example1: Modifying compilation options
...
Code Block |
---|
% fcm make -v -f change-fcflags.cfg [init] make # 2013-02-25 17:20:06Z [init] make config-parse # 2013-02-25 17:20:06Z [info] config-file=/openifs/inherit_tests/oifs/mymake/change-fcflags.cfg [info] config-file= - /openifs/inherit_tests/oifs/make/fcmcfg/oifs.cfg [info] config-file= - - /openifs/inherit_tests/oifs/make/fcmcfg/x86_64-gnu-opt.cfg [done] make config-parse # 0.3s [init] make dest-init # 2013-02-25 17:20:06Z [info] dest=nagc@elvira:/openifs/inherit_tests/oifs/mymake [info] mode=new [info] use=/openifs/inherit_tests/oifs/make [done] make dest-init # 0.0s [init] make build # 2013-02-25 17:20:06Z [info] sources: total=2192, analysed=0, elapsed-time=0.6s, total-time=0.0s [info] target-tree-analysis: elapsed-time=13.3s [info] compile 0.2 M uvclr.o <- ifs/phys_radi/uvclr.F90 [info] link 1.7 M master.exe <- programs/master.F90 [info] compile targets: modified=1, unchanged=2070, total-time=0.2s [info] compile+ targets: modified=0, unchanged=626, total-time=0.0s [info] ext-iface targets: modified=0, unchanged=1247, total-time=0.0s [info] install targets: modified=0, unchanged=120, total-time=0.0s [info] link targets: modified=1, unchanged=0, total-time=1.7s [info] TOTAL targets: modified=2, unchanged=4063, elapsed-time=25.3s [done] make build # 26.3s [done] make # 26.6s |
Notice the lines:
Code Block |
---|
[info] compile 0.2 M uvclr.o <- ifs/phys_radi/uvclr.F90
[info] link 1.7 M master.exe <- programs/master.F90 |
showing that FCM has noted the change in the compiler options for the file uvclr.F90, recompiled it and relinked the main executable.
If you now check the contents of this directory, you'll see:
Code Block |
---|
:% ls -R
build change-fcflags.cfg
./build:
bin o
./build/bin:
master.exe
./build/o:
uvclr.o |
As in the main 'make' directory, FCM has created a 'build' subdirectory which in this case only contains the object file of the routine uvclr and a new executable. You now have the original executable in 'oifs/make/build/bin/master.exe' and this modified one for testing/debugging.
Info | ||
---|---|---|
Experiment with this example by adding additional lines in the To verify the new compiler options are being used add the | ||
Note | ||
| ||
Before running this example, make sure you have built the model by using the ' |
HTML |
---|
<script type="text/javascript" src="https://software.ecmwf.int/issues/s/en_UKet2vtj/787/12/1.2.5/_/download/batch/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector.js?collectorId=5fd84ec6"></script> |
...