Skip to content

Commit

Permalink
Opium v3.8
Browse files Browse the repository at this point in the history
  • Loading branch information
aschankler committed Mar 26, 2021
1 parent 54a1b57 commit 9393e72
Show file tree
Hide file tree
Showing 12 changed files with 122 additions and 57 deletions.
16 changes: 8 additions & 8 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -3293,7 +3293,7 @@ case $ac_cv_host in
if test x"$CFLAGS" = "x-g"; then
CFLAGS="-O3"
fi
NOOPT="-O0 -r8"
NOOPT="-O0"
fi
;;
Expand All @@ -3312,12 +3312,12 @@ case $ac_cv_host in
else
LDFLAGS="$LDFLAGS -lUfor -lFutil -lfor"
fi
NOOPT="-O0 -r8"
NOOPT="-O0"
fi
;;
*86-pc-linux-*)
NOOPT="-O0 -r8"
NOOPT="-O0"
if test $FCT = pgf77 || test $FCT = pgf90; then
# Extract the first word of "pgf77", so it can be a program name with args.
set dummy pgf77; ac_word=$2
Expand Down Expand Up @@ -3367,7 +3367,7 @@ fi
if test $FCT = ifc || test $FCT = ifort; then
LD=$F77
LDFLAGS="$LDFLAGS -Vaxlib"
test x"$FFLAGS" = x-g && FFLAGS="-O3 -save -r8"
test x"$FFLAGS" = x-g && FFLAGS="-O3 -save -r8 -fp-model strict"
LDFLAGS="$LDFLAGS -L$i -static-libcxa"
if test $FCT = ifort; then
Expand Down Expand Up @@ -3410,7 +3410,7 @@ fi
if test $FCT = ifc || test $FCT = ifort; then
LD=$FCT
LDFLAGS="$LDFLAGS -Vaxlib"
test x"$FFLAGS" = x-g && FFLAGS="-O3 -save -r8 "
test x"$FFLAGS" = x-g && FFLAGS="-O3 -save -r8 -fp-model strict"
LDFLAGS="$LDFLAGS -L$i -static-libcxa"
if test $FCT = ifort; then
Expand Down Expand Up @@ -3444,7 +3444,7 @@ fi
*x86_64*linux-*)
NOOPT="-O0 -r8"
NOOPT="-O0"
if test $FCT = pgf77 || test $FCT = pgf90; then
# Extract the first word of "pgf77", so it can be a program name with args.
set dummy pgf77; ac_word=$2
Expand Down Expand Up @@ -3494,7 +3494,7 @@ fi
if test $FCT = ifc || test $FCT = ifort; then
LD=$FCT
LDFLAGS="$LDFLAGS -Vaxlib"
test x"$FFLAGS" = x-g && FFLAGS="-O3 -save -r8 "
test x"$FFLAGS" = x-g && FFLAGS="-O3 -save -r8 -fp-model strict"
LDFLAGS="$LDFLAGS -L$i -static-libcxa"
if test $FCT = ifort; then
Expand Down Expand Up @@ -3579,7 +3579,7 @@ fi
if test $FCT = fort77; then
NOOPT="-O0 -r8"
NOOPT="-O0"
FFLAGS="-r8 $FFLAGS"
if test "${f2c_libraries+set}" = set; then
LDFLAGS="-L$f2c_libraries $LDFLAGS"
Expand Down
16 changes: 8 additions & 8 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ dnl SGI's native C and fortran compilers
if test x"$CFLAGS" = "x-g"; then
CFLAGS="-O3"
fi
NOOPT="-O0 -r8"
NOOPT="-O0"
fi
;;

Expand All @@ -174,13 +174,13 @@ dnl alpha linux with Compaq (HP)'s ccc and fort compilers
else
LDFLAGS="$LDFLAGS -lUfor -lFutil -lfor"
fi
NOOPT="-O0 -r8"
NOOPT="-O0"
fi
;;

dnl 32 bit PC running linux
*86-pc-linux-*)
NOOPT="-O0 -r8"
NOOPT="-O0"
if test $FCT = pgf77 || test $FCT = pgf90; then
dnl do this to get the library path correct
AC_PATH_PROG([XPGF77],[pgf77],[huh],[$PATH])
Expand All @@ -192,7 +192,7 @@ dnl 32 bit PC running linux
if test $FCT = ifc || test $FCT = ifort; then
LD=$F77
LDFLAGS="$LDFLAGS -Vaxlib"
test x"$FFLAGS" = x-g && FFLAGS="-O3 -save -r8"
test x"$FFLAGS" = x-g && FFLAGS="-O3 -save -r8 -fp-model strict"
LDFLAGS="$LDFLAGS -L$i -static-libcxa"

if test $FCT = ifort; then
Expand Down Expand Up @@ -235,7 +235,7 @@ dnl 32 bit PC running linux
if test $FCT = ifc || test $FCT = ifort; then
LD=$FCT
LDFLAGS="$LDFLAGS -Vaxlib"
test x"$FFLAGS" = x-g && FFLAGS="-O3 -save -r8 "
test x"$FFLAGS" = x-g && FFLAGS="-O3 -save -r8 -fp-model strict"
LDFLAGS="$LDFLAGS -L$i -static-libcxa"

if test $FCT = ifort; then
Expand Down Expand Up @@ -270,7 +270,7 @@ dnl 32 bit PC running linux

dnl 64bit PC running linux
*x86_64*linux-*)
NOOPT="-O0 -r8"
NOOPT="-O0"
if test $FCT = pgf77 || test $FCT = pgf90; then
dnl do this to get the library path correct
AC_PATH_PROG([XPGF77],[pgf77],[huh],[$PATH])
Expand All @@ -282,7 +282,7 @@ dnl 64bit PC running linux
if test $FCT = ifc || test $FCT = ifort; then
LD=$FCT
LDFLAGS="$LDFLAGS -Vaxlib"
test x"$FFLAGS" = x-g && FFLAGS="-O3 -save -r8 "
test x"$FFLAGS" = x-g && FFLAGS="-O3 -save -r8 -fp-model strict"
LDFLAGS="$LDFLAGS -L$i -static-libcxa"

if test $FCT = ifort; then
Expand Down Expand Up @@ -329,7 +329,7 @@ AC_PATH_PROG([XFORT77],[fort77],[huh],[$PATH])

dnl looks like we are stuck with fort77 and f2c
if test $FCT = fort77; then
NOOPT="-O0 -r8"
NOOPT="-O0"
FFLAGS="-r8 $FFLAGS"
if test "${f2c_libraries+set}" = set; then
LDFLAGS="-L$f2c_libraries $LDFLAGS"
Expand Down
26 changes: 26 additions & 0 deletions doc/CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -401,17 +401,43 @@ Patch to enable partial core corrections for the .recpot (castep) format

6) worked more on gfortran compatibility

3.5 -> 3.6

1) Added fully-relativisitc psps -- needed significant modifications which resulted in many routines needed changing

2) Restored most if not all of the support for separate command line action (>>opium al log ae ; >>opium al log ps ; etc..) which had been lost in previous releases.

3) Implemented QuantumESPRESSO's upf version 1 psp output. Version 2 is in progress.

4) Added DNL modifications from Ben Truscott

5) Added Flexib corrections submitted by Keith Refson


3.6 -> 3.7

1) Added "teter" output which is format usable for frl/spin-orbit in ABINIT

2) Added "upf" (version 1) output which can be used for Quantum-Espresso (including frl/spin-orbit calculations)

3) Added "qso" output which is suitable for "QBOX" calculations

4) Added "QSOMesh" keyblock to define a linear mesh upon which the psp can be defined

5) Cleaned up a number of warning and error message output

6) Changed the printing in pwf and recpot output so gfortran will now work.

7) NOTE to MAC users: This will be the first Mac release that was prepared on "Lion". The Mac executable should be fine on older Intel systems, however, PPC Mac can no longer use the static Mac binary.


3.7 -> 3.8

1) Restored the PCC version number for the recpot output.

2) Added PCC for the QE upf output.

3) Cleaned up a lot of the printing errors for the gfortran version.



12 changes: 12 additions & 0 deletions makevars_static
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
CC=/share/apps/intel/Compiler/11.1/073/bin/ia32/icc
CFLAGS=-I../include -I../FlexiLib -I../uniPPlib -g -O2 -DCSYS=\"'Linux 2.6.9-42.ELsmp x86_64'\" -DCHOST=\"pzt.wm.edu\" -DCDATE=\"'Mon Apr 27 12:45:31 EDT 2009'\"
CPP=/share/apps/intel/Compiler/11.1/073/bin/ia32/icc -E
FC=/share/apps/intel/Compiler/11.1/073/bin/ia32/ifort
FFLAGS=-O2 -save -r8 -mp1
FPP=/usr/bin/cpp
FPPFLAGS=
LD=/share/apps/intel/Compiler/11.1/073/bin/ia32/ifort
LDFLAGS= -lm -Vaxlib -nofor_main -L/share/apps/intel/Compiler/11.1/073/lib -L/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib -static
RANLIB=ranlib
AR=/usr/bin/ar
NOOPT=-O0 -r8
15 changes: 0 additions & 15 deletions src/log

This file was deleted.

2 changes: 1 addition & 1 deletion src/main/opium.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
* *
****************************************************************************/

#define VERSION "3.7"
#define VERSION "3.8"
#ifndef CHOST
#define CHOST "unknown"
#endif
Expand Down
16 changes: 14 additions & 2 deletions src/output/do_qeupf.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ int do_qeupf(param_t *param, FILE *fp_param, char *logfile){
for (i=0; i<param->norb - param->nval; i++)
zeff -= param->wnl[i];


/* read in the local potential */
sprintf(filename, "%s.loc", param->name);
fp = fopen(filename, "rb");
Expand Down Expand Up @@ -142,14 +143,14 @@ int do_qeupf(param_t *param, FILE *fp_param, char *logfile){
fread(rnl[i], sizeof(double), param->ngrid, fp);
fclose(fp);
}

/* read in pcc */
if (param->rpcc > 0.){
sprintf(filename, "%s.rho_pcore", param->name);
fp = fopen(filename, "rb");
fread(rscore, sizeof(double), param->ngrid, fp);
fclose(fp);
}


/* First put in the param file: */

Expand Down Expand Up @@ -221,6 +222,17 @@ int do_qeupf(param_t *param, FILE *fp_param, char *logfile){
fprintf(fp," </PP_RAB>\n");
fprintf(fp,"</PP_MESH>\n");

if (param->rpcc > 1e-6){

fprintf(fp,"\n\n<PP_NLCC>\n");
for (i=0;i<param->ngrid;i++){
fprintf(fp,"%19.16le ",rscore[i]/rr[i]/rr[i]/4.0/M_PI);
if( (i+1)%4 == 0 ) fprintf(fp,"\n");
}
if(i%4 !=0 ) fprintf(fp,"\n");
fprintf(fp,"</PP_NLCC>\n");
}

fprintf(fp,"\n\n<PP_LOCAL>\n");
for (i=0;i<param->ngrid;i++){
fprintf(fp,"%19.16le ",nlcore[i]/rr[i]);
Expand Down
2 changes: 1 addition & 1 deletion src/output/do_recpot.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,5 +171,5 @@ void writeparam_(FILE *fpp, FILE *fpp_param, double *ecutev, int *version) {


fprintf(fpp, "END COMMENT \n");

fprintf(fpp, " 3 %d \n",*version);
}
4 changes: 3 additions & 1 deletion src/output/do_siesta.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
#define M_PI 3.14159265358979323846
#endif

#define MAX(a, b) (((a) > (b)) ? (a):(b))

#include "parameter.h" /* defines structure: 'param_t' */
#include "cdim.h" /* fortran code parameters */
#include "do_siesta.h" /* the module's own header */
Expand Down Expand Up @@ -211,7 +213,7 @@ int do_siesta(param_t *param, FILE *fp_param, char *logfile){
for (i=0; i<param->nval;i++){
if (param->npot[i]==0) {
ii=i+ncore;
fprintf(fp_out,"%d%c%5.2f r=%5.2f/",nlm_label(param->nlm[ii]).n,xao[nlm_label(param->nlm[ii]).l],param->wnl[ii],param->rc[i]);
fprintf(fp_out,"%d%c%5.2f r=%5.2f/",nlm_label(param->nlm[ii]).n,xao[nlm_label(param->nlm[ii]).l],MAX(param->wnl[ii],0),param->rc[i]);
}
}
fprintf(fp_out,"\n");
Expand Down
26 changes: 24 additions & 2 deletions src/output/nwrite.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ static int counter;

void nwrite_(FILE *fp, char *linetag, int *n, char *format, double *x){

if (counter==0) fprintf(fp, "%s", linetag);
if (counter==0) fprintf(fp, "%s", "E");

fprintf(fp, format, *x);

Expand All @@ -44,10 +44,32 @@ void nwrite_(FILE *fp, char *linetag, int *n, char *format, double *x){
counter=0;
}
}
void nwrite2_(FILE *fp, int *n, char *format, double *x){

fprintf(fp, format, *x);

if (counter<*n-1)
++counter;
else{
fprintf(fp, "\n");
counter=0;
}
}

void iwrite_(FILE *fp, char *linetag, int *n, char *format, int *x){

if (counter==0) fprintf(fp, "%s", linetag);
if (counter==0) fprintf(fp, "%s", "");

fprintf(fp, format, *x);

if (counter<*n-1)
++counter;
else{
fprintf(fp, "\n");
counter=0;
}
}
void iwrite2_(FILE *fp, int *n, char *format, int *x){

fprintf(fp, format, *x);

Expand Down
Loading

0 comments on commit 9393e72

Please sign in to comment.