Comments (5)
It looks a little trick to get vasp to run in parallel outside of the queue. Here are a few ways you could try it.
- You could try this with the runvasp.py script you listed above:
VASPRC['mode'] = 'run'
VASPRC['vasp.executable.serial'] = 'runvasp.py'
Another approach is:
2. You can set an environment variable for PBS_NODEFILE that points to a file containing 4 lines.
and VASPRC['mode'] = 'run'
-
in vasp.py, comment out the line "import runner"
Then set the environment variable ASE_VASP_COMMAND to runvasp.py as you outlined above. -
Make a new python module and import it to monkey patch the calculate function. This is what runner.py does.
from monkeypatch import monkeypatch_class
@monkeypatch_class(vasp.Vasp)
def calculate(self, atoms=None, properties=['energy'],
system_changes=None):
# insert code that runs your code here.
from vasp.
Thanks! The solution is indeed easy, and your reply got me off on the right track. The first step is to define the runvasp.py script in my original message. The second step is to use the runvasp.py script as the serial executable. (Duh. Sort of obvious.) For future Mac users, this is easily done by changing one line in the distributed vasprc.py:
vs = '/Users/mah/anaconda/envs/aseNew/bin/runvasp.py'
The calculator now runs the serial program that runs the parallel process.
To avoid having to add the "Vasp.vasprc(mode='run')" line to each script, the default 'mode' setting should be changed in vasprc.py as follows:
VASPRC = {'vasp.executable.serial': vs,
'vasp.executable.parallel': vp,
'mode': 'run', # other value is 'queue'
'queue.command': 'qsub',
…
Melissa
from vasp.
Following up on this thread, I think there may be a small naming issue. Suppose you want to switch between different versions of VASP (e.g., std and gam). One logical way to do this would be to change the entry in VASPRC as follows:
Vasp.vasprc(vasp.executable.serial="/Users/mah/anaconda/envs/aseNew/bin/runvasp_gam.py")
Unfortunately, this leads to the following error:
File "Molecular_XPS_Shifts.py", line 54
Vasp.vasprc(vasp.executable.serial="/Users/mah/anaconda/envs/aseNew/bin/runvasp_gam.py")
SyntaxError: keyword can't be an expression
The issue are the two periods in 'vasp.executable.serial' as described here:
One fix would be to rename the keys to 'vasp_executable_serial' and 'vasp_executable_parallel'.
from vasp.
VASPRC is a dictionary.
so you should do something like this:
from vasp.vasprc import VASPRC
VASPRC["vasp.executable.serial"]="/Users/mah/anaconda/envs/aseNew/bin/runvasp_gam.py"
vasp.vasprc is not callable like you are trying to do.
from vasp.
Thank you for your reply. I know VASPRC is a dictionary. In your reply to zezhong-zhang from a few days ago, you suggested calling Vasp.vasprc directly:
from vasp import Vasp
Vasp.vasprc(mode='run')
This is a minor issue, and your suggestion above also works.
from vasp.
Related Issues (20)
- "IndexError: list index out of range" when reading potcar HOT 2
- PropertyNotImplementedError in get_property HOT 5
- How to set up vasp on a cluster HOT 2
- Updating atoms in a cloned calculation? HOT 5
- atoms_sorted issue HOT 4
- QXcbConnection HOT 2
- Issue with get_elapsed_time in getters.py HOT 2
- Two issues with check_state and xc = 'optb88-vdw' (and other xc's)
- Package Install Problems HOT 11
- case sensitive file systems. HOT 1
- Cannot read vibrational modes with NWRITE=3
- raise child_exception HOT 5
- getters/ados s p d, or s px py pz HOT 1
- Working with job schedulers other than PBS HOT 1
- Problems with VASP parallel computing HOT 1
- use 'vasp' to do Postprocessing on completed VASP jobs
- Issue with calculations containing Xe HOT 2
- brach python3 : write_incar() function treat string a list HOT 1
- TypeError When Using Vasp() HOT 5
- Error: cannot import name 'Vasp' from 'vasp' HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vasp.