In order to support the default build for ESMF and support PIO dependent ESMF features we can add -lpioc to the linker flags using the below changes to Config.pl. A more robust solution would include scanning the esmf.mk to see if PIO was enabled within ESMF. There's an example of reading the esmf.mk for use_esmf_trace.
Here's the simplest solution, which works because the default build for ESMF installs lpioc into the LIB_ESMF directory.
print "Use PIO? (1-yes, 0-no, default=0): ";
$use_pio=<stdin>;
chomp($use_pio);
if($use_pio eq ""){
$use_pio = 0;
}
or we can use an environment variable that doesn't prompt the user
# USE_PIO does not prompt user
if ($ENV{USE_PIO} eq '1') {
$use_pio = 1;
}
if($use_pio == 1){
$ldflags = $ldflags." -lpioc";
}
In order to support the default build for ESMF and support PIO dependent ESMF features we can add -lpioc to the linker flags using the below changes to
Config.pl. A more robust solution would include scanning theesmf.mkto see if PIO was enabled within ESMF. There's an example of reading theesmf.mkforuse_esmf_trace.Here's the simplest solution, which works because the default build for ESMF installs lpioc into the LIB_ESMF directory.
or we can use an environment variable that doesn't prompt the user