Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please add the install target #52

Closed
yurivict opened this issue Aug 23, 2018 · 8 comments
Closed

Please add the install target #52

yurivict opened this issue Aug 23, 2018 · 8 comments
Assignees

Comments

@yurivict
Copy link
Contributor

I have to consult the package() procedure from the Arch port https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=nwchem-git

Normally makefile should install the package into $(DESTDIR)$(PREFIX), so that such question would not arise.

@edoapra
Copy link
Collaborator

edoapra commented Aug 23, 2018

Please provide more details about this issue since I am not sure I can understand it.
A practical example might help

@yurivict
Copy link
Contributor Author

make install should install the project. Currently there is no target install.

@edoapra
Copy link
Collaborator

edoapra commented Aug 23, 2018

Contributions are welcome.

@jeffhammond
Copy link
Collaborator

We will need make install to install not just the binary but the basis set and pseudopotential library folders, although the latter paths are hard-coded into the binary prior to this step, so we need to add a level of indirection or rebuild the relevant object file to know about the installed path and relink the binary. I've had to solve this problem manually enough times that I will try to work on the solution here.

Perhaps it would be better to deprecate the hard-coded library paths and move to using nwchemrc more. We could put nwchemrc in /usr/share/nwchem/ and have the binary look there first, followed by ~/.nwchemrc.

@hjjvandam
Copy link
Collaborator

hjjvandam commented Aug 23, 2018 via email

@yurivict
Copy link
Contributor Author

Currently you can install .nwchemrc in /etc/nwchemrc to set this as a system wide default. That might help.

The problem that I observed with this is that nwchem attempts to open this file in R/W mode, and this can only succeed as root.

@edoapra
Copy link
Collaborator

edoapra commented Aug 23, 2018

@yurivict
It's hard to believe that NWChem requires W mode for /etc/nwchemrc. Fedora RPMS are built installing /etc/nwchemrc in r--r--r-- mode and they seem to work fine
https://src.fedoraproject.org/rpms/nwchem/blob/master/f/nwchem.spec

@jeffhammond
Copy link
Collaborator

jeffhammond commented Sep 17, 2018

According to GCC docs:

The Fortran standard says that if an OPEN statement is executed without an explicit ACTION= specifier, the default value is processor dependent.

Looking at src/util/util_nwchemrc.F line 108,

        if (ipass.eq.1) then
          call util_getenv('HOME',home)
          nwchrc=home(1:inp_strlen(home))//'/.nwchemrc '
        elseif (ipass.eq.2) then
          nwchrc="/etc/nwchemrc"
        else
          return
        endif
        open(unit=69,file=nwchrc(1:inp_strlen(nwchrc)),
     +       form='formatted',status='old',err=9999)

the action is not specified. Now, I would expect Linux builds to use GCC and thus succeed on the second attempt (ACTION='READ') but perhaps we need to make it explicit.

jeffhammond pushed a commit to jeffhammond/nwchem that referenced this issue Sep 17, 2018
edoapra added a commit that referenced this issue Sep 18, 2018
open /etc/nwchemrc as read-only (issue #52)
@edoapra edoapra self-assigned this Sep 20, 2018
@edoapra edoapra closed this as completed May 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants