nufeb / NUFEB

Official release of the NUFEB software
http://research.ncl.ac.uk/nufeb/
GNU General Public License v3.0
18 stars 16 forks source link

Error occurs when running Examples #7

Closed wyanren closed 3 years ago

wyanren commented 3 years ago

Hi, I was trying to run the examples file (‘biofilm-het’, ‘biofilm-anammox’, ‘biofilm-nitrifier’):

mpirun -np 4 lmp_mpi -in Inputscript.lammps

And they all returned this:

ERROR: Unrecognized atom style 'bio' (../atom.cpp:511) Last command: atom_style bio

Looking forward to your reply. Thanks.

shelllbw commented 3 years ago

Hi,

Make sure there is no error when compiling NUFEB, you should find 'lmp_mpi' binary file in /NUFEB/lammps/src. Then try the following command to run the example: mpirun -np 4 ../../lammps/src/./lmp_mpi -in Inputscript.lammps If this works, your problem may because there is another LAMMPS installed on the system, which overrides NUFEB path variable. Have a check .bashrc file.

Bowen

wyanren commented 3 years ago

Hi Bowen,

Thanks for your reply :) I retry in another server, however, the early error is replaced to a new one:

mpirun was unable to launch the specified application as it could not find an executable: Executable: lmp_mpi

ps: I also meet this error before, so i reinstall a new NUFEB in my computers. Probably this is the reason why the early error occurs.

shelllbw commented 3 years ago

Can you find 'lmp_mpi' binary file in /NUFEB/lammps/src/ directory?

Do you get this message when typing mpirun -np 4 ../../lammps/src/./lmp_mpi -in Inputscript.lammps in one of the biofilm-* example cases?

shelllbw commented 3 years ago

You will need to call lmp_mpi by specifying its relative path under biofilm-* case directory: mpirun -np 4 ../../lammps/src/./lmp_mpi -in Inputscript.lammps If it works, either use this way to run the program, or edit ~/.bashrc file by removing all other NUFEB/LAMMPS paths ("export PATH=$PATH ......./lammps/src") but only keep the one with the executable lmp_mpi.

wyanren commented 3 years ago

Bowen, Thanks for your reply.

I reclone the whole "NUFEB", the ERROR of Unrecognized atom style 'bio' seems to be handled. While some new errors occur. Here is the typing and messages:

yanren@MacBook-Pro biofilm-het % mpirun -np 4 ../../lammps/src/./lmp_mpi -in Inputscipt.lammps
dyld: Library not loaded: libvtksys-8.0.1.dylib
  Referenced from: /Users/yanren/model/NUFEB/examples/biofilm-het/../../lammps/src/./lmp_mpi
  Reason: image not found
dyld: Library not loaded: libvtksys-8.0.1.dylib
  Referenced from: /Users/yanren/model/NUFEB/examples/biofilm-het/../../lammps/src/./lmp_mpi
  Reason: image not found
--------------------------------------------------------------------------
Primary job  terminated normally, but 1 process returned
a non-zero exit code. Per user-direction, the job has been aborted.
--------------------------------------------------------------------------
dyld: Library not loaded: libvtksys-8.0.1.dylib
  Referenced from: /Users/yanren/model/NUFEB/examples/biofilm-het/../../lammps/src/./lmp_mpi
  Reason: image not found
dyld: Library not loaded: libvtksys-8.0.1.dylib
  Referenced from: /Users/yanren/model/NUFEB/examples/biofilm-het/../../lammps/src/./lmp_mpi
  Reason: image not found

and also:


yanren@MacBook-Pro biofilm-het % mpirun -np 4 ../../lammps/src/./lmp_mpi -in Inputscipt.lammps
dyld: Library not loaded: libvtksys-8.0.1.dylib
  Referenced from: /Users/yanren/model/NUFEB/examples/biofilm-het/../../lammps/src/./lmp_mpi
  Reason: image not found
--------------------------------------------------------------------------
Primary job  terminated normally, but 1 process returned
a non-zero exit code. Per user-direction, the job has been aborted.
--------------------------------------------------------------------------
dyld: Library not loaded: libvtksys-8.0.1.dylib
  Referenced from: /Users/yanren/model/NUFEB/examples/biofilm-het/../../lammps/src/./lmp_mpi
  Reason: image not found
dyld: Library not loaded: libvtksys-8.0.1.dylib
  Referenced from: /Users/yanren/model/NUFEB/examples/biofilm-het/../../lammps/src/./lmp_mpi
  Reason: image not found
dyld: Library not loaded: libvtksys-8.0.1.dylib
  Referenced from: /Users/yanren/model/NUFEB/examples/biofilm-het/../../lammps/src/./lmp_mpi
  Reason: image not found
--------------------------------------------------------------------------
mpirun noticed that process rank 0 with PID 0 on node MacBook-Pro exited on signal 6 (Abort trap: 6).
shelllbw commented 3 years ago

Error is because VTK shared library is not loaded. Have you installed VTK libary (./install-vtk.sh), and also installed NUFEB with --enable-vtk option (./install.sh --enable-vtk)?

Try $ less ~/.bashrc you should see this line if VTK is installed succefully: "export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:/Usres/USER_NAME/NUFEB/thirdparty/vtk/vtk-build/lib/" Then try $ bash and $ mpirun -np 4 ../../lammps/src/./lmp_mpi -in Inputscipt.lammps or $ mpirun -np 4 ../../lammps/src/./lmp_mpi -in Inputscipt-vtk.lammps

wyanren commented 3 years ago

Bowen, I appreciate your prompt reply.

I finally realize i didn't installed for NUFEB with --enable-vtk option in NUFEB directory (./install.sh --enable-vtk).

After the installing (./install.sh --enable-vtk), here is what ($ less ~/.bashrc) returns:

export PATH=$PATH:/Users/yanren/NUFEB/lammps/src
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:/Users/yanren/NUFEB/thirdparty/vtk/vtk-build/vtk-8.0/lib
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:/Users/yanren/NUFEB-ex/NUFEB/thirdparty/vtk/vtk-build/vtk-8.0/lib
export PATH=$PATH:/Users/yanren/NUFEB-ex/NUFEB/lammps/src
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:/Users/yanren/model/NUFEB/thirdparty/vtk/vtk-build/vtk-8.0/lib
export PATH=$PATH:/Users/yanren/model/NUFEB/lammps/src
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:/Users/yanren/model/NUFEB/thirdparty/hdf5/hdf5/lib

However, when i try mpirun, there are still errors:

yanren@MacBook-Pro Biofilm-het % pwd
/Users/yanren/model/NUFEB/examples/Biofilm-het
yanren@MacBook-Pro Biofilm-het % bash  
bash-3.2$ mpirun -np 4 ../../lammps/src/./lmp_mpi -in Inputscipt.lammps
ERROR on proc 0: Cannot open input script Inputscipt.lammps (../lammps.cpp:440)
Last command: (unknown)
--------------------------------------------------------------------------
MPI_ABORT was invoked on rank 0 in communicator MPI_COMM_WORLD
with errorcode 1.

NOTE: invoking MPI_ABORT causes Open MPI to kill all MPI processes.
You may or may not see output from other processes, depending on
exactly when Open MPI kills them.
--------------------------------------------------------------------------
bash-3.2$ mpirun -np 4 ../../lammps/src/./lmp_mpi -in Inputscipt-vtk.lammps
ERROR on proc 0: Cannot open input script Inputscipt-vtk.lammps (../lammps.cpp:440)
Last command: (unknown)
--------------------------------------------------------------------------
MPI_ABORT was invoked on rank 0 in communicator MPI_COMM_WORLD
with errorcode 1.

NOTE: invoking MPI_ABORT causes Open MPI to kill all MPI processes.
You may or may not see output from other processes, depending on
exactly when Open MPI kills them.

Is it caused by the repetition of NUFEB installation?

shelllbw commented 3 years ago

Hi, it cannot find input files in the directory /Users/yanren/model/NUFEB/examples/Biofilm-het. Do you have all the required files in ”Biofilm-het“ folder? The case provided with NUFEB is named as “biofilm-het“.

If the latest installation is in the directory above, you can delete all other paths in bashrc file: $ nano ~/.bashrc Then delete first four lines, and keep export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:/Users/yanren/model/NUFEB/thirdparty/vtk/vtk-build/vtk-8.0/lib export PATH=$PATH:/Users/yanren/model/NUFEB/lammps/src export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:/Users/yanren/model/NUFEB/thirdparty/hdf5/hdf5/lib

wyanren commented 3 years ago

Hi, Bowen:)

I check my directory(/NUFEB/examples/biofilm-het), while it seems to have the required files. Perhaps, something went wrong when i reinstall this NUFEB (I am not quite sure)?

yanren@MacBook-Pro biofilm-het % ls
Allclean.sh         Inputscript-vtk.lammps      atom.in             visual
Inputscript-comments.lammps Inputscript.lammps      log.lammps

And I already follow your advice to delete the unnecessary lines on bashrc, here is the result trying to mpirun:

bash-3.2$ mpirun -np 4 ../../lammps/src/./lmp_mpi -in Inputscipt.lammps
ERROR on proc 0: Cannot open input script Inputscipt.lammps (../lammps.cpp:440)
Last command: (unknown)
--------------------------------------------------------------------------
MPI_ABORT was invoked on rank 0 in communicator MPI_COMM_WORLD
with errorcode 1.

NOTE: invoking MPI_ABORT causes Open MPI to kill all MPI processes.
You may or may not see output from other processes, depending on
exactly when Open MPI kills them.
--------------------------------------------------------------------------
bash-3.2$ mpirun -np 4 lmp_mpi -in Inputscript.lammps
LAMMPS (3 Mar 2020)
ERROR: Unrecognized atom style 'bio' (../atom.cpp:511)
Last command: atom_style    bio
--------------------------------------------------------------------------
Primary job  terminated normally, but 1 process returned
a non-zero exit code. Per user-direction, the job has been aborted.
--------------------------------------------------------------------------
--------------------------------------------------------------------------
mpirun detected that one or more processes exited with non-zero status, thus causing
the job to be terminated. The first process to do so was:

  Process name: [[45214,1],3]
  Exit code:    1
shelllbw commented 3 years ago

I don't know why lammps cannot find/open Inputscript.lammps, it seems the file is present in the current directory. What's the output of '$ ls' after '$ bash'?

wyanren commented 3 years ago
bash-3.2$ ls
Allclean.sh         Inputscript.lammps      visual
Inputscript-comments.lammps atom.in
Inputscript-vtk.lammps      log.lammps
shelllbw commented 3 years ago

It's strange, check if there is access permission for the files? maybe $ chmod -R 755 biofilm-het

Also try without bash but manually export the path before running nufeb: $ export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:/Users/yanren/model/NUFEB/thirdparty/vtk/vtk-build/vtk-8.0/lib $ mpirun -np 4 ../../lammps/src/./lmp_mpi -in Inputscipt.lammps

wyanren commented 3 years ago

Hi, Bowen.

It seems to report that can not find lmp_mpi file:

yanren@MacBook-Pro examples % chmod -R 755 biofilm-het
yanren@MacBook-Pro examples % pwd
/Users/yanren/model/NUFEB/examples
yanren@MacBook-Pro examples % export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:/Users/yanren/model/NUFEB/thirdparty/vtk/vtk-build/vtk-8.0/lib
yanren@MacBook-Pro examples % mpirun -np 4 ../../lammps/src/./lmp_mpi -in Inputscipt.lammps
--------------------------------------------------------------------------
mpirun was unable to launch the specified application as it could not access
or execute an executable:

Executable: ../../lammps/src/./lmp_mpi
Node: MacBook-Pro

while attempting to start process rank 0.
--------------------------------------------------------------------------
4 total processes failed to start

While I can find this file in the directory. WechatIMG320

wyanren commented 3 years ago

I also notice that error occurs when try to install sedifoam in thirdparty directory.

yanren@MacBook-Pro thirdparty % ./install-sedifoam.sh
Installing SediFOAM (for mac/linux)..
*******************************************
select the system you are running, then press enter
  1) Ubuntu14.x - Ubuntu16.x
  2) Ubuntu17.x - Ubuntu20.x
  3) Centos
  4) Mac
  5) Other (install openmpi locally, this will take a while)
*******************************************
4
You chose 4) Mac
Directory of LAMMPS is:  /Users/yanren/model/NUFEB/lammps
Copying packages to LAMMPS..
g++ -O -fPIC -I.  -c mpi.c
clang: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated [-Wdeprecated]
ar rs libmpi_stubs.a mpi.o
Installing package GRANULAR
Installing package USER-NUFEB
Installing package COLLOID
Installing package USER-CFDDEM
Installing package USER-VTK
The version you choose is mac version
Gathering installed package information (may take a little while)
Gathering git version information
Compiling LAMMPS for machine shanghaimac
make[1]: *** No rule to make target `depend'.  Stop.
/opt/local/bin//mpicxx -O3  -DLAMMPS_GZIP   /opt/local/include/openmpi-gcc46   -I../../../thirdparty/vtk/vtk-build/vtk-8.0/include/vtk-8.0  -std=c++1y   -M ../pair_lubricate_poly.cpp > pair_lubricate_poly.d
/bin/sh: /opt/local/bin//mpicxx: No such file or directory
/opt/local/bin//mpicxx -O3  -fPIC -DLAMMPS_GZIP   /opt/local/include/openmpi-gcc46   -I../../../thirdparty/vtk/vtk-build/vtk-8.0/include/vtk-8.0  -std=c++1y   -c ../angle.cpp
make[1]: /opt/local/bin//mpicxx: No such file or directory
/opt/local/bin//mpicxx -O3  -fPIC -DLAMMPS_GZIP   /opt/local/include/openmpi-gcc46   -I../../../thirdparty/vtk/vtk-build/vtk-8.0/include/vtk-8.0  -std=c++1y   -c ../angle_deprecated.cpp
make[1]: /opt/local/bin//mpicxx: No such file or directory
/opt/local/bin//mpicxx -O3  -fPIC -DLAMMPS_GZIP   /opt/local/include/openmpi-gcc46   -I../../../thirdparty/vtk/vtk-build/vtk-8.0/include/vtk-8.0  -std=c++1y   -c ../angle_hybrid.cpp
make[1]: /opt/local/bin//mpicxx: No such file or directory
/opt/local/bin//mpicxx -O3  -fPIC -DLAMMPS_GZIP   /opt/local/include/openmpi-gcc46   -I../../../thirdparty/vtk/vtk-build/vtk-8.0/include/vtk-8.0  -std=c++1y   -c ../angle_zero.cpp
make[1]: /opt/local/bin//mpicxx: No such file or directory
make[1]: *** [angle.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [angle_deprecated.o] Error 1
make[1]: *** [angle_hybrid.o] Error 1
make[1]: *** [angle_zero.o] Error 1
make: *** [shanghaimac] Error 2
./install-sedifoam.sh: line 92: wmake: command not found
./install-sedifoam.sh: line 93: wmake: command not found
./install-sedifoam.sh: line 94: wmake: command not found
./install-sedifoam.sh: line 95: wmake: command not found

So I wander if it is caused by incomplete installation, should I remove current file and PATH, and then reinstall to try?

shelllbw commented 3 years ago

It seems to report that can not find lmp_mpi file:


yanren@MacBook-Pro examples % chmod -R 755 biofilm-het
yanren@MacBook-Pro examples % pwd
/Users/yanren/model/NUFEB/examples
yanren@MacBook-Pro examples % export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:/Users/yanren/model/NUFEB/thirdparty/vtk/vtk-build/vtk-8.0/lib
yanren@MacBook-Pro examples % mpirun -np 4 ../../lammps/src/./lmp_mpi -in Inputscipt.lammps
--------------------------------------------------------------------------
You need to enter one of the example directories before running NUFEB:
$ export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:/Users/yanren/model/NUFEB/thirdparty/vtk/vtk-build/vtk-8.0/lib
$ cd biofilm-het
$ mpirun -np 4 ../../lammps/src/./lmp_mpi -in Inputscipt.lammps
shelllbw commented 3 years ago

I also notice that error occurs when try to install sedifoam in thirdparty directory.

SediFOAM requires both NUFEB and OpenFOAM (v2.4.0) installed. We don't provide the script for OpenFOAM installation. But you can follow this guide: https://openfoamwiki.net/index.php/Category:Installing_OpenFOAM_on_Mac_OS and also our tutorial: https://github.com/nufeb/NUFEB/wiki/Tutorial:-simulation-of-biofilm-deformation-and-detachment for the installation and simulation.

Bowen

wyanren commented 3 years ago

It seems to report that can not find lmp_mpi file:

yanren@MacBook-Pro examples % chmod -R 755 biofilm-het
yanren@MacBook-Pro examples % pwd
/Users/yanren/model/NUFEB/examples
yanren@MacBook-Pro examples % export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:/Users/yanren/model/NUFEB/thirdparty/vtk/vtk-build/vtk-8.0/lib
yanren@MacBook-Pro examples % mpirun -np 4 ../../lammps/src/./lmp_mpi -in Inputscipt.lammps
--------------------------------------------------------------------------

You need to enter one of the example directories before running NUFEB: $ export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:/Users/yanren/model/NUFEB/thirdparty/vtk/vtk-build/vtk-8.0/lib $ cd biofilm-het $ mpirun -np 4 ../../lammps/src/./lmp_mpi -in Inputscipt.lammps

Hi Bowen, Thanks a lot 👍 , following your typing above, mpirun of examples finally works!