Skip to content

Commit

Permalink
science/multiwfn: Update 3.4.1-0-14 → 3.8
Browse files Browse the repository at this point in the history
Reported by:	portscout
  • Loading branch information
yurivict committed Jun 20, 2023
1 parent 6eede89 commit 5893cd3
Show file tree
Hide file tree
Showing 6 changed files with 165 additions and 36 deletions.
52 changes: 39 additions & 13 deletions science/multiwfn/Makefile
@@ -1,29 +1,55 @@
PORTNAME= multiwfn
DISTVERSIONPREFIX= v
DISTVERSION= 3.4.1-0-14
PORTREVISION= 6
DISTVERSIONSUFFIX= -ge873677
DISTVERSION= 3.8
CATEGORIES= science
MASTER_SITES= http://sobereva.com/multiwfn/misc/:main \
https://www.dislin.de/downloads/unix/:dislin
DISTFILES= Multiwfn_${DISTVERSION}_dev_src_Linux.zip:main \
dislin-11.5.fbsd.64.tar.gz:dislin # (!!!) dislin is a closed-source library distributed as binary, source code is sold for $$

MAINTAINER= yuri@FreeBSD.org
COMMENT= Multifunctional wavefunction analysis for quantum chemistry
WWW= http://sobereva.com/multiwfn/index.html

LICENSE= GPLv2
LICENSE_FILE= ${WRKSRC}/LICENSE

LIB_DEPENDS= libopenblas.so:math/openblas
ONLY_FOR_ARCHS= amd64
ONLY_FOR_ARCHS_REASON= dislin is closed source only available for amd64

LIB_DEPENDS= libblas.so:math/blas \
liblapack.so:math/lapack \
libopenblas.so:math/openblas
RUN_DEPENDS= bash:shells/bash

USES= autoreconf gmake fortran shebangfix
SHEBANG_GLOB= *.sh
SHEBANG_FILES= init/Multiwfn.01
GNU_CONFIGURE= yes
USE_GITHUB= yes
GH_ACCOUNT= stecue
GH_PROJECT= gMultiwfn
USES= gl gmake fortran motif xorg
USE_GL= gl
USE_XORG= x11 xt

#SHEBANG_GLOB= *.sh
#SHEBANG_FILES= init/Multiwfn.01

#USE_GITHUB= yes
#GH_ACCOUNT= stecue
#GH_PROJECT= gMultiwfn

WRKSRC= ${WRKDIR}/Multiwfn_${DISTVERSION}_dev_src_Linux

FCFLAGS+= -ffree-line-length-none
LDFLAGS+= -lblas -llapack -lc

ALL_TARGET= default

BINARY_ALIAS= ifort=gfortran12 \
gcc=${CC}

PLIST_FILES= bin/Multiwfn \
lib/gMultiwfn/Multiwfn
bin/Multiwfn_noGUI

post-patch: # replace the dislin.a library with the FreeBSD version
@${CP} ${WRKDIR}/dislin-11.5/fbsd_64/lib/dislin_d-11.5.a ${WRKSRC}/dislin_d-11.0.a

do-install:
${INSTALL_PROGRAM} ${WRKSRC}/Multiwfn ${STAGEDIR}${PREFIX}/bin
${INSTALL_PROGRAM} ${WRKSRC}/Multiwfn_noGUI ${STAGEDIR}${PREFIX}/bin

.include <bsd.port.mk>
8 changes: 5 additions & 3 deletions science/multiwfn/distinfo
@@ -1,3 +1,5 @@
TIMESTAMP = 1535377138
SHA256 (stecue-gMultiwfn-v3.4.1-0-14-ge873677_GH0.tar.gz) = 39a902b179eae8733a95f5e778dbea4e8aa539a001c16b04876bafd72607a000
SIZE (stecue-gMultiwfn-v3.4.1-0-14-ge873677_GH0.tar.gz) = 28537523
TIMESTAMP = 1687240327
SHA256 (Multiwfn_3.8_dev_src_Linux.zip) = 095db5b93d289792e7e000781749285469c2442e65c32b5f7a7a9f9d6fd8f006
SIZE (Multiwfn_3.8_dev_src_Linux.zip) = 3813120
SHA256 (dislin-11.5.fbsd.64.tar.gz) = 8057930c80b6cd59977060bbfe8f6deb51da4c4ed1509181c8286de3c8bdb203
SIZE (dislin-11.5.fbsd.64.tar.gz) = 13058354
46 changes: 46 additions & 0 deletions science/multiwfn/files/patch-Makefile
@@ -0,0 +1,46 @@
--- Makefile.orig 2023-02-06 10:17:38 UTC
+++ Makefile
@@ -1,6 +1,6 @@
SIMD = -msse3
-OPT = -O2 -qopenmp -qopenmp-link=static -threads -qopt-matmul $(SIMD) -diag-disable 8290,8291,6371,10316,6178 -fpp -mkl -static-intel -DINTEL_MKL
-OPT1 = -O1 -qopenmp -qopenmp-link=static -threads $(SIMD) -diag-disable 8290,8291,6371,10316,6178 -fpp -mkl -static-intel -DINTEL_MKL
+OPT = $(FCFLAGS) -O2 $(SIMD) -DINTEL_MKL
+OPT1 = $(FCFLAGS) -O1 $(SIMD) -DINTEL_MKL
#Options in the next line is for debugging purpose
#OPTDBG = -O0 -qopenmp -diag-disable 8290,8291,6371 -threads -qopenmp-link=static -debug all -g -traceback -check all -fstack-protector -fpp -mkl -static-intel

@@ -43,10 +43,10 @@ default : $(objects)
@echo " ------------------------------------------------------ "

GUI: $(objects)
- $(FC) $(OPT) $(objects) $(LIB_GUI) -o $(EXE)
+ $(FC) $(LDFLAGS) $(OPT) $(objects) $(LIB_GUI) -o $(EXE)

noGUI: $(objects) $(objects_noGUI)
- $(FC) $(OPT) $(objects) $(objects_noGUI) $(LIB_noGUI) -o $(EXE_noGUI)
+ $(FC) $(LDFLAGS) $(OPT) $(objects) $(objects_noGUI) $(LIB_noGUI) -o $(EXE_noGUI)

clean:
rm -f $(EXE) *.o *.mod
@@ -230,7 +230,7 @@ cp2kmate.o : cp2kmate.f90 $(modules)


noGUI/dislin_d_empty.o : noGUI/dislin_d_empty.f90
- $(FC) $(OPT) -c noGUI/dislin_d_empty.f90 -o noGUI/dislin_d_empty.o -diag-disable 6178,6843
+ $(FC) $(OPT) -c noGUI/dislin_d_empty.f90 -o noGUI/dislin_d_empty.o


# Interfaces of libreta-ESP to Multiwfn
@@ -241,10 +241,10 @@ libreta.o: ${LIBRETAPATH}/libreta.f90 hrr_012345.o blo
# Pure libreta files for ESP

hrr_012345.o: ${LIBRETAPATH}/hrr_012345.f90
- $(FC) $(OPT) -diag-disable 6843 $(SIMD) -c ${LIBRETAPATH}/hrr_012345.f90
+ $(FC) $(OPT) $(SIMD) -c ${LIBRETAPATH}/hrr_012345.f90

blockhrr_012345.o: ${LIBRETAPATH}/blockhrr_012345.f90
- $(FC) -O1 -diag-disable 6843 $(SIMD) -c ${LIBRETAPATH}/blockhrr_012345.f90
+ $(FC) -O1 $(SIMD) -c ${LIBRETAPATH}/blockhrr_012345.f90

ean.o: ${LIBRETAPATH}/ean.f90 hrr_012345.o eanvrr_012345.o boysfunc.o ${LIBRETAPATH}/ean_data1.h ${LIBRETAPATH}/ean_data2.h
$(FC) $(OPT) -c ${LIBRETAPATH}/ean.f90
50 changes: 50 additions & 0 deletions science/multiwfn/files/patch-Multiwfn.f90
@@ -0,0 +1,50 @@
--- Multiwfn.f90.orig 2023-06-04 15:49:52 UTC
+++ Multiwfn.f90
@@ -13,7 +13,7 @@ real*8 tmpv1(3),tmpv2(3)

!Special treatment for Intel compiler
#if defined(__INTEL_COMPILER) || defined(__INTEL_LLVM_COMPILER)
-call kmp_set_warnings_off() !In rare case, "Cannot open message catalog "1041\libiomp5ui.dll"" may occurs, this calling avoid this problem, or user should set KMP_WARNINGS environment variable to 0
+!call kmp_set_warnings_off() !In rare case, "Cannot open message catalog "1041\libiomp5ui.dll"" may occurs, this calling avoid this problem, or user should set KMP_WARNINGS environment variable to 0
#endif

!Try to get input file name from argument, which should be the first argument
@@ -49,12 +49,12 @@ nthreads,nowdate(1:4),nowdate(5:6),nowdate(7:8),nowtim
!For Windows version of ifort, use KMP_SET_STACKSIZE_S() to directly set stacksize of OpenMP threads according to ompstacksize in settings.ini, &
!for other cases, the stacksize is determined by OMP_STACKSIZE environment variable, and we check if it has been defined here
if (isys==1) then !Windows
-#if defined(__INTEL_COMPILER) || defined(__INTEL_LLVM_COMPILER)
- call KMP_SET_STACKSIZE_S(ompstacksize)
-#else
- CALL getenv('OMP_STACKSIZE',c200tmp)
- if (c200tmp==" ") write(*,"(/,a)") " Warning: You should set OMP_STACKSIZE environment variable in Windows system to define stacksize of OpenMP threads!"
-#endif
+!#if defined(__INTEL_COMPILER) || defined(__INTEL_LLVM_COMPILER)
+! call KMP_SET_STACKSIZE_S(ompstacksize)
+!#else
+! CALL getenv('OMP_STACKSIZE',c200tmp)
+! if (c200tmp==" ") write(*,"(/,a)") " Warning: You should set OMP_STACKSIZE environment variable in Windows system to define stacksize of OpenMP threads!"
+!#endif
else if (isys==2) then !Linux/MacOS
CALL getenv('OMP_STACKSIZE',c200tmp)
#if defined(__INTEL_COMPILER) || defined(__INTEL_LLVM_COMPILER)
@@ -67,9 +67,9 @@ end if
!write(*,"(' OpenMP stacksize for each thread: ',f10.2,' MB')") dfloat(KMP_GET_STACKSIZE_S())/1024/1024

!Set number of cores used by calculation of MKL library (e.g. function matmul_blas)
-#if defined(INTEL_MKL)
-call mkl_set_num_threads(nthreads)
-#endif
+!#if defined(INTEL_MKL)
+!call mkl_set_num_threads(nthreads)
+!#endif


!!-------- Load input file
@@ -791,4 +791,4 @@ do while(.true.) !Main loop

end do !End main cycle

-end program
\ No newline at end of file
+end program
25 changes: 25 additions & 0 deletions science/multiwfn/files/patch-define.f90
@@ -0,0 +1,25 @@
--- define.f90.orig 2023-05-04 20:39:35 UTC
+++ define.f90
@@ -441,11 +441,11 @@ real*8 :: dp_init1,dp_end1,dp_init2,dp_end2,dp_init3,d
!!! Other external parameter !!!
integer :: iautointgrid=1,radpot=75,sphpot=434 !sphpot=230/302/434/590/770, low is 50*434, high is 100*590
integer :: ispecial=0 !=0: Normal, =1 specific for Chunying Rong, =2 for Shubin's 2nd project
-#ifdef _WIN32
-integer :: isys=1 !Windows
-#else
+!#ifdef _WIN32
+!integer :: isys=1 !Windows
+!#else
integer :: isys=2 !Linux/MacOS
-#endif
+!#endif
integer :: igenP=1,iwfntmptype=1,iESPcode=2,outmedinfo=0,iaddprefix=0,intmolcust=0,isilent=0,idelvirorb=1
integer :: ifchprog=1,iloadascart=0,iloadGaugeom=1,iloadORCAgeom=1,maxloadexc=0,iprintLMOorder=0,iMCBOtype=0,ibasinlocmin=0
integer :: iuserfunc=0,iDFTxcsel=84,iKEDsel=0,ispheratm=1,ishowchgtrans=0,uESEinp=0,SpherIVgroup=0,MCvolmethod=2,readEDF=1,isupplyEDF=2,ishowptESP=1,imolsurparmode=1,nPGmaxatm=200
@@ -609,4 +609,4 @@ real*8,allocatable :: DMNAO(:,:),DMNAOa(:,:),DMNAOb(:,
real*8,allocatable :: NAOMO(:,:) !size of (numNAO,NBsUse). (i,r) is coeff. of NAO i in MO r. If numNAO<nbasis, the gap is filled by blank. For open shell, this records alpha part.
real*8,allocatable :: NAOMOb(:,:) !NAOMO for beta part
real*8,allocatable :: AONAO(:,:) !size of (nbasis,numNAO)
-end module
\ No newline at end of file
+end module
20 changes: 0 additions & 20 deletions science/multiwfn/files/patch-init_Multiwfn.02

This file was deleted.

0 comments on commit 5893cd3

Please sign in to comment.