1884|3

77

帖子

1

TA的资源

一粒金砂(中级)

楼主
 

求助下PIC软件EPOCH怎么安装,csdn写的很模糊,安装说明写的操作没有见过 [复制链接]

下文是这个软件的安装引导,但是很多东西我看不懂要怎么下手操作,实在是我太菜没见过这些。这个软件是用于激光等离子物理模拟用的,有用过的大佬能否指点小弟一二。多谢!

*** PLEASE READ THIS NOTE ***

If you are obtaining this code from the github server DO NOT use the "Download zip" buttons. They will only download the EPOCH code and not the SDF subdirectory.

For similar reasons, if cloning the repository using git you MUST add the "--recursive" flag.

DOWNLOADING AND BUILDING THE CODE

Compiling the code

The "Releases" section of the GitHub site contains files in the form "epoch-4.4.5.tar.gz". These are tarred and gzipped packages of the code which can be unpacked with the command tar xzf epoch-4.4.5.tar.gz. This will create a directory called "epoch-4.4.5".

Within this directory there are various epochXd subdirectories, each of which has a "Makefile" containing the instructions for compiling the code.

Many people will be used to editing Makefiles by hand in order to set them up for their own working environment. However, this is not the recommended way of working with the EPOCH codebase. In theory, all the changes necessary for compiling EPOCH on any given environment should be possible using command-line variables.

For most setups, it should only be necessary to set the COMPILER variable to correspond to the Fortran compiler to be used. This can either be set as an option to the "make" command or as an environment variable.

For example, to compile the code using Intel's "ifort" Fortran compiler, you can either type the following: $> make COMPILER=intel

or alternatively: $> export COMPILER=intel $> make

In these two examples $> represents the terminal's command-line prompt. After compilation is complete, the binary file will be created in "bin/epochXd", where X is 1, 2 or 3.

Since most people will always be using the same compiler on a specific machine, it is often easiest to just add the line export COMPILER=intel to your shell script initialisation file (ie. "$HOME/.bashrc" on most modern UNIX machines).

The actual compiler command used is the MPI fortran wrapper. On nearly all machines, this is called "mpif90" and so this is what is used by default. Occasionally, some machines will call it something different. For example, Intel's MPI wrapper script is sometimes called "mpiifort". If your machine has such a setup, you can set the name of the wrapper script using the variable MPIF90. For example: $> make COMPILER=intel MPIF90=mpiifort

Again, it is often easiest to add the line export MPIF90=mpiifort to your $HOME/.bashrc file.

Finally, there are two more variables which can be used to control the options used when building the code.

Setting "MODE=debug" will build the code with optimisation disabled and debugging flags turned on. If this variable is not set then the default is to build a fully optimised version of the code.

There are several pre-processor flags which can be passed at compile-time to change the behaviour of the code. These flags are described in the Makefile with the lines beginning "#DEFINES += " and they are commented out by default. Rather than uncommenting these lines, it is possible to set them on the command-line using the "DEFINE" variable. For example, to compile a single-precision version with global particle IDs you would type:$> make DEFINE="-DPARTICLE_ID -DSINGLE"

COMPILING SDF AND THE VISIT READER

The EPOCH codes use a self-describing file format called SDF. The routines used in reading and writing such files, along with reader plugins for Matlab, IDL, python and VisIt are contained in the SDF directory.

The library used by EPOCH for reading and writing the files is automatically built when you first build EPOCH. However, it is important to note that whenever you rebuild EPOCH, the SDF library is NOT rebuilt by default. It is also not removed when you type "make clean". Most of the time, this is what you want since rebuilding the library adds a significant amount of time to the compilation of the code. However, occasionally you might want to force the library to be rebuilt, such as when you switch compilers. To accomplish this you must first type "make cleanall" which will remove the existing library and it will then get rebuilt next time you type "make".

In order to visualise data using the VisIt program, you must first build the SDF VisIt reader plugin. As a pre-requisite, you must have the VisIt binary in your shell's search path. You can check this by typing: $> visit -version which should return with a message such as "The current version of VisIt is .." If instead you get "visit: command not found" then you may need to edit your PATH environment variable appropriately. Your system administrator should be able to help. Next you will need to ensure that you have a C++ compiler (preferably GNU g++) and CMake. Again, you can check these usingg++ --version and cmake -version. Note that the appropriate version of these utilities may depend on the version of VisIt that you have installed.

Once these pre-requisites have been met, you should be able to build the reader plugin by typing make visit. You do not need to do this again unless you upgrade your version of the VisIt utility. It is rare that any changes to EPOCH will require an update of the VisIt reader, but if you do start to encounter errors when reading SDF files then you can try rebuilding the reader using the commands make visitclean followed by make visit.

Note that older versions of EPOCH used the CFD format. This is now obsolete and current versions of the code no longer contain any reader plugin for this format. However, existing installations of the VisIt CFD plugin will happily co-exist with the SDF plugin and issuing make visitclean will not remove such plugins.

WORKING WITH THE GIT REPOSITORY

For more advanced users, the code is also hosted on a git repository. There is quite a steep learning curve for using git, so using this repository is only recommended for more advanced users who are comfortable that they can deal with a "git conflict".

One other added complication, is that the EPOCH repository also uses git submodules for tracking the SDF file format. This adds an extra source of possible issues. However, once a workflow is established it can all be quite straightforward to work with.

To perform an initial checkout of the code using git, you should issue the following command:

git clone --recursive https://github.com/Warwick-Plasma/epoch.git

The "--recursive" flag ensures that not only the "epoch" repository is checked out, but also the "SDF" submodules.

It is recommended that after checking out a copy of the git repository, users immediately create a new working branch and leave the default "master" branch untouched. A new branch can be created and switched to with the command git checkout -b work.

When you wish to update to the latest version, do the following sequence of actions. First, commit or stash any changes you have made in your "work" branch. Next, switch to the "master" branch with git checkout master. Now pull the changes with git pull, followed bygit submodule update --recursive. At this stage your "master" branch should be fully up to date.

Merging the new version in with your "work" branch is prone to error, so it is recommended that you create a temporary copy of this branch just in case everything goes wrong. The command "git branch workold work" will create a branch named "workold" which is just a copy of "work". This branch can be deleted once the merge is completed successfully. If everything goes wrong in the "work" branch, you can reset it back to the original using the command git reset --hard workold.

In order to update your work branch, switch back to it with git checkout work and merge in the changes with git merge master. After issuing this last command, there is a fair chance that you will encounter conflicts. You must now resolve those conflicts and commit the changes. After successfully merging in the changes, you can now delete the temporary copy of your work branch with git branch -D workold.

 

最新回复

17370130100,咱可以加上交流,我也要再用epoch     详情 回复 发表于 2022-12-18 13:05
点赞 关注
 
 

回复
举报

77

帖子

1

TA的资源

一粒金砂(中级)

沙发
 

csdn上头说make命令是在linux命令行里输入,这种专业软件都是用Linux吗?不太懂

 
 
 

回复

77

帖子

1

TA的资源

一粒金砂(中级)

板凳
 

 我们再windows上安装失败了,然后同学指出是linux上安装这个软件才行,要对目标文献进行编译,我同学尝试了三四个编译器都不行(csdn大佬也是用fortune编译器实现的)。恳请有经验的大佬指点下谢谢。

这是EPOCH csdn博主的帖子:(2条消息) PIC 模拟软件EPOCH_Real_phy的博客-CSDN博客_epoch安装

博主很忙,问问题回的很慢甚至不知道他啥时候回。。。

 
 
 

回复

1

帖子

0

TA的资源

一粒金砂(初级)

4
 
17370130100,咱可以加上交流,我也要再用epoch

 

 
 
 

回复
您需要登录后才可以回帖 登录 | 注册

随便看看
查找数据手册?

EEWorld Datasheet 技术支持

相关文章 更多>>
关闭
站长推荐上一条 1/10 下一条

 
EEWorld订阅号

 
EEWorld服务号

 
汽车开发圈

About Us 关于我们 客户服务 联系方式 器件索引 网站地图 最新更新 手机版

站点相关: 国产芯 安防电子 汽车电子 手机便携 工业控制 家用电子 医疗电子 测试测量 网络通信 物联网

北京市海淀区中关村大街18号B座15层1530室 电话:(010)82350740 邮编:100190

电子工程世界版权所有 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号 Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved
快速回复 返回顶部 返回列表