Hi, I've created an ebuild for NWChem, which is an powerful open-source program package covering force-field, ab initio and DFT calculations mostly used in computational chemistry. It would be wonderfu, if I could share this ebuild with other people. It has been tested with amd64 and x86 and works ok. I've added three use flags: doc, python and mpi, which are more or less self-explanatory. Apparently, Gentoo does not have the license of this ebuild in its license file. It is the ECL (Educational Community License), which apparently is an derivative of the Apache 2.0 license. Therefore I set the ebuild to the latter one. Thanks, Wilhelm Reproducible: Always
Created attachment 294737 [details] Ebuild file
Created attachment 294739 [details, diff] Necessary patch
Created attachment 294741 [details, diff] Necessary patch
Created attachment 294743 [details, diff] Necessary patch
Created attachment 294745 [details, diff] Necessary patch
Comment on attachment 294737 [details] Ebuild file Installation path needs to be changed: NWChem -> NWchem Otherwise change the path in the path for nwchemrc from NWchem to NWChem. Sorry, typo.
Created attachment 294841 [details] nwchem-6.0-r1.ebuild: Minor changes
Created attachment 295897 [details] Updated dependencies.
> Created attachment 295897 [details] > Updated dependencies. (In reply to comment #8) Thank you for nwchem ebuild. I try to use your last ebuild but I can't compile nwchem. Compilation failed with error: The directory name chosen for NWCHEM_TOP is longer than the maximum allowed value of 65 characters current NWCHEM_TOP=/var/tmp/portage/sci-chemistry/nwchem-6.0-r2/work/nwchem-6.0/src equal to 1 characters please chose a directory with a shorter name E.g., setenv NWCHEM_TOP /home/nwchem_user/nwchem make[1]: *** [errorlongpwd] Error 1 make: *** [libraries] Error 1
Ok, I've created a new patch to solve the directory lentgh issue. Unfortunately, the new version of mpich2 introduced a new use flag (fortran90) which is needed to be set for building nwchem. If you use mpich2 version 1.4.1_p1 or later it should be ok, if you are on an earlier version, you might need to remove 'fortran90' from the ebuild file. Let me know if it works for you.
Created attachment 299923 [details] nwchem-6.0-r3.ebuild
Created attachment 299925 [details, diff] nwchem-6.0-adjust-dir-length.patch
(In reply to comment #10) > Ok, I've created a new patch to solve the directory lentgh issue. > Unfortunately, the new version of mpich2 introduced a new use flag (fortran90) > which is needed to be set for building nwchem. If you use mpich2 version > 1.4.1_p1 or later it should be ok, if you are on an earlier version, you might > need to remove 'fortran90' from the ebuild file. > > Let me know if it works for you. USE flag fortran90 for sys-cluster/mpich2 presents only in science overlay not in a gentoo tree. sys-cluster/mpich2-1.4.1_p1 only presents in science overlay. sys-cluster/mpich2-1.4_rc2-r1 presents in gentoo tree. Without mpi nwchem compiles fine. Thank you for fast patch preparation. I think we can add something similar: mpi? ( sys-cluster/mpich2-1.2.1_p1-r1[fortran] || sys-cluster/mpich2-1.4_rc2-r1[fortarn] || sys-cluster/mpich2-1.4.1_p1[fortran,fortran90] )
Created attachment 299957 [details] nwchem-6.0-r4.ebuild Great. I adopted the ebuild file in a more general manner. Can you please check if it works for you? I have only system with the science overlay enabled at the moment and don't have time to set up a test system. Thanks!
On home ~x86 computer compilation failed with USE="python -mpi -doc" with this error: gfortran -c -Wextra -ffast-math -march=pentium4 -mtune=pentium4 -g -O0 -I. -I/mnt/slag/portage/sci-chemistry/nwchem-6.0-r4/work/nwchem-6.0/src/include -I/mnt/slag/portage/sci-chemistry/nwchem-6.0-r4/work/nwchem-6.0/src/tools/include -DLINUX -DGFORTRAN -DCHKUNDFLW -DGCC4 -DGANXTVAL -DUSE_SUBGROUPS -DBASIS_LIBRARY="'/mnt/slag/portage/sci-chemistry/nwchem-6.0-r4/work/nwchem-6.0/src'" bas_input.F bas_input.F:1132.72: compiled_name = 1 Error: Unterminated character constant beginning at (1) make[1]: *** [/mnt/slag/portage/sci-chemistry/nwchem-6.0-r4/work/nwchem-6.0/lib/LINUX/libnwcutil.a(bas_input.o)] Error 1 make: *** [libraries] Error 1
At first, emerge of nwchem-6.0-r4 failed with USE="doc python mpi": ./userpsfix make[1]: ./userpsfix: Command not found make[1]: [all] Error 127 (ignored) make[1]: Leaving directory `/var/tmp/portage/sci-chemistry/nwchem-6.0-r4/work/nwchem-6.0/doc/user' * QA Notice: file does not exist: * * doins: /var/tmp/portage/sci-chemistry/nwchem-6.0-r4/work/nwchem-6.0/doc/user/user.001.ps does not exist At second, When I try to run test job: title "Nitrogen cc-pvdz SCF geometry optimization" geometry n 0 0 0 n 0 0 1.08 end basis * library cc-pvdz end task scf optimize at output file I can see these strings: warning:::::::::::::: from_nwchemrc NWCHEM_BASIS_LIBRARY set to: </usr/share/NWChem/data/libraries/> but file does not exist ! using compiled in library warning:::::::::::::: from_compile NWCHEM_BASIS_LIBRARY is: </var/tmp/portage/sci-chemistry/nwchem-6.0-r4/work/nwchem-6.0/src/basis/libraries/> but file does not exist or you do not have access to it !
(In reply to comment #16) > At second, > When I try to run test job: > > title "Nitrogen cc-pvdz SCF geometry optimization" > geometry > n 0 0 0 > n 0 0 1.08 > end > basis > * library cc-pvdz > end > task scf optimize > > at output file I can see these strings: > > warning:::::::::::::: from_nwchemrc > NWCHEM_BASIS_LIBRARY set to: </usr/share/NWChem/data/libraries/> > but file does not exist ! > using compiled in library > warning:::::::::::::: from_compile > NWCHEM_BASIS_LIBRARY is: > </var/tmp/portage/sci-chemistry/nwchem-6.0-r4/work/nwchem-6.0/src/basis/libraries/> > but file does not exist or you do not have access to it ! NWCHEM_BASIS_LIBRARY should be set to /usr/share/NWChem/data/ And one suggestion maybe set use-flag for installing nwchem tests from srcdir/QA/tests and examples from srcdir/examples. Wilhelm Eger, Thank you very much for your useful work.
Created attachment 302359 [details] Ebuild for nwchem-6.1 NWChem-6.1 version bump. I modify ebuild for nwchem-6.0-r4 for nwchem-6.1. 1) Upstream changes filename for nwchem. Right now filename is Nwchem-6.1-2012-Feb-10.tar.gz 2) I don't find doc directory at src. Because of, I remove doc use flag and unneeded patch. 3) nwchem-6.0-python_makefile.patch was modified for new source code. Others patches don't modified. 4) I add two new USE-flags: a) tests - Install tests files for testing NWChem installation b) examples - Install examples from upstream
Created attachment 302361 [details, diff] Modified nwchem-6.1-python_makefile.patch file
Added to sci overlay
For mpich2-1.5 we should change in ebuild elif [ "$PROOF_MPICH2" = "3" ] || [ "$PROOF_MPICH2" = "4" ]; then export LIBMPI="-lmpichf90 -lmpich -lmpl -lpthread" # MPICH2 1.3 or 1.4 to elif [ "$PROOF_MPICH2" = "3" ] || [ "$PROOF_MPICH2" = "4" ] || [ "$PROOF_MPICH2" = "5"]; then export LIBMPI="-lmpichf90 -lmpich -lmpl -lpthread" # MPICH2 1.3 or 1.4 or 1.5
Hi, the ebuild for version 6.1.1 fails because it cannot apply one patch: nwchem-6.1.1-python_makefile.patch I think (but may be wrong) that the nwchem-6.1.1-python_makefile has changed with this version and the patch needs updating. I found similar lines to the ones seen in the patch around line 2197. In my system emerging suceeded changing the patch file to: @@ -2196,7 +2196,7 @@ endif ifdef USE_PYTHON64 - CORE_LIBS += $(PYTHONHOME)/lib64/python$(PYTHONVERSION)/config/libpython$(PYTHONVERSION).$(PYTHONLIBTYPE) + CORE_LIBS += $(PYTHONHOME)/lib/libpython$(PYTHONVERSION).a else - CORE_LIBS += $(PYTHONHOME)/lib/python$(PYTHONVERSION)/config/libpython$(PYTHONVERSION).$(PYTHONLIBTYPE) + CORE_LIBS += $(PYTHONHOME)/lib/libpython$(PYTHONVERSION).a endif endif
Can one just simply use ebuild from 6.3 with 6.5?
(In reply to lumbrius from comment #23) > Can one just simply use ebuild from 6.3 with 6.5? No. What's more upstream has posted a series of individual patches to put on top (although I disagree with the last one I saw - on technical grounds rather than scientific ground). And what's more we are starting to support int64 blas/lapack so we may be able to get nwchem to use it (instead of an internal copy) in the near future.