Warwick-Plasma / epoch

Particle-in-cell code for plasma physics simulations
https://epochpic.github.io
GNU General Public License v3.0
184 stars 58 forks source link

Unable to compile the VisIt plugin in Ubuntu 22 #534

Open kcm1976 opened 1 year ago

kcm1976 commented 1 year ago

I am using an Ubuntu 22 workstation, where a pre-built VisIt 3.3.3 for Ubuntu 20 is running; VisIt developers are not providing the pre-built VisIt 3.3.3 for Ubuntu 22. When I tried 'make visit', I got an error message reporting incompatible compilers: "ERROR: g++ version is incompatible with VisIt. The reader must be compiled using g++ 9.x." g++ 9.3 is the default in Ubuntu 20, while g++ 11.3 is the default in Ubuntu 22. I considered to build VisIt 3.3.3 from scratch in the Ubuntu 22 machine, but it is a very hard-to-succeed job. I would appreciate it if you could let me know a way of resolving this problem in a less painful way.

kcm1976 commented 1 year ago

Checking the build script in EPOCH_DIR/SDF/VisIt, I noticed the option -f, which neglects the compiler compatibility. Running 'EPOCH_DIR/SDF/VisIt/build -f' built the plugin, which works fine with the VisIt.

DengHuiZhong commented 9 months ago

Could you explain how to build the plugin by run 'EPOCH_DIR/SDF/VisIt/build -f' in detail ? I enter 'EPOCH_DIR/SDF/VisIt/build -f' , but it don't work .

kcm1976 commented 9 months ago

You may try the following procedure ($DIR below is the EPOCH directory): cd $DIR/epoch1d make sdfutilsclean make visitclean make sdfutils cd $DIR/SDF/VisIt ./build -f

DengHuiZhong commented 9 months ago

屏幕截图 2024-02-21 171814 I did what you said , and it shows that 'VisIt SDF reader successfully built.' . However , when i tried 'make visit' it ,it shows that : 'ERROR: g++ version is incompatible with VisIt The reader must be compiled using g++ 9.x ERROR: Failed to build VisIt reader.'

It is worth mentioning that when i enter 'make sdfutils' , it shows : 'ModuleNotFoundError: No module named 'distutils.sysconfig' make: *** [Makefile:423:sdfutils] 错误 1'

Thanks for your help !

kcm1976 commented 9 months ago

The commands I listed above build the Python library and VisIt plugin for processing sdf files. 'make visit' is not necessary and should be avoided. The command './build -f' installs the VisIt plugin. Try to open sdf files after doing './build -f'.

As for the second error related to 'make sdfutils', I have no idea but guess that the Python in your workstation has a problem.