Question about vampire installation in mac

310 views
Skip to first unread message

张鲸鱼

unread,
Jul 17, 2021, 10:59:53 PM7/17/21
to Vampire Users
Dear Vampire Team,I want to use vampire for magnetic material simulation, I downloaded the mac binary through the official website, unpacked it and got five files, I ran install.sh and it returned the following: Please add the following line to your shell configuration file (usually ~/.bash_profile): "export PATH=/opt/vampire/bin/:\$PATH". So I used nano . /bash_profile to add that line of command as shown here. Then when I ran install.sh again it still returned the above command. 
截屏2021-07-18 上午10.58.01.png
Then I tried to run vampire-serial directly and it returned the following error: Error opening input file "input" : File does not exist or cannot be opened!
Fatal error: Aborting program. see log file for details. the input file as well as the co.mat file are already in that directory. I am not sure what to do to start the simulation. Can you give me some help! Thank you very much!

Richard Evans

unread,
Jul 19, 2021, 3:19:18 AM7/19/21
to Vampire Users
Hi,

Yes the input and material file need to be in a directory in your home folder somewhere - eg

On the command line:

mkdir test
cd test
cp /opt/vampire/examples/* .
vampire-serial

All the best,

Richard 

Whalez

unread,
Jul 20, 2021, 1:14:59 AM7/20/21
to Vampire Users
Thank you for your reply! After I run install.sh, the display file already exists, and I have modified bash_profile accordingly,

WeChatc6b9909060d417ca04cd8284357fa08a.pngWeChatfa2c454722847263b3f012449679e7dc.png
So I enter the bin folder, where there is only one vampire serial file. Then I will copy the downloaded input and co.mat to this folder, and then double-click vampire serial, but the following error still appears
WeChate8561cc790e728d6905737f8f7b59619.png

I don't know how to solve this problem. You can help me. I'm looking forward to using vampire for simulation. Thank you again for your help!

Gavin Abo

unread,
Jul 20, 2021, 1:39:30 AM7/20/21
to vampir...@googlegroups.com

I'm not a mac user, but if it is similar to Linux and you have modified .bash_profile accordingly, then you should not have to use "/opt/vampire/bin/vampire-serial" and it should be sufficient to use instead just "vampire-serial".

If it not working, the .bash_profile might not have been reloaded.  Restarting the computer, login/logout, or close/open a new terminal might be needed to reload the .bash_profile after you had saved the "export PATH=/opt/vampire/bin/:$PATH" in it.

In your screenshot (WeChate8561cc790e728d6905737f8f7b59619.png), it looks like you may be running vampire-serial in your home directory (i.e., ~ %) which is probably not good to do.  Thus, the error is probably because your missing an input file for vampire there or you need to navigate to the directory where you made or placed a vampire input file.  I think one usually creates a calculation directory and puts the input file (and .mat) file in it [1,2], then runs vampire-serial while in that directory.  For example, if your calculation directory was called 1aNi [1], I think your terminal would probably show for example "~\1aNi %" not "~ %" when you are 1aNi folder in the terminal.

[1] https://github.com/richard-evans/vampire-workshop/tree/master/input-files/1_intro/1a_Ni
[2] https://groups.google.com/g/vampire-users/c/LS51ZlvZeyw/m/F7gfJCBLAgAJ

Kind Regards,

Gavin

--
You received this message because you are subscribed to the Google Groups "Vampire Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vampire-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vampire-users/112badff-429d-45e1-9daa-c3970aa3e93bn%40googlegroups.com.

Whalez

unread,
Jul 23, 2021, 10:05:52 AM7/23/21
to Vampire Users
WeChatc301a63758ee3fd9dafbcdc0e962ff66.pngI'm sorry to reply to you so late. I tried your method and restarted the computer, but still reported the same error. I downloaded the sample file in the GitHub you provided and ran CP / opt / Vampire / bin / *, vampire serial in the working folder. However, the following error was returned. Can you tell me how to solve it?

Gavin Abo

unread,
Jul 23, 2021, 11:01:02 AM7/23/21
to vampir...@googlegroups.com

In your screenshot, it looks like you are using a ZSH shell.

Refer for example to:

https://stackoverflow.com/questions/14617041/how-can-i-see-the-current-value-of-my-path-variable-on-os-x

https://apple.stackexchange.com/questions/356441/how-to-add-permanent-environment-variable-in-zsh

Did you "echo $PATH" and check if "/opt/vampire/bin/" is there in the output?

After editing .zshrc to add and save the line:

export PATH=/opt/vampire/bin/:$PATH

Did you "source ~/.zshrc" like that shown at:

https://stackoverflow.com/questions/50689939/why-do-you-need-to-source-zshrc-for-every-new-shell-in-iterm

Also, the input and case.mat for example need to be in the directory you are in.  You not enter "ls -a" [1] to to show what is the directory in your screenshot to show that only those such files are there.

By the way, files/folders under /opt are likely reserved for operating system or root.  So it probably best not to put input and Co.mat files in "/opt/vampire/bin" like what you showed in one of your previous screenshots.  You will probably want to create as a user a folder in your home directory [2] and use that instead.  For example,

cd ~

mkdir Co

cd Co

Put in Co the input and Co.mat, then if vampire-serial is set in the environment (e.g., .zshrc) run:

vampire-serial

Or vampire-serial is not in the environment run using the full path:


/opt/vampire/bin/

[1] https://superuser.com/questions/475774/ls-al-mac-terminal

[2] https://superuser.com/questions/768880/tilde-in-mac-osx-terminal-pathway

Kind Regards,

Gavin

Whalez

unread,
Jul 23, 2021, 11:02:16 PM7/23/21
to Vampire Users
Thank you for all your help! I think I've successfully solved the installation problem! I changed the bash_profile as per your tutorial after adjusting the shell to base, and now I type vampire-serial in the terminal and it returns the following and generates the output file, which I think means vampire is running successfully (is that right?) . Thanks again for your help !!!
WeChat528c6791cc99a612f0df024f74d28bdc.png

Gavin Abo

unread,
Jul 25, 2021, 3:52:58 PM7/25/21
to vampir...@googlegroups.com

When vampire has successfully ran it seems that the "Simulation ended gracefully" message is shown like in your screenshot, the output file is generated, and other files such as a log file are generated.  So yes, it looks like vampire successfully ran in your case.

If you happen to be going through the Ni example and are interested in getting the plot of the Ni temperature vs normalized magnetization without the fit curve seen on slide 69 of the file at:

https://raw.githubusercontent.com/richard-evans/vampire-workshop/master/pdf-slides/1_intro/Introduction.pdf

I was able to use the files at

https://github.com/richard-evans/vampire-workshop/tree/master/input-files/1_intro/1a_Ni

to get a plot of it by doing the following in a terminal:

username@computername:~/vampire-workshop/input-files/1_intro/1a_Ni$ ls -l
total 16
-rw-rw-r-- 1 username username 1584 Jul 25 11:42 input
-rw-rw-r-- 1 username username 1687 Jul 25 11:42 input_pulse
-rw-rw-r-- 1 username username  792 Jul 25 11:42 Ni.mat
-rwxrwxr-x 1 username username  848 Jul 25 11:42 README.md
username@computername:~/vampire-workshop/input-files/1_intro/1a_Ni$ vampire-serial
                                                _         
                                               (_)        
                    __   ____ _ _ __ ___  _ __  _ _ __ ___
                    \ \ / / _` | '_ ` _ \| '_ \| | '__/ _ \
                     \ V / (_| | | | | | | |_) | | | |  __/
                      \_/ \__,_|_| |_| |_| .__/|_|_|  \___|
                                         | |              
                                         |_|              

                      Version 5.0.1 Jul 19 2021 05:54:31

             Git commit: c0cb858d7dcdcdfc6474938324e363599e728b30

  Licensed under the GNU Public License(v2). See licence file for details.

  Lead Developer: Richard F L Evans <richar...@york.ac.uk>

  Contributors: Andrea Meo, Rory Pond, Weijia Fan,
                Phanwadee Chureemart, Sarah Jenkins, Joe Barker,
                Thomas Ostler, Andreas Biternas, Roy W Chantrell,
                Wu Hong-Ye, Matthew Ellis, Razvan Ababei,
                Sam Westmoreland, Oscar Arbelaez, Sam Morris
 
                Compiled with:  GNU C++ Compiler
                Compiler Flags:

  Vampire includes a copy of the qhull library from C.B. Barber and The
  Geometry Center and may be obtained via http from www.qhull.org.

================================================================================
Sun Jul 25 11:43:53 2021
================================================================================
Initialising system variables
Creating system
Generating neighbour list..........done!
Copying system data to optimised data structures.
Using generic/normalised form of exchange interaction with 48 total interactions.
Number of atoms generated: 6912
Starting Simulation with Program Curie-Temperature...
0    1   
25    0.986425   
50    0.972544   
75    0.958207   
100    0.943776   
125    0.92874   
150    0.913277   
175    0.898092   
200    0.88159   
225    0.864251   
250    0.846723   
275    0.829562   
300    0.810906   
325    0.790275   
350    0.769637   
375    0.747757   
400    0.722924   
425    0.696795   
450    0.671575   
475    0.639302   
500    0.603384   
525    0.567703   
550    0.523141   
575    0.464897   
600    0.397403   
625    0.279062   
650    0.131911   
675    0.0691506   
700    0.0541263   
725    0.0421983   
750    0.0385151   
775    0.0341557   
800    0.0302172   
Simulation run time [s]: 3075.76
Monte Carlo statistics:
    Total moves: 4561920000
    36.69% Accepted
    63.31% Rejected
Simulation ended gracefully.
username@computername:~/vampire-workshop/input-files/1_intro/1a_Ni$ ls -l
total 24
-rw-rw-r-- 1 username username 1584 Jul 25 11:42 input
-rw-rw-r-- 1 username username 1687 Jul 25 11:42 input_pulse
-rw-rw-r-- 1 username username 2928 Jul 25 12:35 log
-rw-rw-r-- 1 username username  792 Jul 25 11:42 Ni.mat
-rw-rw-r-- 1 username username 2458 Jul 25 12:35 output
-rwxrwxr-x 1 username username  848 Jul 25 11:42 README.md
username@computername:~/vampire-workshop/input-files/1_intro/1a_Ni$ gnuplot

    G N U P L O T
    Version 5.2 patchlevel 8    last modified 2019-12-01

    Copyright (C) 1986-1993, 1998, 2004, 2007-2019
    Thomas Williams, Colin Kelley and many others

    gnuplot home:     http://www.gnuplot.info
    faq, bugs, etc:   type "help FAQ"
    immediate help:   type "help"  (plot window: hit 'h')

Terminal type is now 'wxt'
gnuplot> set xlabel "Temperature (K)"
gnuplot> set ylabel "Normalized magnetization"
gnuplot> p "output" u 2:7 w p
gnuplot> quit

Note: At about 24:50 of the video at

https://www.youtube.com/watch?v=W5ivNgUklr8

it described for the output file that column 2 is temperature.  It might be because of an input difference or a vampire version difference (5.0.1 April 2020 in video from that of 5.0.1 July 2021 used) that column 7 instead of 8 gave the average magnetization values over the entire simulation.

Kind Regards,

Gavin

Reply all
Reply to author
Forward
0 new messages