EarthWorksOrg / EarthWorks

Other
3 stars 2 forks source link

CAM no longer builds with intel-oneapi compilers #35

Closed gdicker1 closed 6 months ago

gdicker1 commented 6 months ago

@dazlich discovered that the update to include ESCOMP/CAM cam6_3_148 in EarthWorksOrg/CAM #14 broke builds with the Intel-OneAPI compilers

Example of error message:

ERROR: Command: '/glade/u/home/dazlich/ewv2.1/post_relv21/components/cam/bld/configure -s -fc_type intel-oneapi -dyn mpas -hgrid mpasa120 -cpl nuopc -usr_src /glade/derecho/scratch/dazlich/frametest.intel-oneapi/SourceMods/src.cam -spmd -nosmp -ocn mpaso -dyn mpas -nlev=32 -mpas_libdir /glade/derecho/scratch/dazlich/frametest.intel-oneapi/bld/atm/obj/mpas' failed with error 'ERROR: intel-oneapi is not a valid value for parameter fc_type: valid values are cray,pgi,intel,gnu,pathscale,ibm,nag,nvhpc,pgi-gpu,nvhpc-gpu' from dir '/glade/derecho/scratch/dazlich/frametest.intel-oneapi/Buildconf/camconf'

This seems to be due to edits to bld/configure (near line 1685) that were introduced in the commit 14b6813 in ESCOMP/CAM as part of the changes in cam6_3_147. I think this could be fixed by either reverting this change or replacing the logic with correct Perl substring matching.

gdicker1 commented 6 months ago

Example fix from this StackOverflow comment:

if (index($str, $substr) != -1) {
    print "$str contains $substr\n";
} 

Instead of

if ($fc_type eq "oneapi") {$fc_type = 'intel'; }
dazlich commented 6 months ago

Jim Edwards just had a look and concurs with the example fix.

On Mar 8, 2024, at 1:10 PM, G. Dylan Dickerson @.***> wrote:

Example fix from this StackOverflow commenthttps://stackoverflow.com/a/7283308:

if (index($str, $substr) != -1) { print "$str contains $substr\n"; }

Instead of

if ($fc_type eq "oneapi") {$fc_type = 'intel'; }

gdicker1 commented 6 months ago

Jim Edwards just had a look and concurs with the example fix.

@dazlich, nice! Do you know if he's opening an issue about it in ESCOMP/CAM, or should I?

dazlich commented 6 months ago

This is from a meeting chat we are currently in:

Jim Edwards 1:27 PM if ($fc_type =~ /oneapi/) fc_type = 'intel’;

Jim says he’ll take care of it.

On Mar 8, 2024, at 1:29 PM, G. Dylan Dickerson @.***> wrote:

Caution: EXTERNAL Sender

Jim Edwards just had a look and concurs with the example fix.

@dazlichhttps://github.com/dazlich, nice! Do you know if he's opening an issue about it in ESCOMP/CAM, or should I?

— Reply to this email directly, view it on GitHubhttps://github.com/EarthWorksOrg/EarthWorks/issues/35#issuecomment-1986373103, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADS3XWCGAI4LQ3ILC7NFE43YXINSJAVCNFSM6AAAAABENLWIRGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOBWGM3TGMJQGM. You are receiving this because you were mentioned.Message ID: @.***>

gdicker1 commented 6 months ago

Gotcha, thanks Don.

gdicker1 commented 6 months ago

Closed by #32