Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

explicitly specify Fortran compiler for recent CDO versions to fix issues on non-x86_64 architectures #19735

Merged
merged 1 commit into from Jan 26, 2024

Conversation

bedroge
Copy link
Contributor

@bedroge bedroge commented Jan 26, 2024

For EESSI we ran into an issue when building CDO on Arm CPUs (also see EESSI/software-layer#427 (comment)):

cfortran.h:193:2: warning: #warning "Please specify the fortran compiler using -D flags. Try to guess the compiler used" [-Wcpp]
  193 | #warning "Please specify the fortran compiler using -D flags. Try to guess the compiler used"
      |  ^~~~~~~
cfortran.h:265:2: error: #error "cfortran.h:  Can't find your environment among:    - GNU gcc (gfortran) on Linux.                                           - MIPS cc and f7
7 2.0. (e.g. Silicon Graphics, DECstations, ...)         - IBM AIX XL C and FORTRAN Compiler/6000 Version 01.01.0000.0000         - VAX   VMS CC 3.1 and FORTRAN 5.4.        
                              - Alpha VMS DEC C 1.3 and DEC FORTRAN 6.0.                               - Alpha OSF DEC C and DEC Fortran for OSF/1 AXP Version 1.2           
   - Apollo DomainOS 10.2 (sys5.3) with f77 10.7 and cc 6.7.                - CRAY                                                                   - NEC SX-4 SUPER-UX     
                                                 - CONVEX                                                                 - Sun                                              
                      - PowerStation Fortran with Visual C++                                   - HP9000s300/s700/s800 Latest test with: HP-UX A.08.07 A 9000/730        - Lyn
xOS: cc or gcc with f2c.                                            - VAXUltrix: vcc,cc or gcc with f2c. gcc or cc with f77.                 -            f77 with vcc works;
 but missing link magic for f77 I/O.     -            NO fort. None of gcc, cc or vcc generate required names.    - f2c/g77:   Use #define    f2cFortran, or cc -Df2cFortran 
              - gfortran:  Use #define    gFortran,   or cc -DgFortran                              (also necessary for g77 with -fno-f2c option)               - NAG f90: Us
e #define NAGf90Fortran, or cc -DNAGf90Fortran              - Absoft UNIX F77: Use #define AbsoftUNIXFortran or cc -DAbsoftUNIXFortran     - Absoft Pro Fortran: Use #define 
AbsoftProFortran     - Portland Group Fortran: Use #define pgiFortran     - Intel Fortran: Use #define INTEL_COMPILER"
  265 | #error "cfortran.h:  Can't find your environment among:\
      |  ^~~~~

CDO's configure script does have some logic that sets -DgFortran on x86_64 Linux systems, but it doesn't do this for aarch64. This PR explicitly adds this flag to $CPPFLAGS for recent CDO versions, which resolves the issue.

@bedroge bedroge added bug fix EESSI Related to EESSI project aarch64 Related to Arm 64-bit (aarch64) labels Jan 26, 2024
@bedroge bedroge added this to the 4.x milestone Jan 26, 2024
@bedroge
Copy link
Contributor Author

bedroge commented Jan 26, 2024

@boegelbot please test @ generoso

@boegelbot
Copy link
Collaborator

@bedroge: Request for testing this PR well received on login1

PR test command 'EB_PR=19735 EB_ARGS= EB_CONTAINER= EB_REPO=easybuild-easyconfigs /opt/software/slurm/bin/sbatch --job-name test_PR_19735 --ntasks=4 ~/boegelbot/eb_from_pr_upload_generoso.sh' executed!

  • exit code: 0
  • output:
Submitted batch job 12756

Test results coming soon (I hope)...

- notification for comment with ID 1912678023 processed

Message to humans: this is just bookkeeping information for me,
it is of no use to you (unless you think I have a bug, which I don't).

@boegelbot
Copy link
Collaborator

Test report by @boegelbot
SUCCESS
Build succeeded for 4 out of 4 (4 easyconfigs in total)
cns1 - Linux Rocky Linux 8.5, x86_64, Intel(R) Xeon(R) CPU E5-2667 v3 @ 3.20GHz (haswell), Python 3.6.8
See https://gist.github.com/boegelbot/6c00341093348b268689ab05ccbc1bab for a full test report.

@bedroge
Copy link
Contributor Author

bedroge commented Jan 26, 2024

@boegelbot please test @ jsc-zen3

@bedroge
Copy link
Contributor Author

bedroge commented Jan 26, 2024

All builds with the EESSI bot for CDO 2.2.2 from this PR have succeeded as well, for 5 x86_64 CPUs and 3 aarch64 CPUs: EESSI/software-layer#427 (comment).

@boegelbot
Copy link
Collaborator

@bedroge: Request for testing this PR well received on jsczen3l1.int.jsc-zen3.fz-juelich.de

PR test command 'if [[ develop != 'develop' ]]; then EB_BRANCH=develop ./easybuild_develop.sh 2> /dev/null 1>&2; EB_PREFIX=/home/boegelbot/easybuild/develop source init_env_easybuild_develop.sh; fi; EB_PR=19735 EB_ARGS= EB_CONTAINER= EB_REPO=easybuild-easyconfigs EB_BRANCH=develop /opt/software/slurm/bin/sbatch --job-name test_PR_19735 --ntasks=8 ~/boegelbot/eb_from_pr_upload_jsc-zen3.sh' executed!

  • exit code: 0
  • output:
Submitted batch job 3496

Test results coming soon (I hope)...

- notification for comment with ID 1912734590 processed

Message to humans: this is just bookkeeping information for me,
it is of no use to you (unless you think I have a bug, which I don't).

@ocaisa
Copy link
Member

ocaisa commented Jan 26, 2024

LGTM

@boegelbot
Copy link
Collaborator

Test report by @boegelbot
SUCCESS
Build succeeded for 10 out of 10 (4 easyconfigs in total)
jsczen3c1.int.jsc-zen3.fz-juelich.de - Linux Rocky Linux 9.3, x86_64, AMD EPYC-Milan Processor (zen3), Python 3.9.18
See https://gist.github.com/boegelbot/06305579c557b4c3d2c3af3b2c68be9a for a full test report.

@ocaisa ocaisa merged commit 4a6a442 into easybuilders:develop Jan 26, 2024
9 checks passed
@bedroge bedroge deleted the cdo_specify_fortran_compiler branch January 27, 2024 05:48
@migueldiascosta migueldiascosta modified the milestones: 4.x, 4.9.1 Apr 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
aarch64 Related to Arm 64-bit (aarch64) bug fix EESSI Related to EESSI project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants