Skip to content

Commit

Permalink
added ifx as an option
Browse files Browse the repository at this point in the history
ifx mkmf.template
  • Loading branch information
hkershaw-brown committed Dec 11, 2023
1 parent 2851c07 commit a20971a
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 5 deletions.
25 changes: 25 additions & 0 deletions build_templates/mkmf.template.ifx.linux
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# DART software - Copyright UCAR. This open source software is provided
# by UCAR, "as is", without charge, subject to all terms of use at
# http://www.image.ucar.edu/DAReS/DART/DART_download
#

MPIFC = mpif90
MPILD = mpif90
FC = ifx
LD = ifx

# If your NETCDF environment variable is not set correctly,
# uncomment the following line and set value to where lib and include
# are found for the netcdf files that match this compiler.
#
# NETCDF = /opt/local

INCS = -I$(NETCDF)/include
LIBS = -L$(NETCDF)/lib -lnetcdff -lnetcdf
FFLAGS = -O -assume buffered_io $(INCS)
LDFLAGS = $(FFLAGS) $(LIBS)

# for development or debugging, use this instead:
# FFLAGS = -g -C -check noarg_temp_created -fpe0 \
# -fp-model precise -ftrapuv -traceback \
# -warn declarations,uncalled,unused $(INCS)
5 changes: 4 additions & 1 deletion developer_tests/build_everything/README
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ Run all quickbuilds.sh in the DART Repo at once

Usage: ./submit_jobs.sh

To run on a specific branch in DART: ./submit_jobs.sh branch_name
To run on a specific branch in DART:

./submit_jobs.sh branch_name

Find failed builds in logfile, e.g.:
grep -a FAILED build-everything-nvhpc.o2633030
20 changes: 17 additions & 3 deletions developer_tests/build_everything/run_all_quickbuilds.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@ if [[ -z $PBS_ENVIRONMENT ]]; then
fi

# Specify the mkmf template for each compiler
if [[ $compiler == "intel" ]]; then
if [[ $compiler == "ifort" ]]; then
mkmf_template="mkmf.template.intel.linux"
elif [[ $compiler == "ifx" ]]; then
mkmf_template="mkmf.template.ifx.linux"
elif [[ $compiler == "gcc" ]]; then
mkmf_template="mkmf.template.gfortran"
elif [[ $compiler == "cce" ]]; then
Expand Down Expand Up @@ -55,11 +57,23 @@ if [[ $? -ne 0 ]]; then
fi

# mkmf for chosen compiler
module load $compiler
case $compiler in
ifx ) module load intel-oneapi ;;
ifort ) module load intel-classic ;;
* ) module load $compiler ;;
esac

cp build_templates/$mkmf_template build_templates/mkmf.template

# Run fixsystem to avoid all make commands from altering mpi_*_utilities_mod.f90 simultaneously
cd assimilation_code/modules/utilities; ./fixsystem $compiler
cd assimilation_code/modules/utilities
case $compiler in
ifort ) ./fixsystem ifort ;;
gcc ) ./fixsystem gfortran ;;
cce ) ./fixsystem ftn ;;
nvhpc ) ./fixsystem nvfortran ;;
ifx ) ./fixsystem ifx ;;
esac
cd -

# Build preprocess once
Expand Down
2 changes: 1 addition & 1 deletion developer_tests/build_everything/submit_jobs.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

declare -a arr=("gcc" "intel" "cce" "nvhpc")
declare -a arr=("gcc" "ifort" "ifx" "cce" "nvhpc")

for compiler in "${arr[@]}"; do

Expand Down

0 comments on commit a20971a

Please sign in to comment.