• R/O
  • HTTP
  • SSH
  • HTTPS

Molby: コミット

Molecular Modeling Software


コミットメタ情報

リビジョンdd9b68f34fa3becd4975f573d4d61de3e829028c (tree)
日時2014-04-24 20:45:15
作者toshinagata1964 <toshinagata1964@a2be...>
コミッターtoshinagata1964

ログメッセージ

Running GAMESS locally on Windows is in trouble (still working on it)

git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/molby/trunk@530 a2be9bc6-48de-4e38-9406-05402d4bc13c

変更サマリ

差分

--- a/MolLib/Ruby_bind/ruby_dialog.c
+++ b/MolLib/Ruby_bind/ruby_dialog.c
@@ -170,9 +170,9 @@ s_RubyDialogItem_SetAttr(VALUE self, VALUE key, VALUE val)
170170 if (type == sTextFieldSymbol || type == sTextViewSymbol) {
171171 RubyDialogCallback_setStringToItem(view, (val == Qnil ? "" : EncodedStringValuePtr(val)));
172172 } else if (type == sPopUpSymbol) {
173- RubyDialogCallback_setSelectedSubItem(view, NUM2INT(rb_Integer(val)));
173+ RubyDialogCallback_setSelectedSubItem(view, (val == Qnil ? 0 : NUM2INT(rb_Integer(val))));
174174 } else if (type == sCheckBoxSymbol || type == sRadioSymbol || type == sToggleButtonSymbol) {
175- RubyDialogCallback_setStateForItem(view, NUM2INT(rb_Integer(val)));
175+ RubyDialogCallback_setStateForItem(view, (val == Qnil ? 0 : NUM2INT(rb_Integer(val))));
176176 }
177177 } else if (key == sTitleSymbol) {
178178 /* Title */
--- a/Scripts/gamess.rb
+++ b/Scripts/gamess.rb
@@ -207,7 +207,7 @@ class Molecule
207207 fpout.print "This job is running on host #{hostname}\n"
208208 fpout.print "under operating system #{uname} at #{Time.now.to_s}\n"
209209 fpout.print "Available scratch disk space (Kbyte units) at beginning of the job is\n"
210- fpout.print freebytes
210+ fpout.print freebytes + "\n"
211211
212212 # Copy the input file
213213 scrprefix = scrdir + sep + inpbody
@@ -292,6 +292,9 @@ class Molecule
292292
293293 # next files are used only during coupled cluster runs, so let's
294294 # display the numerous definitions only if they are to be used.
295+ # Don't set these variables on windows, where the memory for environmental variables
296+ # is limited.
297+ if $platform != "win"
295298 ENV["CCREST"] = "#{scrbody}.F70"
296299 ENV["CCDIIS"] = "#{scrbody}.F71"
297300 ENV["CCINTS"] = "#{scrbody}.F72"
@@ -318,10 +321,12 @@ class Molecule
318321 ENV["MMNEXM"] = "#{scrbody}.F95"
319322 ENV["MMNEXE"] = "#{scrbody}.F96"
320323 ENV["MMNREXM"] = "#{scrbody}.F97"
321- ENV["MMNREXE"] = "#{scrbody}.F98 "
324+ ENV["MMNREXE"] = "#{scrbody}.F98"
325+ end
322326 #
323327 # next are for TDHFX code, not used by current GAMESS
324328 #
329+ if false
325330 ENV["OLI201"] = "#{scrbody}.F201"
326331 ENV["OLI202"] = "#{scrbody}.F202"
327332 ENV["OLI203"] = "#{scrbody}.F203"
@@ -361,24 +366,31 @@ class Molecule
361366 ENV["OLI237"] = "#{scrbody}.F237"
362367 ENV["OLI238"] = "#{scrbody}.F238"
363368 ENV["OLI239"] = "#{scrbody}.F239"
364-
369+ end
370+
365371 if $platform == "win"
366- if ncpus < 2
367- ncpus = 2
372+ # if ncpus < 2
373+ # ncpus = 2
374+ # end
375+ if gmsvers == "11"
376+ # Old (obsolete) cygwin version, using ddikick
377+ fpout.print "ddikick will run #{ncpus} compute process\n"
378+ ENV["CYGWIN"] = "nodosfilewarning"
379+ else
380+ fpout.print "Microsoft MPI will be running GAMESS on 1 node.\n"
381+ fpout.print "The binary kicked off by 'mpiexec' is gamess.#{gmsvers}.exe\n"
382+ fpout.print "MS-MPI will run #{ncpus*2} compute process\n"
383+ # File containing environmental variables
384+ envfil = "#{scrprefix}.GMS.ENV"
385+ fp = File.open(envfil, "w")
386+ ENV.each { |k, v| fp.print "#{k}=#{v}\n" }
387+ fp.close
388+ # File containing arguments to mpiexec
389+ procfil = "#{scrprefix}.processes.mpd"
390+ fp = File.open(procfil, "w")
391+ fp.print "-env ENVFIL #{envfil} -wdir #{scrdir} -n #{ncpus*2} #{gmsdir}#{sep}gamess.#{gmsvers}.exe\n"
392+ fp.close
368393 end
369- fpout.print "Microsoft MPI will be running GAMESS on 1 node.\n"
370- fpout.print "The binary kicked off by 'mpiexec' is gamess.#{gmsvers}.exe\n"
371- fpout.print "MS-MPI will run #{ncpus} compute process\n"
372- # File containing environmental variables
373- envfil = "#{scrprefix}.GMS.ENV"
374- fp = File.open(envfil, "w")
375- ENV.each { |k, v| fp.print "#{k}=#{v}\n" }
376- fp.close
377- # File containing arguments to mpiexec
378- procfil = "#{scrprefix}.processes.mpd"
379- fp = File.open(procfil, "w")
380- fp.print "-env ENVFIL #{envfil} -wdir #{scrdir} -n #{ncpus} #{gmsdir}#{sep}gamess.#{gmsvers}.exe\n"
381- fp.close
382394 end
383395
384396 fpout.close
@@ -479,7 +491,12 @@ class Molecule
479491 }
480492
481493 if $platform == "win"
482- cmdline = "cmd.exe /c \"mpiexec -configfile #{procfil} >>#{logname}\""
494+ if gmsvers == "11"
495+ hosts = "localhost " * ncpus
496+ cmdline = "cmd.exe /c \"#{gmsdir}/ddikick.exe #{gmsdir}/gamess.#{gmsvers}.exe #{inpbody} -ddi #{ncpus} #{ncpus} #{hosts} -scr #{scrdir} < NUL >>#{logname}\""
497+ else
498+ cmdline = "cmd.exe /c \"mpiexec -configfile #{procfil} >>#{logname}\""
499+ end
483500 else
484501 hosts = "localhost " * ncpus
485502 cmdline = "/bin/sh -c '#{gmsdir}/ddikick.x #{gmsdir}/gamess.#{gmsvers}.x #{inpbody} -ddi #{ncpus} #{ncpus} #{hosts} -scr #{scrdir} < /dev/null >>#{logname}'"
--- a/wxSources/MoleculeView.cpp
+++ b/wxSources/MoleculeView.cpp
@@ -212,8 +212,12 @@ MoleculeView::OnCreate(wxDocument *doc, long WXUNUSED(flags) )
212212 { // Information text
213213 infotext = new wxStaticText(panel1, -1, wxT(""), wxDefaultPosition, wxSize(80, 32), wxST_NO_AUTORESIZE | wxBORDER_SUNKEN);
214214 infotext->SetMinSize(wxSize(80, 32));
215+#if defined(__WXMSW__)
216+ infotext->SetFont(*wxSMALL_FONT);
217+#else
215218 if (ctrlFont)
216219 infotext->SetFont(*ctrlFont);
220+#endif
217221 sizer2->Add(infotext, 1, wxALL | wxEXPAND, 3); // Can expand horizontally
218222 }
219223 { // Custom progress indicator
--- a/wxSources/MyApp.cpp
+++ b/wxSources/MyApp.cpp
@@ -206,22 +206,24 @@ bool MyApp::OnInit(void)
206206 m_checker = new wxSingleInstanceChecker(name);
207207 if (m_checker->IsAnotherRunning()) {
208208 // Make a connection with the other instance and ask for opening the file(s)
209- wxString files;
210- wxConnectionBase *connection;
211- int i;
212- for (i = 1; i < argc; i++) {
213- files.append(argv[i]);
214- files.append(wxT("\n"));
215- }
216- m_client = new MyClient;
217- connection = m_client->MakeConnection(wxT("localhost"), *m_ipcServiceName, MOLBY_IPC_TOPIC);
218- if (connection == NULL) {
219- wxLogError(wxT("Molby is already running; please shut it down and retry"));
209+ if (argc > 1) {
210+ wxString files;
211+ wxConnectionBase *connection;
212+ int i;
213+ for (i = 1; i < argc; i++) {
214+ files.append(argv[i]);
215+ files.append(wxT("\n"));
216+ }
217+ m_client = new MyClient;
218+ connection = m_client->MakeConnection(wxT("localhost"), *m_ipcServiceName, MOLBY_IPC_TOPIC);
219+ if (connection == NULL) {
220+ wxLogError(wxT("Molby is already running; please shut it down and retry"));
221+ delete m_client;
222+ return false;
223+ }
224+ connection->Execute(files);
220225 delete m_client;
221- return false;
222226 }
223- connection->Execute(files);
224- delete m_client;
225227 return false;
226228 } else {
227229 m_server = new MyServer;
旧リポジトリブラウザで表示