From 4d1cebf2b6ae0389b920f2d9e995e58945c07f78 Mon Sep 17 00:00:00 2001 From: edoapra Date: Mon, 4 Dec 2023 10:19:43 -0800 Subject: [PATCH 1/4] fix for xcode 15 linker --- src/config/fix_xcode15.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/config/fix_xcode15.sh b/src/config/fix_xcode15.sh index 61dda60087..ca024a6a93 100755 --- a/src/config/fix_xcode15.sh +++ b/src/config/fix_xcode15.sh @@ -5,8 +5,11 @@ if [[ $(uname -s) == "Darwin" ]]; then if [[ $( [ $xcode_v -ge 15 ] && echo 1) ]] ; then echo got xcode15 export GOT_XCODE15=1 - export OMPI_FCFLAGS=" -Wl,-ld_classic " - export OMPI_CFLAGS=" -Wl,-ld_classic -Wno-unused-command-line-argument " +#figure out where the open-mpi libs are + OMPILIBDIR=$(brew --cellar)/../opt/open-mpi/lib + export OMPI_LDFLAGS=" -ld_classic -L$OMPILIBDIR" +# export OMPI_FCFLAGS=" -Wl,-ld_classic " +# export OMPI_CFLAGS=" -Wl,-ld_classic -Wno-unused-command-line-argument " # export MPICH_FC="mpif90 -Wl,-ld_classic " # export MPICH_CC="mpicc -Wl,-ld_classic " # env|egrep MPICH_ From 3e6534142462c6aed5893e38221505522c8b86b3 Mon Sep 17 00:00:00 2001 From: edoapra Date: Mon, 4 Dec 2023 10:22:10 -0800 Subject: [PATCH 2/4] added macos-13 xcode 15.0.1 --- .github/workflows/github_actions.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/github_actions.yml b/.github/workflows/github_actions.yml index 2a0cd6c431..9319a513b9 100644 --- a/.github/workflows/github_actions.yml +++ b/.github/workflows/github_actions.yml @@ -398,6 +398,16 @@ jobs: cc: gcc blas: "brew_openblas" blas_size: 4 + - os: macos-13 + experimental: true + mpi_impl: openmpi + armci_network: MPI-TS + nwchem_modules: "nwdft driver solvation" + fc: gfortran + cc: gcc + blas: "brew_openblas" + blas_size: 4 + xcode_version: 15.0.1 fail-fast: false env: MPI_IMPL: ${{ matrix.mpi_impl }} From 298dee94af63cb85f113c770f3741e618ed3a603 Mon Sep 17 00:00:00 2001 From: edoapra Date: Mon, 4 Dec 2023 13:40:47 -0800 Subject: [PATCH 3/4] fix for wrong ga indices https://groups.google.com/g/nwchem-forum/c/3OQemLn_fKY --- src/cphf/cphf_solve2.F | 15 +++++++++++++++ src/cphf/cphf_solve3.F | 25 ++++++++++++++++++++++++- 2 files changed, 39 insertions(+), 1 deletion(-) diff --git a/src/cphf/cphf_solve2.F b/src/cphf/cphf_solve2.F index 0f841f88e0..e76d1dca05 100644 --- a/src/cphf/cphf_solve2.F +++ b/src/cphf/cphf_solve2.F @@ -48,6 +48,7 @@ c external file_write_ga,file_read_ga, file_read_ga_info integer vlen, nvirt, nmos(2), nbf_vecs, nsets integer bases(2), nbases, nvec, ncol,ndata + integer gtype,a_nrow,a_ncol character*255 title_vecs, basis_vecs character*20 scftype_vecs double precision residual @@ -428,6 +429,20 @@ c == copy solution (g_work) --> g_grad 2nd subspace===START shift=3 ! skip first subspace that corresponds to g_b m1=shift+1 m2=shift+nvec + call ga_inquire(g_grad, gtype, a_nrow, a_ncol) + if(m2.gt.a_ncol) then + if(ga_nodeid().eq.0) + W write(luout,*) + W ' cphf_solve2: g_grad wrong col indices', + M m2, ' gt ',a_ncol +chack + shift=a_ncol-1 + if(ga_nodeid().eq.0) + W write(luout,*) ' cph_solve2: reset shift=',shift + m1=1 + m2=nvec +! call errquit(' cphf_solve2: wrong patch indices',1,0) + endif call ga_copy_patch('n',g_work,1,vlen,1 ,nvec, & g_grad,1,vlen,m1,m2) c == copy solution (g_work) --> g_grad 2nd subspace===END diff --git a/src/cphf/cphf_solve3.F b/src/cphf/cphf_solve3.F index e5ba487a9a..945c1d19cd 100644 --- a/src/cphf/cphf_solve3.F +++ b/src/cphf/cphf_solve3.F @@ -855,6 +855,9 @@ c Date : 03-15-12 & g_grad_re(ncomp), & g_grad_im(ncomp) logical use_my_guess,lifetime + integer a_nrow,a_ncol + integer b_nrow,b_ncol + integer gtype c Note.- use_my_guess, stored in rtdb and used c to indicate if we are using a vector solution c taken from a file or not @@ -889,10 +892,30 @@ c n1= [sum_i nocc(i)*nvir(i)] * ncomp m1=shift+1 m2=shift+nvec endif ! ------------------------if-use_my_guess--END - do ipm = 1,ncomp + do ipm = 1,ncomp + call ga_inquire(g_grad_re(ipm), gtype, a_nrow, a_ncol) + if(m1.gt.a_nrow.or.m2.gt.a_ncol) then + if(ga_nodeid().eq.0) + W write(luout,*) + W ' cphf_solve3: g_grad_re wrong col indices', + M m2, ' gt ',a_ncol +chack + shift=a_ncol-1 + if(ga_nodeid().eq.0) + W write(luout,*) ' cph_solve2: reset shift=',shift + m1=1 + m2=nvec +c call errquit(' cphf_solve3: wrong patch indices',1,0) + endif call ga_copy_patch('n',g_grad_re(ipm),1,vlen,m1,m2, $ g_work_re(ipm),1,vlen,1 ,nvec) if (lifetime) then + call ga_inquire(g_grad_im(ipm), gtype, b_nrow, b_ncol) + if(1.gt.b_nrow.or.nvec.gt.b_ncol) then + write(luout,*) ipm,' g_grad_im wrong indices',1, nvec, + A ' gt ',b_nrow, b_ncol + call errquit(' cphf_solve3: wrong patch indices',2,0) + endif call ga_copy_patch('n',g_grad_im(ipm),1,vlen,m1,m2, $ g_work_im(ipm),1,vlen,1 ,nvec) endif From 54fab0bc7ba2ad548f0b494ff8944673b8c21fb0 Mon Sep 17 00:00:00 2001 From: edoapra Date: Mon, 4 Dec 2023 16:54:22 -0800 Subject: [PATCH 4/4] fix xcode version --- .github/workflows/github_actions.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/github_actions.yml b/.github/workflows/github_actions.yml index 9319a513b9..675b2288ee 100644 --- a/.github/workflows/github_actions.yml +++ b/.github/workflows/github_actions.yml @@ -292,7 +292,7 @@ jobs: armci_network: MPI-PR nwchem_modules: "qmandpw qmd" fc: gfortran-12 - xcode_version: 15.0 + xcode_version: 15.0.1 - os: macos-12 experimental: true mpi_impl: openmpi